about summary refs log tree commit diff homepage
path: root/templates
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-06-28 01:08:31 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-06-28 01:08:31 +0900
commitb2195e98804c404e80a5cc4e649d4e59f0d40be7 (patch)
treeaaedb7e0b7ef2ab5a9e35a17f543964a88b2c024 /templates
parentdd5e634482c2747d4514b784ec8dded9c7fa29cf (diff)
downloadphylactery-b2195e98804c404e80a5cc4e649d4e59f0d40be7.tar.gz
Fix adjacent links
Diffstat (limited to 'templates')
-rw-r--r--templates/archive.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/archive.html b/templates/archive.html
index c0cc144..3b20ae9 100644
--- a/templates/archive.html
+++ b/templates/archive.html
@@ -5,10 +5,12 @@
 <link rel=stylesheet href=/static/archive.css>
 <title>{{.Title}}</title>
 <body>
-  <nav>
-    <a id=prev href="{{.Prev}}">PREV</a>
-    <a id=up href=.>UP</a>
-    <a id=next href="{{.Next}}">NEXT</a>
+  <nav>{{if .Prev}}
+    <a id=prev href="{{.Prev}}">PREV</a>{{else}}
+    <a id=prev></a>{{end}}
+    <a id=up href=.>UP</a>{{if .Next}}
+    <a id=next href="{{.Next}}">NEXT</a>{{else}}
+    <a id=next></a>{{end}}
   </nav>
   <main>{{range .Entries}}
     <img src="?entry={{.Index}}" alt="{{.Name}}">{{end}}