aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2023-01-19 22:04:59 +0100
committerJulian Hurst <ark@mansus.space>2023-01-19 22:04:59 +0100
commitde64b0433c42306c4d6d55a926e53d64f96ec51c (patch)
tree63be07b06b15e4ac0a081b4600d9977b9bd635e6
parent903e828eed3233bf6e4962aa71d70d130834d77a (diff)
downloaddocspace-imgs.tar.gz
Add noscript support for imgs via pagingimgs
-rw-r--r--templates/imgs.html13
1 files changed, 12 insertions, 1 deletions
diff --git a/templates/imgs.html b/templates/imgs.html
index 9b584a8..e747034 100644
--- a/templates/imgs.html
+++ b/templates/imgs.html
@@ -2,5 +2,16 @@
{{define "content"}}
<h1>Images</h1>
{{template "imgspage" .}}
- <span>{{.NbFiles}} images</span>
+ <noscript>
+ {{if ne .Page 0}}
+ <a href="/imgs?page={{add .Page -1}}">Previous page</a>
+ {{if lt .End .NbFiles}}
+ |
+ {{end}}
+ {{end}}
+ {{if lt .End .NbFiles}}
+ <a href="/imgs?page={{add .Page 1}}">Next page</a>
+ {{end}}
+ </noscript>
+ <br/><span>{{.NbFiles}} images</span>
{{end}}