Fork to maintain patches against the official gitea for https://code.ceondo.com https://github.com/go-gitea/gitea

head.tmpl 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <!DOCTYPE html>
  2. <html>
  3. <head data-suburl="{{AppSubUrl}}">
  4. <meta charset="utf-8">
  5. <meta http-equiv="x-ua-compatible" content="ie=edge">
  6. <title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>
  7. <meta name="theme-color" content="{{ThemeColorMetaTag}}">
  8. <meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}" />
  9. <meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}" />
  10. <meta name="keywords" content="{{MetaKeywords}}">
  11. <meta name="referrer" content="no-referrer" />
  12. <meta name="_csrf" content="{{.CsrfToken}}" />
  13. <meta name="_suburl" content="{{AppSubUrl}}" />
  14. {{if .IsSigned}}
  15. <meta name="_uid" content="{{.SignedUser.ID}}" />
  16. {{end}}
  17. {{if .ContextUser}}
  18. <meta name="_context_uid" content="{{.ContextUser.ID}}" />
  19. {{end}}
  20. {{if .SearchLimit}}
  21. <meta name="_search_limit" content="{{.SearchLimit}}" />
  22. {{end}}
  23. {{if .GoGetImport}}
  24. <meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
  25. <meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
  26. {{end}}
  27. <script>
  28. {{SafeJS `/*
  29. @licstart The following is the entire license notice for the
  30. JavaScript code in this page.
  31. Copyright (c) 2016 The Gitea Authors
  32. Copyright (c) 2015 The Gogs Authors
  33. Permission is hereby granted, free of charge, to any person obtaining a copy
  34. of this software and associated documentation files (the "Software"), to deal
  35. in the Software without restriction, including without limitation the rights
  36. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  37. copies of the Software, and to permit persons to whom the Software is
  38. furnished to do so, subject to the following conditions:
  39. The above copyright notice and this permission notice shall be included in
  40. all copies or substantial portions of the Software.
  41. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  42. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  43. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  44. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  45. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  46. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  47. THE SOFTWARE.
  48. ---
  49. Licensing information for additional javascript libraries can be found at:
  50. {{AppSubUrl}}/vendor/librejs.html
  51. @licend The above is the entire license notice
  52. for the JavaScript code in this page.
  53. */`}}
  54. </script>
  55. <link rel="shortcut icon" href="{{AppSubUrl}}/img/favicon.png" />
  56. <link rel="mask-icon" href="{{AppSubUrl}}/img/gitea-safari.svg" color="#609926">
  57. <link rel="preload" href="{{AppSubUrl}}/vendor/assets/font-awesome/css/font-awesome.min.css" as="style" onload="this.rel='stylesheet'">
  58. <noscript><link rel="stylesheet" href="{{AppSubUrl}}/vendor/assets/font-awesome/css/font-awesome.min.css"></noscript>
  59. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/assets/octicons/octicons.min.css">
  60. {{if .RequireSimpleMDE}}
  61. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/simplemde/simplemde.min.css">
  62. {{end}}
  63. {{if .RequireGitGraph}}
  64. <!-- graph -->
  65. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/gitgraph/gitgraph.css">
  66. {{end}}
  67. <!-- Stylesheet -->
  68. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/semantic/semantic.min.css">
  69. <link rel="stylesheet" href="{{AppSubUrl}}/css/index.css?v={{MD5 AppVer}}">
  70. <noscript>
  71. <style>
  72. .dropdown:hover > .menu { display: block; }
  73. .ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
  74. </style>
  75. </noscript>
  76. {{if .RequireHighlightJS}}
  77. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/highlight/github.css">
  78. {{end}}
  79. {{if .RequireMinicolors}}
  80. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/jquery.minicolors/jquery.minicolors.css">
  81. {{end}}
  82. {{if .RequireDatetimepicker}}
  83. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.css">
  84. {{end}}
  85. {{if .RequireDropzone}}
  86. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/dropzone/dropzone.css">
  87. {{end}}
  88. <style class="list-search-style"></style>
  89. <script src="{{AppSubUrl}}/vendor/plugins/cssrelpreload/loadCSS.min.js"></script>
  90. <script src="{{AppSubUrl}}/vendor/plugins/cssrelpreload/cssrelpreload.min.js"></script>
  91. {{if .PageIsUserProfile}}
  92. <meta property="og:title" content="{{.Owner.Name}}" />
  93. <meta property="og:type" content="profile" />
  94. <meta property="og:image" content="{{.Owner.AvatarLink}}" />
  95. <meta property="og:url" content="{{.Owner.HTMLURL}}" />
  96. <meta property="og:site_name" content="{{AppName}}" />
  97. {{else if .Repository}}
  98. <meta property="og:title" content="{{.Repository.Name}}" />
  99. <meta property="og:type" content="object" />
  100. <meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" />
  101. <meta property="og:url" content="{{.Repository.HTMLURL}}" />
  102. {{if .Repository.Description}}
  103. <meta property="og:description" content="{{.Repository.Description}}" />
  104. {{end}}
  105. <meta property="og:site_name" content="{{AppName}}" />
  106. {{else}}
  107. <meta property="og:title" content="{{AppName}}">
  108. <meta property="og:type" content="website" />
  109. <meta property="og:image" content="{{AppSubUrl}}/img/gitea-lg.png" />
  110. <meta property="og:url" content="{{AppUrl}}" />
  111. <meta property="og:description" content="{{MetaDescription}}">
  112. {{end}}
  113. {{template "custom/header" .}}
  114. </head>
  115. <body>
  116. <div class="full height">
  117. <noscript>{{.i18n.Tr "enable_javascript"}}</noscript>
  118. {{if not .PageIsInstall}}
  119. <div class="following bar light">
  120. <div class="ui container">
  121. <div class="ui grid">
  122. <div class="column">
  123. <div class="ui top secondary menu">
  124. <a class="item brand" href="{{AppSubUrl}}/">
  125. <img class="ui mini image" src="{{AppSubUrl}}/img/gitea-sm.png">
  126. </a>
  127. {{if .IsSigned}}
  128. <a class="item{{if .PageIsDashboard}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
  129. <a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
  130. <a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
  131. {{else}}
  132. <a class="item{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
  133. {{end}}
  134. <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
  135. {{/*<div class="item">
  136. <div class="ui icon input">
  137. <input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
  138. <i class="search icon"></i>
  139. </div>
  140. </div>*/}}
  141. {{if .IsSigned}}
  142. <div class="right menu">
  143. <a href="{{AppSubUrl}}/notifications" class="ui head link jump item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
  144. <span class="text">
  145. <i class="octicon octicon-inbox"><span class="sr-only">{{.i18n.Tr "notifications"}}</span></i>
  146. {{if .NotificationUnreadCount}}
  147. <span class="ui red label">
  148. {{.NotificationUnreadCount}}
  149. </span>
  150. {{end}}
  151. </span>
  152. </a>
  153. <div class="ui dropdown head link jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
  154. <span class="text">
  155. <i class="octicon octicon-plus"><span class="sr-only">{{.i18n.Tr "create_new"}}</span></i>
  156. <i class="octicon octicon-triangle-down"></i>
  157. </span>
  158. <div class="menu">
  159. <a class="item" href="{{AppSubUrl}}/repo/create">
  160. <i class="octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
  161. </a>
  162. <a class="item" href="{{AppSubUrl}}/repo/migrate">
  163. <i class="octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
  164. </a>
  165. {{if .SignedUser.CanCreateOrganization}}
  166. <a class="item" href="{{AppSubUrl}}/org/create">
  167. <i class="octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
  168. </a>
  169. {{end}}
  170. </div><!-- end content create new menu -->
  171. </div><!-- end dropdown menu create new -->
  172. <div class="ui dropdown head link jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
  173. <span class="text avatar">
  174. <img class="ui small rounded image" src="{{.SignedUser.RelAvatarLink}}">
  175. <span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
  176. <i class="octicon octicon-triangle-down" tabindex="-1"></i>
  177. </span>
  178. <div class="menu" tabindex="-1">
  179. <div class="ui header">
  180. {{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
  181. </div>
  182. <div class="divider"></div>
  183. <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
  184. <i class="octicon octicon-person"></i>
  185. {{.i18n.Tr "your_profile"}}<!-- Your profile -->
  186. </a>
  187. <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
  188. <i class="octicon octicon-star"></i>
  189. {{.i18n.Tr "your_starred"}}
  190. </a>
  191. <a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
  192. <i class="octicon octicon-settings"></i>
  193. {{.i18n.Tr "your_settings"}}<!-- Your settings -->
  194. </a>
  195. <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
  196. <i class="octicon octicon-question"></i>
  197. {{.i18n.Tr "help"}}<!-- Help -->
  198. </a>
  199. {{if .IsAdmin}}
  200. <div class="divider"></div>
  201. <a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
  202. <i class="icon settings"></i>
  203. {{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
  204. </a>
  205. {{end}}
  206. <div class="divider"></div>
  207. <a class="item" href="{{AppSubUrl}}/user/logout">
  208. <i class="octicon octicon-sign-out"></i>
  209. {{.i18n.Tr "sign_out"}}<!-- Sign Out -->
  210. </a>
  211. </div><!-- end content avatar menu -->
  212. </div><!-- end dropdown avatar menu -->
  213. </div><!-- end signed user right menu -->
  214. {{else}}
  215. <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
  216. <div class="right menu">
  217. {{if .ShowRegistrationButton}}
  218. <a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
  219. <i class="octicon octicon-person"></i> {{.i18n.Tr "register"}}
  220. </a>
  221. {{end}}
  222. <a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
  223. <i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
  224. </a>
  225. </div><!-- end anonymous right menu -->
  226. {{end}}
  227. </div><!-- end top menu -->
  228. </div><!-- end column -->
  229. </div><!-- end grid -->
  230. </div><!-- end container -->
  231. </div><!-- end bar -->
  232. {{end}}
  233. {{/*
  234. </div>
  235. </body>
  236. </html>
  237. */}}