aboutsummaryrefslogtreecommitdiff
path: root/templates/head.html
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2024-07-27 08:00:00 +0800
committerRunxi Yu <me@runxiyu.org>2024-07-27 08:00:00 +0800
commit7e04040e3510370d754c4afa94d78da24b43d13e (patch)
tree6613ec1419aa64cab78ff89d4d026ff7a8e74a23 /templates/head.html
parentSome more HTML sanities (diff)
downloadlegitrx-7e04040e3510370d754c4afa94d78da24b43d13e.tar.gz
legitrx-7e04040e3510370d754c4afa94d78da24b43d13e.tar.zst
legitrx-7e04040e3510370d754c4afa94d78da24b43d13e.zip
More HTML sanification
Diffstat (limited to 'templates/head.html')
-rw-r--r--templates/head.html37
1 files changed, 8 insertions, 29 deletions
diff --git a/templates/head.html b/templates/head.html
index f2a3bda..ec53412 100644
--- a/templates/head.html
+++ b/templates/head.html
@@ -1,30 +1,9 @@
-{{ define "head" }}
-<head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <link rel="stylesheet" href="/static/style.css" type="text/css" />
- <link rel="icon" type="image/png" size="32x32" href="/static/legit.png" />
- {{ if .parent }}
- <title>{{ .meta.Title }} &mdash; {{ .name }} ({{ .ref }}): {{ .parent }}/</title>
- {{ else if .path }}
- <title>{{ .meta.Title }} &mdash; {{ .name }} ({{ .ref }}): {{ .path }}</title>
- {{ else if .files }}
- <title>{{ .meta.Title }} &mdash; {{ .name }} ({{ .ref }})</title>
- {{ else if .commit }}
- <title>{{ .meta.Title }} &mdash; {{ .name }}: {{ .commit.This }}</title>
- {{ else if .branches }}
- <title>{{ .meta.Title }} &mdash; {{ .name }}: refs</title>
- {{ else if .commits }}
- {{ if .log }}
- <title>{{ .meta.Title }} &mdash; {{ .name }}: log</title>
- {{ else }}
- <title>{{ .meta.Title }} &mdash; {{ .name }}</title>
- {{ end }}
- {{ else }}
- <title>{{ .meta.Title }}</title>
- {{ end }}
- {{ if and .servername .gomod }}
- <meta name="go-import" content="{{ .servername}}/{{ .name }} git https://{{ .servername }}/{{ .name }}">
- {{ end }}
-</head>
+{{ define "generichead" }}
+<meta charset="utf-8" />
+<meta name="viewport" content="width=device-width, initial-scale=1" />
+<link rel="stylesheet" href="/static/style.css" type="text/css" />
+<link rel="icon" type="image/png" size="32x32" href="/static/legit.png" />
+{{ if and .servername .gomod }}
+ <meta name="go-import" content="{{ .servername}}/{{ .name }} git https://{{ .servername }}/{{ .name }}">
+{{ end }}
{{ end }}