You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.6 KiB

  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. {{if not $.DisableHTTP}}
  27. <input id="repo-clone-url" value="{{$.CloneLink.HTTPS}}" readonly>
  28. {{else}}
  29. <input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
  30. {{end}}
  31. <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">
  32. <i class="octicon octicon-clippy"></i>
  33. </button>
  34. </div>
  35. </div>
  36. <div class="ui divider"></div>
  37. <div class="item">
  38. <h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
  39. <div class="markdown">
  40. <pre><code>touch README.md
  41. git init
  42. git add README.md
  43. git commit -m "first commit"
  44. git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  45. git push -u origin master</code></pre>
  46. </div>
  47. </div>
  48. <div class="ui divider"></div>
  49. <div class="item">
  50. <h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
  51. <div class="markdown">
  52. <pre><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  53. git push -u origin master</code></pre>
  54. </div>
  55. </div>
  56. {{else}}
  57. <div class="ui segment center">
  58. {{.i18n.Tr "repo.bare_message"}}
  59. </div>
  60. {{end}}
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. {{template "base/footer" .}}