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

41 lines
1.5 KiB
HTML
Raw Normal View History

2022-08-02 14:05:56 -04:00
{{ define "main" }}
<h2>{{ .Title }}</h2>
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 }}
2022-08-24 10:31:12 -04:00
<h3>{{ .name }}</h3>
<p>{{ .description }}</p>
2022-08-03 13:38:29 -04:00
{{ range sort .years "year" "desc" }}
2022-08-24 10:31:12 -04:00
<h4>{{ .year }}</h4>
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
<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
<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 }}
2022-08-02 14:05:56 -04:00
{{ end }}
{{ end }}
{{ end }}