bare.tmpl 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 $.DisableSSH}}
  20. <button class="ui blue basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
  21. SSH
  22. </button>
  23. {{end}}
  24. <button class="ui {{if $.DisableSSH}}blue{{end}} basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
  25. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  26. </button>
  27. <input id="repo-clone-url" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" readonly>
  28. <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">
  29. <i class="octicon octicon-clippy"></i>
  30. </button>
  31. </div>
  32. </div>
  33. <div class="ui divider"></div>
  34. <div class="item">
  35. <h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
  36. <div class="markdown">
  37. <pre><code>touch README.md
  38. git init
  39. git add README.md
  40. git commit -m "first commit"
  41. git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  42. git push -u origin master</code></pre>
  43. </div>
  44. </div>
  45. <div class="ui divider"></div>
  46. <div class="item">
  47. <h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
  48. <div class="markdown">
  49. <pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  50. git push -u origin master</code></pre>
  51. </div>
  52. </div>
  53. {{end}}
  54. </div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. {{template "base/footer" .}}