summaryrefslogtreecommitdiff
path: root/templates/img.html
blob: 27bd439987eb32063bc497d9b0fc036790fd119d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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}}