all repos — legit @ 7d99afc5cd3ddfc7a875754f4593812b8c2664c8

web frontend for git, written in go

templates: fix 404 and 500
Anirudh Oppiliappan x@icyphox.sh
Mon, 12 Dec 2022 20:53:44 +0530
commit

7d99afc5cd3ddfc7a875754f4593812b8c2664c8

parent

f04137f841de6fefe4c79fedeb718b252a3b2958

4 files changed, 14 insertions(+), 4 deletions(-)

jump to
M templates/404.htmltemplates/404.html

@@ -1,7 +1,9 @@

+{{ define "404" }} <html> <title>404</title> -{{ template "header" . }} +{{ template "head" . }} <body> 404 &mdash; nothing like that here </body> </html> +{{ end }}
M templates/500.htmltemplates/500.html

@@ -1,3 +1,4 @@

+{{ define "500" }} <html> <title>500</title> {{ template "header" . }}

@@ -5,3 +6,4 @@ <body>

500 &mdash; something broke! </body> </html> +{{ end }}
M templates/nav.htmltemplates/nav.html

@@ -1,9 +1,10 @@

{{ define "nav" }} <nav> <ul> - <li>some - <li>thing - <li>here + <li><a href="/">all repos</a> + <li><a href="/{{ .name }}">{{ .name }}</a> + <li><a href="/{{ .name }}/tree/{{ .ref }}/">tree</a> + <li><a href="/{{ .name }}/log/{{ .ref }}">log</a> </ul> </nav> {{ end }}
M templates/repo.htmltemplates/repo.html

@@ -44,6 +44,11 @@ </tr>

{{ end }} {{ end }} </table> + <article> + <pre> + {{- if .readme }}{{ .readme }}{{- end -}} + </pre> + </article> </main> </body> </html>