redstrate.com/themes/red/layouts/_default/gallery.html

31 lines
1 KiB
HTML
Raw Normal View History

2022-08-02 14:05:56 -04:00
{{ define "main" }}
2022-08-03 13:38:29 -04:00
{{ .Content }}
2022-08-02 14:05:56 -04:00
{{ $art := (index site.Data ($.Param "json")) }}
2022-08-02 14:05:56 -04:00
2022-08-03 13:38:29 -04:00
{{ range $art.categories }}
<h2>{{ .name }}</h2>
<p>{{ .description }}</p>
2022-08-03 13:38:29 -04:00
{{ range sort .years "year" "desc" }}
<h3>{{ .year }}</h3>
2022-08-03 13:38:29 -04:00
{{ range .pieces }}
2022-08-22 17:04:33 -04:00
<figure>
{{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }}
2022-08-02 14:05:56 -04:00
2022-08-22 17:04:33 -04:00
<a href="{{ $full.Permalink }}">
{{ if $.Params.thumbnails }}
{{ $thumb := resources.Get (printf "%s-thumbs/%s" ($.Param "json") .filename) }}
<img alt="{{ .title }}" width="128px" height="128px" src="{{ $thumb.Permalink }}"/>
{{ else }}
<img alt="{{ .title }}" src="{{ $full.Permalink }}"/>
{{ end }}
</a>
2022-08-03 13:38:29 -04:00
2022-08-22 17:04:33 -04:00
<figcaption>"{{ .title }}"</figcaption>
</figure>
2022-08-03 13:38:29 -04:00
{{ end }}
2022-08-02 14:05:56 -04:00
{{ end }}
{{ end }}
{{ end }}