2024-09-30 17:40:46 -04:00
|
|
|
{{/* Partial used to display a thumbnail of an artwork. */}}
|
2023-04-13 17:19:53 -04:00
|
|
|
|
2024-10-12 14:59:49 -04:00
|
|
|
{{ $full := printf "%s/thumb/%s.avif" $.Site.Params.image_host .Params.slug }}
|
|
|
|
{{ $jpeg := printf "%s/thumb/%s.jpg" $.Site.Params.image_host .Params.slug }}
|
2024-02-12 19:24:56 -05:00
|
|
|
|
2024-09-30 17:40:46 -04:00
|
|
|
<a aria-label="Gallery Item" class="no-decoration grid-item" href="{{ .RelPermalink }}">
|
2023-04-13 11:45:52 -04:00
|
|
|
|
2024-09-30 17:40:46 -04:00
|
|
|
{{ $title := .Title }}
|
|
|
|
{{ $year := .Date.Format "2006" }}
|
2023-02-10 14:25:28 -05:00
|
|
|
|
2024-09-30 17:40:46 -04:00
|
|
|
{{ with $full }}
|
|
|
|
{{ if $.Params.threed }}
|
|
|
|
{{ with resources.Get "3d.png" }}
|
|
|
|
<img alt="3D cube icon" title="Viewable 3D" style="z-index: 1; position: absolute; left: 10px; top: 10px; border: none" src="{{ .RelPermalink }}">
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ end }}
|
2024-09-30 17:40:46 -04:00
|
|
|
{{ end }}
|
2023-04-13 12:34:39 -04:00
|
|
|
|
2024-09-30 17:40:46 -04:00
|
|
|
{{ if $.Params.comic }}
|
|
|
|
{{ with resources.Get "comic.png" }}
|
|
|
|
<img alt="Comic icon" title="Viewable Comic" style="z-index: 1; position: absolute; left: 10px; top: 10px; border: none" src="{{ .RelPermalink }}">
|
2024-03-31 12:32:05 -04:00
|
|
|
{{ end }}
|
2024-09-30 17:40:46 -04:00
|
|
|
{{ end }}
|
2024-03-31 12:32:05 -04:00
|
|
|
|
2024-09-30 17:40:46 -04:00
|
|
|
{{ if $.Params.animation }}
|
|
|
|
{{ with resources.Get "play-circle.png" }}
|
|
|
|
<img alt="Play animation icon" title="Viewable Animation" style="z-index: 1; position: absolute; left: 10px; top: 10px; border: none" src="{{ .RelPermalink }}">
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2024-09-30 17:40:46 -04:00
|
|
|
|
|
|
|
<picture>
|
|
|
|
<source srcset="{{ $full }}" type="image/avif" width="{{ $.Params.thumb_width }}" height="{{ $.Params.thumb_height }}"/>
|
|
|
|
<img style="width: 100%; height: auto;" alt="{{ $.Params.alt_text }}" title="{{ $title }} ({{ $year }})" width="{{ $.Params.thumb_width }}" height="{{ $.Params.thumb_height }}" src="{{ $jpeg }}"/>
|
|
|
|
</picture>
|
2022-12-28 10:24:59 -05:00
|
|
|
{{ end }}
|
2024-09-30 17:40:46 -04:00
|
|
|
</a>
|
|
|
|
|
2023-04-13 11:45:52 -04:00
|
|
|
|