aboutsummaryrefslogtreecommitdiff
path: root/templates/imgs_page.html
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2023-01-15 02:16:35 +0100
committerJulian Hurst <ark@mansus.space>2023-01-15 02:16:35 +0100
commit09a34dda989df0f74bbfcd11ac63254d61b92a18 (patch)
treea62769481ceea1cd235b60c930a50e7a7c5a49e0 /templates/imgs_page.html
parent7d502441a6bd210aff8a8625ee87ea5a1fbbd7ee (diff)
downloaddocspace-09a34dda989df0f74bbfcd11ac63254d61b92a18.tar.gz
Add images support (inf scroll via htmx of images taken from user docs)
This commit also includes a migration from css to scss, some improvements to the redirection workflow when no session is found and refactors concerning flash cookies.
Diffstat (limited to 'templates/imgs_page.html')
-rw-r--r--templates/imgs_page.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/imgs_page.html b/templates/imgs_page.html
new file mode 100644
index 0000000..665daf3
--- /dev/null
+++ b/templates/imgs_page.html
@@ -0,0 +1,17 @@
+{{define "imgspage"}}
+{{range $i, $img := .Imgs}}
+ {{if eq (add $i $.Start) $.End}}
+ <div hx-get="/imgs?page={{add $.Page 1}}&fragment"
+ hx-trigger="revealed"
+ hx-swap="afterend">
+ <span>{{$img.Name}}</span><br/>
+ <a href="{{$img.Link}}"><img src="{{$img.Link}}" /></a><br/>
+ {{else}}
+ <div>
+ <span>{{$img.Name}}</span><br/>
+ <a href="{{$img.Link}}"><img src="{{$img.Link}}" /></a><br/>
+ {{end}}
+ <hr/>
+ </div>
+{{end}}
+{{end}}