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.

empty.tmpl 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {{template "base/head" .}}
  2. <div class="page-content 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 .Repository.IsArchived}}
  9. <div class="ui warning message">
  10. {{.i18n.Tr "repo.archive.title"}}
  11. </div>
  12. {{end}}
  13. {{if .CanWriteCode}}
  14. <h4 class="ui top attached header">
  15. {{.i18n.Tr "repo.quick_guide"}}
  16. </h4>
  17. <div class="ui attached guide table segment">
  18. <div class="item">
  19. <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>
  20. <div class="ui action small input">
  21. {{template "repo/clone_buttons" .}}
  22. </div>
  23. </div>
  24. {{if not .Repository.IsArchived}}
  25. <div class="ui divider"></div>
  26. <div class="item">
  27. <h3>{{.i18n.Tr "repo.create_new_repo_command"}}</h3>
  28. <div class="markup">
  29. <pre><code>touch README.md
  30. git init
  31. {{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}}
  32. git add README.md
  33. git commit -m "first commit"
  34. git remote add origin <span class="clone-url">{{$.CloneLink.HTTPS}}</span>
  35. git push -u origin {{.Repository.DefaultBranch}}</code></pre>
  36. </div>
  37. </div>
  38. <div class="ui divider"></div>
  39. <div class="item">
  40. <h3>{{.i18n.Tr "repo.push_exist_repo"}}</h3>
  41. <div class="markup">
  42. <pre><code>git remote add origin <span class="clone-url">{{$.CloneLink.HTTPS}}</span>
  43. git push -u origin {{.Repository.DefaultBranch}}</code></pre>
  44. </div>
  45. </div>
  46. <script defer>
  47. /* eslint-disable no-undef */
  48. const cloneUrls = document.getElementsByClassName('clone-url');
  49. if (cloneUrls) {
  50. for (let i = 0; i < cloneUrls.length; i++) {
  51. cloneUrls[i].textContent = (isSSH ? sshButton : httpsButton).getAttribute('data-link');
  52. }
  53. }
  54. </script>
  55. {{end}}
  56. {{else}}
  57. <div class="ui segment center">
  58. {{.i18n.Tr "repo.empty_message"}}
  59. </div>
  60. {{end}}
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. {{template "base/footer" .}}