blob: 3825f16b934aa66f4cb9f1c4f2c9a75b38fb742e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
{{ with .Params.album }}
<section class="gallery flex relative my-3 mx-auto">
{{ range $id, $val := readDir (printf "/assets/media/albums/%s" (string .)) }}
{{ with resources.Get (printf "media/albums/%s/%s" $.Params.album $val.Name) }}
<div class="">
<input
type="radio"
id="img-{{ $id }}"
checked
name="gallery"
class="absolute hidden"
/>
<img
class="transition-opacity duration-300 absolute top-0 left-0 opacity-0"
src="{{ (.Fill "1152x768").RelPermalink }}"
alt=""
loading="lazy"
/>
<label for="img-{{ $id }}" class="block m-2 p-2">
<img
src="{{ (.Fill "150x100").RelPermalink }}"
alt=""
loading="lazy"
/>
</label>
</div>
{{ end }}
{{ end }}
</section>
{{ end }}
|