summaryrefslogtreecommitdiffstats
path: root/templates/base/head.tmpl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2024-10-18 20:33:49 +0200
committerDaniel Baumann <daniel@debian.org>2024-12-12 23:57:56 +0100
commite68b9d00a6e05b3a941f63ffb696f91e554ac5ec (patch)
tree97775d6c13b0f416af55314eb6a89ef792474615 /templates/base/head.tmpl
parentInitial commit. (diff)
downloadforgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.tar.xz
forgejo-e68b9d00a6e05b3a941f63ffb696f91e554ac5ec.zip
Adding upstream version 9.0.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
Diffstat (limited to 'templates/base/head.tmpl')
-rw-r--r--templates/base/head.tmpl50
1 files changed, 50 insertions, 0 deletions
diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl
new file mode 100644
index 0000000..7753f49
--- /dev/null
+++ b/templates/base/head.tmpl
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<html lang="{{ctx.Locale.Lang}}" data-theme="{{ThemeName .SignedUser}}">
+<head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ {{/* Display `- .Repository.FullName` only if `.Title` does not already start with that. */}}
+ <title>{{if .Title}}{{.Title}} - {{end}}{{if and (.Repository.Name) (not (StringUtils.HasPrefix .Title .Repository.FullName))}}{{.Repository.FullName}} - {{end}}{{AppDisplayName}}</title>
+ {{if .ManifestData}}<link rel="manifest" href="data:{{.ManifestData}}">{{end}}
+ <meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}">
+ <meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}">
+ <meta name="keywords" content="{{MetaKeywords}}">
+ <meta name="referrer" content="no-referrer">
+{{if .GoGetImport}}
+ <meta name="go-import" content="{{.GoGetImport}} git {{.RepoCloneLink.HTTPS}}">
+ <meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
+{{end}}
+{{if and .EnableFeed .FeedURL}}
+ <link rel="alternate" type="application/atom+xml" title="" href="{{.FeedURL}}.atom">
+ <link rel="alternate" type="application/rss+xml" title="" href="{{.FeedURL}}.rss">
+{{end}}
+ <link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml">
+ <link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
+ {{template "base/head_script" .}}
+ <noscript>
+ <style>
+ .dropdown:hover > .menu { display: block; }
+ .ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
+ </style>
+ </noscript>
+ {{template "base/head_opengraph" .}}
+ {{template "base/head_style" .}}
+ {{template "custom/header" .}}
+</head>
+<body hx-headers='{"x-csrf-token": "{{.CsrfToken}}"}' hx-swap="outerHTML" hx-ext="morph" hx-push-url="false">
+ {{template "custom/body_outer_pre" .}}
+
+ <div class="full height">
+ <noscript>{{ctx.Locale.Tr "enable_javascript"}}</noscript>
+
+ {{template "custom/body_inner_pre" .}}
+
+ {{if not .PageIsInstall}}
+ {{template "base/head_navbar" .}}
+ {{end}}
+
+{{if false}}
+ {{/* to make html structure "likely" complete to prevent IDE warnings */}}
+ </div>
+</body>
+</html>
+{{end}}