Restructure gallery

This commit is contained in:
Joshua Goins 2022-08-24 10:40:44 -04:00
parent f7a457c24e
commit 59ee14a7d6

View file

@ -15,26 +15,26 @@
<figure> <figure>
{{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }} {{ $full := resources.Get (printf "%s/%s" ($.Param "json") .filename) }}
<a href="{{ $full.Permalink }}"> <a href="{{ $full.Permalink }}">
{{ if $.Params.thumbnails }} {{ if $.Params.thumbnails }}
{{ $thumb := resources.Get (printf "%s-thumbs/%s" ($.Param "json") .filename) }} {{ $thumb := resources.Get (printf "%s-thumbs/%s" ($.Param "json") .filename) }}
<img alt="{{ .title }}" width="128px" height="128px" src="{{ $thumb.Permalink }}"/> <img alt="{{ .title }}" width="128px" height="128px" src="{{ $thumb.Permalink }}"/>
{{ else }} {{ else }}
<img alt="{{ .title }}" src="{{ $full.Permalink }}"/> <img alt="{{ .title }}" src="{{ $full.Permalink }}"/>
{{ end }} {{ end }}
</a> </a>
<figcaption> <figcaption>
"{{ .title }}" "{{ .title }}"
{{ if .newgrounds_url }} {{ if .newgrounds_url }}
<a href="{{ .newgrounds_url }}">Newgrounds</a> <a href="{{ .newgrounds_url }}">Newgrounds</a>
{{ end }} {{ end }}
{{ if .pixiv_url }} {{ if .pixiv_url }}
<a href="{{ .pixiv_url }}">Pixiv</a> <a href="{{ .pixiv_url }}">Pixiv</a>
{{ end }} {{ end }}
</figcaption> </figcaption>
</figure> </figure>
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}