diff options
| author | Julian Hurst <ark@mansus.space> | 2025-04-14 01:49:03 +0200 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2025-04-14 01:49:03 +0200 |
| commit | 6b57b3f77cec3165ef2224b4345b2c23dbb89684 (patch) | |
| tree | 1f246c73fb9e0ab50d6252074260c8f6aca2be36 /templates/img.html | |
| download | grimg-6b57b3f77cec3165ef2224b4345b2c23dbb89684.tar.gz | |
Diffstat (limited to 'templates/img.html')
| -rw-r--r-- | templates/img.html | 13 |
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}} |
