my-gitea-templates/templates/base/ head.tmpl
140 lines
5.5 KiB

  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}}{{end}}" />
  10. <meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{end}}" />
  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. {{if .RequireTribute}}
  68. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/tribute/tribute.css">
  69. {{end}}
  70. <!-- Stylesheet -->
  71. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/semantic/semantic.min.css">
  72. <link rel="stylesheet" href="{{AppSubUrl}}/css/index.css?v={{MD5 AppVer}}">
  73. <link rel="stylesheet" href="/custom-style.css">
  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. {{if .PageIsUserProfile}}
  96. <meta property="og:title" content="{{.Owner.Name}}" />
  97. <meta property="og:type" content="profile" />
  98. <meta property="og:image" content="{{.Owner.AvatarLink}}" />
  99. <meta property="og:url" content="{{.Owner.HTMLURL}}" />
  100. <meta property="og:site_name" content="{{AppName}}" />
  101. {{else if .Repository}}
  102. <meta property="og:title" content="{{.Repository.Name}}" />
  103. <meta property="og:type" content="object" />
  104. <meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" />
  105. <meta property="og:url" content="{{.Repository.HTMLURL}}" />
  106. {{if .Repository.Description}}
  107. <meta property="og:description" content="{{.Repository.Description}}" />
  108. {{end}}
  109. <meta property="og:site_name" content="{{AppName}}" />
  110. {{end}}
  111. {{template "custom/header" .}}
  112. </head>
  113. <body>
  114. {{template "custom/body_outer_pre" .}}
  115. <div class="full height">
  116. <noscript>{{.i18n.Tr "enable_javascript"}}</noscript>
  117. {{template "custom/body_inner_pre" .}}
  118. {{/*
  119. </div>
  120. </body>
  121. </html>
  122. */}}