bare.tmpl 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. {{template "base/head" .}}
  2. <div class="repository quickstart">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <div class="ui grid">
  6. <div class="sixteen wide column content">
  7. {{template "base/alert" .}}
  8. {{if .IsRepositoryAdmin}}
  9. <h4 class="ui top attached header">
  10. {{.i18n.Tr "repo.quick_guide"}}
  11. </h4>
  12. <div class="ui attached guide table segment">
  13. <div class="item">
  14. <h3>{{.i18n.Tr "repo.clone_this_repo"}} <small>{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</small></h3>
  15. <div class="ui action small input">
  16. {{if not $.DisableHTTP}}
  17. <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
  18. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  19. </button>
  20. {{end}}
  21. {{if not $.DisableSSH}}
  22. <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
  23. SSH
  24. </button>
  25. {{end}}
  26. <input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
  27. <button class="ui basic button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
  28. <i class="octicon octicon-clippy"></i>
  29. </button>
  30. </div>
  31. </div>
  32. <div class="ui divider"></div>
  33. <div class="item">
  34. <h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
  35. <div class="markdown">
  36. <pre><code>touch README.md
  37. git init
  38. git add README.md
  39. git commit -m "first commit"
  40. git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  41. git push -u origin master</code></pre>
  42. </div>
  43. </div>
  44. <div class="ui divider"></div>
  45. <div class="item">
  46. <h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
  47. <div class="markdown">
  48. <pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  49. git push -u origin master</code></pre>
  50. </div>
  51. </div>
  52. {{else}}
  53. <div class="ui segment center">
  54. {{.i18n.Tr "repo.bare_message"}}
  55. </div>
  56. {{end}}
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. {{template "base/footer" .}}