bare.tmpl 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. <div class="ui right">
  12. <a class="ui black tiny button" href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings"}}</a>
  13. </div>
  14. </h4>
  15. <div class="ui attached guide table segment">
  16. <div class="item">
  17. <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>
  18. <div class="ui action small input">
  19. {{if not $.DisableHTTP}}
  20. <button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
  21. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  22. </button>
  23. {{end}}
  24. {{if not $.DisableSSH}}
  25. <button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
  26. SSH
  27. </button>
  28. {{end}}
  29. <input id="repo-clone-url" value="{{if not $.DisableHTTP}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
  30. <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">
  31. <i class="octicon octicon-clippy"></i>
  32. </button>
  33. </div>
  34. </div>
  35. <div class="ui divider"></div>
  36. <div class="item">
  37. <h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
  38. <div class="markdown">
  39. <pre><code>touch README.md
  40. git init
  41. git add README.md
  42. git commit -m "first commit"
  43. git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  44. git push -u origin master</code></pre>
  45. </div>
  46. </div>
  47. <div class="ui divider"></div>
  48. <div class="item">
  49. <h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
  50. <div class="markdown">
  51. <pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  52. git push -u origin master</code></pre>
  53. </div>
  54. </div>
  55. {{end}}
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. {{template "base/footer" .}}