Install gitea with systemd
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.

head.tmpl 12KB

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