templates: add title tags
Anirudh Oppiliappan x@icyphox.sh
Sun, 18 Dec 2022 11:14:38 +0530
5 files changed,
14 insertions(+),
0 deletions(-)
M
routes/routes.go
→
routes/routes.go
@@ -173,6 +173,7 @@ data := make(map[string]any)
data["name"] = name data["ref"] = ref data["desc"] = getDescription(path) + data["path"] = treePath d.showFile(contents, data, w) return
M
templates/file.html
→
templates/file.html
@@ -1,6 +1,7 @@
{{ define "file" }} <html> {{ template "head" . }} + <title>{{.name }} — {{ .path }}</title> {{ template "repoheader" . }} <body>
M
templates/index.html
→
templates/index.html
@@ -2,6 +2,10 @@ {{ define "index" }}
<html> {{ template "head" . }} + <title> + {{ .meta.Title }} + </title> + <header> <h1>{{ .meta.Title }}</h1> <h2>{{ .meta.Description }}</h2>
M
templates/log.html
→
templates/log.html
@@ -2,6 +2,10 @@ {{ define "log" }}
<html> {{ template "head" . }} + <title> + {{ .name }} — log + </title> + {{ template "repoheader" . }} <body> {{ template "nav" . }}
M
templates/refs.html
→
templates/refs.html
@@ -2,6 +2,10 @@ {{ define "refs" }}
<html> {{ template "head" . }} + <title> + {{ .name }} — refs + </title> + {{ template "repoheader" . }} <body> {{ template "nav" . }}