gitea源码

head.tmpl 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE html>
  2. <html lang="{{ctx.Locale.Lang}}" data-theme="{{UserThemeName .SignedUser}}">
  3. <head>
  4. <meta name="viewport" content="width=device-width, initial-scale=1">
  5. <title>{{if .Title}}{{.Title}} - {{end}}{{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}}</title>
  6. {{if .ManifestData}}<link rel="manifest" href="data:{{.ManifestData}}">{{end}}
  7. <meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}">
  8. <meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}">
  9. <meta name="keywords" content="{{MetaKeywords}}">
  10. <meta name="referrer" content="no-referrer">
  11. {{if .GoGetImport}}
  12. <meta name="go-import" content="{{.GoGetImport}} git {{.RepoCloneLink.HTTPS}}">
  13. <meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
  14. {{end}}
  15. {{if and .EnableFeed .FeedURL}}
  16. <link rel="alternate" type="application/atom+xml" title="" href="{{.FeedURL}}.atom">
  17. <link rel="alternate" type="application/rss+xml" title="" href="{{.FeedURL}}.rss">
  18. {{end}}
  19. <link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml">
  20. <link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
  21. {{template "base/head_opengraph" .}}
  22. {{template "base/head_style" .}}
  23. {{template "base/head_script" .}}
  24. {{template "custom/header" .}}
  25. </head>
  26. <body hx-headers='{"x-csrf-token": "{{.CsrfToken}}"}' hx-swap="outerHTML" hx-ext="morph" hx-push-url="false">
  27. {{template "custom/body_outer_pre" .}}
  28. <div class="full height">
  29. <noscript>{{ctx.Locale.Tr "enable_javascript"}}</noscript>
  30. {{template "custom/body_inner_pre" .}}
  31. {{if not .PageIsInstall}}
  32. {{template "base/head_navbar" .}}
  33. {{end}}
  34. {{if false}}
  35. {{/* to make html structure "likely" complete to prevent IDE warnings */}}
  36. </div>
  37. </body>
  38. </html>
  39. {{end}}