2023-04-13 11:45:52 -04:00
|
|
|
{{ $base := "art" }}
|
2023-04-13 17:19:53 -04:00
|
|
|
|
2023-04-13 11:45:52 -04:00
|
|
|
{{ if .Params.threed }}
|
2023-04-13 17:19:53 -04:00
|
|
|
{{ $base = "3d" }}
|
2023-04-13 11:45:52 -04:00
|
|
|
{{ end }}
|
|
|
|
|
2023-04-13 12:34:39 -04:00
|
|
|
{{ if .Params.animation }}
|
2023-04-13 17:19:53 -04:00
|
|
|
{{ $base = "animation" }}
|
2023-04-13 12:34:39 -04:00
|
|
|
{{ end }}
|
|
|
|
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ $month := 1 }}
|
|
|
|
{{ $year := 1 }}
|
2022-12-28 10:24:59 -05:00
|
|
|
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ if .Params.date }}
|
|
|
|
{{ $split := split .Params.date "-" }}
|
|
|
|
{{ $year = int (index $split 0) }}
|
|
|
|
{{ $month = int (index $split 3) }}
|
|
|
|
{{ end }}
|
2022-12-28 10:24:59 -05:00
|
|
|
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ $full := "" }}
|
|
|
|
{{ $jpeg := "" }}
|
2024-07-03 15:48:28 -04:00
|
|
|
{{ $full = printf "https://images.redstrate.com/thumb/%s.avif" .Params.slug }}
|
|
|
|
{{ $jpeg = printf "https://images.redstrate.com/thumb/%s.jpg" .Params.slug }}
|
2024-02-12 19:24:56 -05:00
|
|
|
|
|
|
|
{{ if $full }}
|
|
|
|
{{ $filename_without_ext := .Params.slug }}
|
2023-04-13 11:45:52 -04:00
|
|
|
|
2024-02-12 19:24:56 -05:00
|
|
|
<a aria-label="Gallery Item" class="no-decoration grid-item" href="{{ .RelPermalink }}">
|
2023-02-10 14:25:28 -05:00
|
|
|
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ $title := .Params.title }}
|
2023-02-10 14:25:28 -05:00
|
|
|
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ with $full }}
|
|
|
|
{{ if $.Params.threed }}
|
|
|
|
{{ with resources.Get "3d.png" }}
|
2024-02-19 17:54:20 -05:00
|
|
|
<img alt="3D cube icon" title="Viewable 3D" style="z-index: 1; position: absolute; left: 10px; top: 10px; border: none" src="{{ .RelPermalink }}">
|
2023-04-13 12:34:39 -04:00
|
|
|
{{ end }}
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ end }}
|
2023-04-13 12:34:39 -04:00
|
|
|
|
2024-03-31 12:32:05 -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 }}">
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ if $.Params.animation }}
|
|
|
|
{{ with resources.Get "play-circle.png" }}
|
2024-02-19 17:54:20 -05:00
|
|
|
<img alt="Play animation icon" title="Viewable Animation" style="z-index: 1; position: absolute; left: 10px; top: 10px; border: none" src="{{ .RelPermalink }}">
|
2023-04-13 12:34:39 -04:00
|
|
|
{{ end }}
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ end }}
|
2023-04-13 18:38:37 -04:00
|
|
|
|
2024-07-03 15:48:28 -04:00
|
|
|
<picture>
|
2024-09-29 18:50:45 -04:00
|
|
|
<source srcset="{{ $full }}" type="image/avif" width="{{ $.Params.thumb_width }}" height="{{ $.Params.thumb_height }}"/>
|
2024-09-29 21:08:30 -04:00
|
|
|
<img style="width: 100%; height: auto;" alt="{{ $.Params.alt_text }}" title="{{ $title }} ({{$year}})" width="{{ $.Params.thumb_width }}" height="{{ $.Params.thumb_height }}" src="{{ $jpeg }}"/>
|
2024-07-03 15:48:28 -04:00
|
|
|
</picture>
|
2024-02-12 19:24:56 -05:00
|
|
|
{{ else }}
|
|
|
|
<p>Thumbnail not found!</p>
|
|
|
|
{{ end }}
|
2023-04-13 17:19:53 -04:00
|
|
|
</a>
|
2022-12-28 10:24:59 -05:00
|
|
|
{{ else }}
|
2024-07-03 15:48:28 -04:00
|
|
|
<em>CANNOT FIND {{ .Params.slug }}</em>
|
2022-12-28 10:24:59 -05:00
|
|
|
{{ end }}
|
2023-04-13 11:45:52 -04:00
|
|
|
|