blob: d3a5fae28709069a484a13ba9190209a665d7603 (
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">
{{ range $id, $val := readDir (printf "/assets/media/albums/%s" (string .)) }}
{{ with resources.Get (printf "media/albums/%s/%s" $.Params.album $val.Name) }}
<div class="gallery__item">
<input
type="radio"
id="img-{{ $id }}"
checked
name="gallery"
class="gallery__selector"
/>
<img
class="gallery__img"
src="{{ (.Fill "1152x768").Permalink }}"
alt=""
loading="lazy"
/>
<label for="img-{{ $id }}" class="gallery__thumb">
<img
src="{{ (.Fill "150x100").Permalink }}"
alt=""
loading="lazy"
/>
</label>
</div>
{{ end }}
{{ end }}
</section>
{{ end }}
|