all repos — legit @ 7fe98772b079cca83b854e8f8a6be5dc55c10483

web frontend for git

templates: add title tags
Anirudh Oppiliappan x@icyphox.sh
Sun, 18 Dec 2022 11:14:38 +0530
commit

7fe98772b079cca83b854e8f8a6be5dc55c10483

parent

5ea7cae973e8329ae768c35bda41e656f974815d

5 files changed, 14 insertions(+), 0 deletions(-)

jump to
M routes/routes.goroutes/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.htmltemplates/file.html

@@ -1,6 +1,7 @@

{{ define "file" }} <html> {{ template "head" . }} + <title>{{.name }} &mdash; {{ .path }}</title> {{ template "repoheader" . }} <body>
M templates/index.htmltemplates/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.htmltemplates/log.html

@@ -2,6 +2,10 @@ {{ define "log" }}

<html> {{ template "head" . }} + <title> + {{ .name }} &mdash; log + </title> + {{ template "repoheader" . }} <body> {{ template "nav" . }}
M templates/refs.htmltemplates/refs.html

@@ -2,6 +2,10 @@ {{ define "refs" }}

<html> {{ template "head" . }} + <title> + {{ .name }} &mdash; refs + </title> + {{ template "repoheader" . }} <body> {{ template "nav" . }}