aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials/image-gallery.html
blob: 5e5b874ebcd73e311845b90c2a7b597c78f1535a (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
{{ 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=""
          />
          <label for="img-{{ $id }}" class="gallery__thumb">
            <img src="{{ (.Fill "150x100").Permalink }}" alt="" />
          </label>
        </div>
      {{ end }}
    {{ end }}
  </section>
{{ end }}