summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-11 11:22:47 +0530
committerLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-11 11:22:47 +0530
commit856f66808b913baff13c815daec3cdde7121e3bd (patch)
tree60feca35e702d20a0ec8da208b6b59926470bf31 /templates
downloadlegit-856f66808b913baff13c815daec3cdde7121e3bd.tar.gz
legit-856f66808b913baff13c815daec3cdde7121e3bd.tar.bz2
legit-856f66808b913baff13c815daec3cdde7121e3bd.zip
all: init
Diffstat (limited to 'templates')
-rw-r--r--templates/404.html7
-rw-r--r--templates/500.html7
-rw-r--r--templates/head.html7
-rw-r--r--templates/nav.html9
-rw-r--r--templates/repo.html22
5 files changed, 52 insertions, 0 deletions
diff --git a/templates/404.html b/templates/404.html
new file mode 100644
index 0000000..c3825f4
--- /dev/null
+++ b/templates/404.html
@@ -0,0 +1,7 @@
+<html>
+ <title>404</title>
+{{ template "header" . }}
+ <body>
+ 404 &mdash; nothing like that here
+ </body>
+</html>
diff --git a/templates/500.html b/templates/500.html
new file mode 100644
index 0000000..919f26c
--- /dev/null
+++ b/templates/500.html
@@ -0,0 +1,7 @@
+<html>
+ <title>500</title>
+{{ template "header" . }}
+ <body>
+ 500 &mdash; something broke!
+ </body>
+</html>
diff --git a/templates/head.html b/templates/head.html
new file mode 100644
index 0000000..3739342
--- /dev/null
+++ b/templates/head.html
@@ -0,0 +1,7 @@
+{{ define "head" }}
+ <head>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <!-- other meta tags here -->
+ </head>
+{{ end }}
diff --git a/templates/nav.html b/templates/nav.html
new file mode 100644
index 0000000..7568f01
--- /dev/null
+++ b/templates/nav.html
@@ -0,0 +1,9 @@
+{{ define "nav" }}
+ <nav>
+ <ul>
+ <li>some
+ <li>thing
+ <li>here
+ </ul>
+ </nav>
+{{ end }}
diff --git a/templates/repo.html b/templates/repo.html
new file mode 100644
index 0000000..e388de3
--- /dev/null
+++ b/templates/repo.html
@@ -0,0 +1,22 @@
+{{ define "repo" }}
+<html>
+{{ template "head" . }}
+
+ <header>
+ <h1>{{ .meta.Title }}</h1>
+ <h2>{{ .meta.Description }}</h2>
+ </header>
+ <body>
+ {{ template "nav" . }}
+ <main>
+ {{ range .files }}
+ {{ if .IsFile }}
+ <p>{{ .Mode }} {{ .Name }} {{ .Size }} </p>
+ {{ else }}
+ <p>d-------- {{ .Name}}/</p>
+ {{ end }}
+ {{ end }}
+ </main>
+ </body>
+</html>
+{{ end }}