diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/404.html | 7 | ||||
-rw-r--r-- | templates/500.html | 7 | ||||
-rw-r--r-- | templates/head.html | 7 | ||||
-rw-r--r-- | templates/nav.html | 9 | ||||
-rw-r--r-- | templates/repo.html | 22 |
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 — 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 — 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 }} |