summaryrefslogtreecommitdiff
path: root/templates/img.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/img.html')
-rw-r--r--templates/img.html13
1 files changed, 13 insertions, 0 deletions
diff --git a/templates/img.html b/templates/img.html
new file mode 100644
index 0000000..27bd439
--- /dev/null
+++ b/templates/img.html
@@ -0,0 +1,13 @@
+{{define "imgs"}}
+{{range $index, $value := .Imgs}}
+{{ if and (not $.IsLastPage) (isLast $index $.Imgs) }}
+<div class="img" hx-get="/imgs?page={{$.Page}}&meltee={{$.Meltee}}&char={{$.Char}}&set={{$.Set}}" hx-trigger="revealed" hx-swap="afterend" src="/{{$value.Path}}" alt="{{$value.Name}}">
+{{else}}
+<div class="img">
+{{end}}
+<a href="/{{$value.Path}}" target="_blank">
+<img src="/{{$value.Path}}" alt="{{$value.Name}}">
+</a>
+</div>
+{{end}}
+{{end}}