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.

55 lines
3.3 KiB

  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="repo-wrapper" class="repo-bare">
  4. <div id="repo-header" class="clear">
  5. <div class="container clear">
  6. <h1 id="repo-header-name" class="left public">
  7. <i class="mega-octicon octicon-{{if .Repository.IsPrivate}}lock{{else}}repo{{end}}"></i>
  8. <a class="author" href="{{AppSubUrl}}/{{.Repository.Owner.Name}}">{{.Repository.Owner.Name}}</a>
  9. <span class="divider">/</span>
  10. <a class="repo text-bold" href="{{.RepoLink}}">{{.Repository.Name}}</a>
  11. </h1>
  12. </div>
  13. </div>
  14. <div id="repo-content" class="clear container">
  15. <div id="repo-bare">
  16. <div id="repo-bare-start" class="panel panel-radius">
  17. <div class="panel-header">
  18. <a class="btn btn-small btn-black btn-header btn-radius right" href="{{.RepoLink}}/settings">{{.i18n.Tr "repo.settings"}}</a>
  19. <strong>{{.i18n.Tr "repo.quick_guide"}}</strong>
  20. </div>
  21. <div class="panel-content">
  22. <div id="repo-clone" class="clear text-center">
  23. <h2>{{.i18n.Tr "repo.clone_this_repo"}}</h2>
  24. {{if not $.DisableSSH}}
  25. <button class="btn btn-blue btn-first current left btn-left-radius" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">SSH</button>
  26. {{end}}
  27. <button class="btn {{if $.DisableSSH}}btn-first btn-blue current{{else}}btn-gray{{end}} left" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">HTTPS</button>
  28. <input id="repo-clone-url" type="text" class="ipt ipt-disabled left" value="{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}" onclick="this.select()" readonly />
  29. <button class="btn btn-black left btn-right-radius" id="repo-clone-copy" data-copy-val="val" data-copy-from="#repo-clone-url">{{.i18n.Tr "repo.copy_link"}}</button>
  30. <p class="text-center" id="repo-clone-help">{{.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</p>
  31. <hr/>
  32. </div>
  33. <div id="repo-bare-cmd" class="text-center">
  34. <h2>{{.i18n.Tr "repo.create_new_repo_command"}}</h2>
  35. <pre class="text-left radius"><code>touch README.md
  36. git init
  37. git add README.md
  38. git commit -m "first commit"
  39. git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  40. git push -u origin master</code></pre>
  41. <br/>
  42. <hr/>
  43. </div>
  44. <div id="repo-bare-remote" class="text-center">
  45. <h2>{{.i18n.Tr "repo.push_exist_repo"}}</h2>
  46. <pre class="text-left radius"><code>git remote add origin <span class="clone-url">{{if $.DisableSSH}}{{$.CloneLink.HTTPS}}{{else}}{{$.CloneLink.SSH}}{{end}}</span>
  47. git push -u origin master</code></pre>
  48. <br/>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. {{template "ng/base/footer" .}}