summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-17 12:46:09 +0530
committerLibravatar Anirudh Oppiliappan <x@icyphox.sh>2022-12-17 12:46:57 +0530
commit9649b3ed2b252cab6ab4076d58814790582f07f0 (patch)
tree9af97b2edfb543ea96fd3d647c98763f1f52a905 /templates
parentd083d5d72e4bf496b8152d14986818a5b63fe301 (diff)
downloadlegit-9649b3ed2b252cab6ab4076d58814790582f07f0.tar.gz
legit-9649b3ed2b252cab6ab4076d58814790582f07f0.tar.bz2
legit-9649b3ed2b252cab6ab4076d58814790582f07f0.zip
templates: index rework
Diffstat (limited to 'templates')
-rw-r--r--templates/404.html6
-rw-r--r--templates/500.html6
-rw-r--r--templates/head.html1
-rw-r--r--templates/index.html27
-rw-r--r--templates/nav.html10
5 files changed, 28 insertions, 22 deletions
diff --git a/templates/404.html b/templates/404.html
index 931ea9b..8c40cd1 100644
--- a/templates/404.html
+++ b/templates/404.html
@@ -3,7 +3,11 @@
<title>404</title>
{{ template "head" . }}
<body>
- 404 &mdash; nothing like that here
+ {{ template "nav" . }}
+ <main>
+ <h3>404 &mdash; nothing like that here.</h3>
+ </main>
</body>
+
</html>
{{ end }}
diff --git a/templates/500.html b/templates/500.html
index 72e784c..53c605f 100644
--- a/templates/500.html
+++ b/templates/500.html
@@ -3,7 +3,11 @@
<title>500</title>
{{ template "head" . }}
<body>
- 500 &mdash; something broke!
+ {{ template "nav" . }}
+ <main>
+ <h3>500 &mdash; something broke!</h3>
+ </main>
</body>
+
</html>
{{ end }}
diff --git a/templates/head.html b/templates/head.html
index a128b6b..81ee777 100644
--- a/templates/head.html
+++ b/templates/head.html
@@ -3,6 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/static/style.css" type="text/css">
+ <link rel="stylesheet" href="https://cdn.icyphox.sh/fonts/inter.css" type="text/css">
<!-- other meta tags here -->
</head>
{{ end }}
diff --git a/templates/index.html b/templates/index.html
index 3ab82c7..690e2e1 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -7,22 +7,19 @@
<h2>{{ .meta.Description }}</h2>
</header>
<body>
- {{ template "nav" . }}
<main>
- <table>
- <tr>
- <td>repository</td>
- <td>description</td>
- <td>last active</td>
- </tr>
- {{ range .info }}
- <tr>
- <td><a href="/{{ .Name }}">{{ .Name }}</a></td>
- <td>{{ .Desc }}</td>
- <td>{{ .Idle }}</td>
- </tr>
- {{ end }}
- </table>
+ <div class="repo-index-headings small-heading">
+ <div>repository</div>
+ <div>description</div>
+ <div>idle</div>
+ </div>
+ <div class="repo-index">
+ {{ range .info }}
+ <div><a href="/{{ .Name }}">{{ .Name }}</a></div>
+ <div>{{ .Desc }}</div>
+ <div>{{ .Idle }}</div>
+ {{ end }}
+ </div>
</main>
</body>
</html>
diff --git a/templates/nav.html b/templates/nav.html
index 973eae2..d0d384d 100644
--- a/templates/nav.html
+++ b/templates/nav.html
@@ -4,12 +4,12 @@
<li><a href="/">all repos</a>
{{ if .name }}
<li><a href="/{{ .name }}">{{ .name }}</a>
- {{ end }}
- {{ if .ref }}
- <li><a href="/{{ .name }}/tree/{{ .ref }}/">tree</a>
- <li><a href="/{{ .name }}/log/{{ .ref }}">log</a>
- {{ end }}
<li><a href="/{{ .name }}/refs">refs</a>
+ {{ if .ref }}
+ <li><a href="/{{ .name }}/tree/{{ .ref }}/">tree</a>
+ <li><a href="/{{ .name }}/log/{{ .ref }}">log</a>
+ {{ end }}
+ {{ end }}
</ul>
</nav>
{{ end }}