redstrate.com/themes/red/layouts/_default/gallery.html
2022-08-24 10:40:44 -04:00

40 lines
1.4 KiB
HTML

{{ define "main" }}
<h2>{{ .Title }}</h2>
{{ .Content }}
{{ $art := (index site.Data ($.Param "json")) }}
{{ range $art.categories }}
<h3>{{ .name }}</h3>
<p>{{ .description }}</p>
{{ range sort .years "year" "desc" }}
<h4>{{ .year }}</h4>
{{ range .pieces }}
<figure>
{{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }}
<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>
<figcaption>
"{{ .title }}"
{{ if .newgrounds_url }}
<a href="{{ .newgrounds_url }}">Newgrounds</a>
{{ end }}
{{ if .pixiv_url }}
<a href="{{ .pixiv_url }}">Pixiv</a>
{{ end }}
</figcaption>
</figure>
{{ end }}
{{ end }}
{{ end }}
{{ end }}