all repos — legit @ 7fe98772b079cca83b854e8f8a6be5dc55c10483

legit - simple git web interface in go (fork)

templates: add title tags
Anirudh Oppiliappan x@icyphox.sh
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEE/huPz+bBYiLxVxyOipP5b3jF1MQFAmOeqM4ACgkQipP5b3jF
1MQz6gf/WNybltcweKUrOE5ZMkl1gYW4YCZM9oikI/a/TauFMOrDThTItM5OO5Y+
wDZUZsWUVHW35ejHsYRQPKUzMXOceBBK6HscKk/IgItlRWUndredcHqlZVp3gliK
BZrMgyu7opzrZAvVOfvGTkPF4hHikU+MqUJC69ROl1KHSwfNoX524Sa7Zmq/cny1
K+B5JvV9FqemhGUJOwuX+K6h0iZOUVrwUheCU7h2AZrdGzMhm4OiB3Vdv30mQLxm
tNOnFXU+j08Ai0sTUpEHYxbV75EHxZA7VzI56XRIoazvKAKF0VuBVQ1I2ppp33cD
qrfVwbmzrKrOsfS6B5SvATmYVXQO8w==
=RRwV
-----END PGP SIGNATURE-----
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" . }}