summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-12 20:53:44 +0530
committerLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-12 20:53:44 +0530
commit7d99afc5cd3ddfc7a875754f4593812b8c2664c8 (patch)
tree3aacd1f8f1b45e38f4d378d1df8eeb13f7e213ba /templates
parentf04137f841de6fefe4c79fedeb718b252a3b2958 (diff)
downloadlegit-7d99afc5cd3ddfc7a875754f4593812b8c2664c8.tar.gz
legit-7d99afc5cd3ddfc7a875754f4593812b8c2664c8.tar.bz2
legit-7d99afc5cd3ddfc7a875754f4593812b8c2664c8.zip
templates: fix 404 and 500
Diffstat (limited to '')
-rw-r--r--templates/404.html4
-rw-r--r--templates/500.html2
-rw-r--r--templates/nav.html7
-rw-r--r--templates/repo.html5
4 files changed, 14 insertions, 4 deletions
diff --git a/templates/404.html b/templates/404.html
index c3825f4..931ea9b 100644
--- a/templates/404.html
+++ b/templates/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 }}
diff --git a/templates/500.html b/templates/500.html
index 919f26c..5495d31 100644
--- a/templates/500.html
+++ b/templates/500.html
@@ -1,3 +1,4 @@
+{{ define "500" }}
<html>
<title>500</title>
{{ template "header" . }}
@@ -5,3 +6,4 @@
500 &mdash; something broke!
</body>
</html>
+{{ end }}
diff --git a/templates/nav.html b/templates/nav.html
index 7568f01..20dca50 100644
--- a/templates/nav.html
+++ b/templates/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 }}
diff --git a/templates/repo.html b/templates/repo.html
index 3c99df5..a033f0d 100644
--- a/templates/repo.html
+++ b/templates/repo.html
@@ -44,6 +44,11 @@
{{ end }}
{{ end }}
</table>
+ <article>
+ <pre>
+ {{- if .readme }}{{ .readme }}{{- end -}}
+ </pre>
+ </article>
</main>
</body>
</html>