templates: fix 404 and 500

This commit is contained in:
Anirudh Oppiliappan 2022-12-12 20:53:44 +05:30
parent f04137f841
commit 7d99afc5cd
No known key found for this signature in database
GPG Key ID: 8A93F96F78C5D4C4
4 changed files with 14 additions and 4 deletions

View File

@ -1,7 +1,9 @@
{{ define "404" }}
<html> <html>
<title>404</title> <title>404</title>
{{ template "header" . }} {{ template "head" . }}
<body> <body>
404 &mdash; nothing like that here 404 &mdash; nothing like that here
</body> </body>
</html> </html>
{{ end }}

View File

@ -1,3 +1,4 @@
{{ define "500" }}
<html> <html>
<title>500</title> <title>500</title>
{{ template "header" . }} {{ template "header" . }}
@ -5,3 +6,4 @@
500 &mdash; something broke! 500 &mdash; something broke!
</body> </body>
</html> </html>
{{ end }}

View File

@ -1,9 +1,10 @@
{{ define "nav" }} {{ define "nav" }}
<nav> <nav>
<ul> <ul>
<li>some <li><a href="/">all repos</a>
<li>thing <li><a href="/{{ .name }}">{{ .name }}</a>
<li>here <li><a href="/{{ .name }}/tree/{{ .ref }}/">tree</a>
<li><a href="/{{ .name }}/log/{{ .ref }}">log</a>
</ul> </ul>
</nav> </nav>
{{ end }} {{ end }}

View File

@ -44,6 +44,11 @@
{{ end }} {{ end }}
{{ end }} {{ end }}
</table> </table>
<article>
<pre>
{{- if .readme }}{{ .readme }}{{- end -}}
</pre>
</article>
</main> </main>
</body> </body>
</html> </html>