head.tmpl 5.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. <noscript>
  74. <style>
  75. .dropdown:hover > .menu { display: block; }
  76. .ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
  77. </style>
  78. </noscript>
  79. {{if .RequireHighlightJS}}
  80. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/highlight/github.css">
  81. {{end}}
  82. {{if .RequireMinicolors}}
  83. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/jquery.minicolors/jquery.minicolors.css">
  84. {{end}}
  85. {{if .RequireDatetimepicker}}
  86. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.css">
  87. {{end}}
  88. {{if .RequireDropzone}}
  89. <link rel="stylesheet" href="{{AppSubUrl}}/vendor/plugins/dropzone/dropzone.css">
  90. {{end}}
  91. <style class="list-search-style"></style>
  92. <script src="{{AppSubUrl}}/vendor/plugins/cssrelpreload/loadCSS.min.js"></script>
  93. <script src="{{AppSubUrl}}/vendor/plugins/cssrelpreload/cssrelpreload.min.js"></script>
  94. {{if .PageIsUserProfile}}
  95. <meta property="og:title" content="{{.Owner.Name}}" />
  96. <meta property="og:type" content="profile" />
  97. <meta property="og:image" content="{{.Owner.AvatarLink}}" />
  98. <meta property="og:url" content="{{.Owner.HTMLURL}}" />
  99. <meta property="og:site_name" content="{{AppName}}" />
  100. {{else if .Repository}}
  101. <meta property="og:title" content="{{.Repository.Name}}" />
  102. <meta property="og:type" content="object" />
  103. <meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" />
  104. <meta property="og:url" content="{{.Repository.HTMLURL}}" />
  105. {{if .Repository.Description}}
  106. <meta property="og:description" content="{{.Repository.Description}}" />
  107. {{end}}
  108. <meta property="og:site_name" content="{{AppName}}" />
  109. {{end}}
  110. {{template "custom/header" .}}
  111. </head>
  112. <body>
  113. {{template "custom/body_outer_pre" .}}
  114. <div class="full height">
  115. <noscript>{{.i18n.Tr "enable_javascript"}}</noscript>
  116. {{template "custom/body_inner_pre" .}}
  117. {{/*
  118. </div>
  119. </body>
  120. </html>
  121. */}}