my-gitea-templates/templates/repo/ home.tmpl
78 lines
3.2 KiB

  1. {{template "base/head" .}}
  2. <div class="repository file list">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. {{template "base/alert" .}}
  6. <div class="ui three column stackable grid">
  7. <div class="column">
  8. {{template "repo/branch_dropdown" .}}
  9. </div>
  10. {{if .RepoSearchEnabled}}
  11. <div class="ui column center aligned repo-search">
  12. <form class="ui form" action="{{.RepoLink}}/search" method="get">
  13. <div class="field">
  14. <div class="ui action input">
  15. <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "repo.search.search_repo"}}">
  16. <button class="ui basic icon button" type="submit">
  17. <i class="search icon"></i>
  18. </button>
  19. </div>
  20. </div>
  21. </form>
  22. </div>
  23. {{end}}
  24. <div class="column right aligned">
  25. <div class="ui dropdown">
  26. <button class="ui basic left attached labeled icon button"><i class="clone icon"></i>Clone</button>
  27. <div class="menu">
  28. <div class="message clone-menu">
  29. Run: <kbd class="ui label">$ git clone <i>url</i></kbd>
  30. <div class="clone-grid">
  31. {{if not $.DisableHTTP}}
  32. <div>
  33. {{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
  34. </div>
  35. <div class="ui left action input">
  36. <button class="ui tiny compact basic icon button poping up clipboard" id="clipboard-btn-https" 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-https">
  37. <i class="copy outline icon"></i>
  38. </button>
  39. <input id="repo-clone-url-https" value="{{$.CloneLink.HTTPS}}" readonly>
  40. </div>
  41. {{end}}
  42. {{if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
  43. <div>
  44. SSH
  45. </div>
  46. <div class="ui left action input">
  47. <button class="ui tiny compact basic icon button poping up clipboard" id="clipboard-btn-ssh" 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-ssh">
  48. <i class="copy outline icon"></i>
  49. </button>
  50. <input id="repo-clone-url-ssh" value="{{$.CloneLink.SSH}}" readonly>
  51. </div>
  52. {{end}}
  53. </div>
  54. </div>
  55. </div>
  56. </div><!--
  57. --><div class="ui dropdown">
  58. <button class="ui basic right attached labeled icon button">
  59. <i class="download icon"></i>Download
  60. </button>
  61. <div class="menu">
  62. <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="octicon octicon-file-zip"></i> ZIP</a>
  63. <a class="item" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="octicon octicon-file-zip"></i> TAR.GZ</a>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. {{if .IsViewFile}}
  69. {{template "repo/view_file" .}}
  70. {{else}}
  71. {{template "repo/view_list" .}}
  72. {{end}}
  73. </div>
  74. </div>
  75. {{template "base/footer" .}}