{{ with .Site.GetPage "/art" }} {{ range .Param "featured" }}
{{ $filename_without_ext := strings.TrimSuffix (path.Ext .filename) .filename }} {{ $month := "1" }} {{ $year := "1" }} {{ if .date }} {{ $split := split .date "-" }} {{ $month = index $split 1 }} {{ $year = index $split 0 }} {{ end }} {{ $use_newformat := false }} {{ if ge (int $year) 2023 }} {{ $use_newformat = true }} {{ end }} {{ $path := printf "/art/%s/%s/%s" $year $month $filename_without_ext}} {{ $title := .title }} {{ if $use_newformat }} {{ $full := printf "https://images.redstrate.com/thumb/%s.avif" $filename_without_ext }} {{ $jpeg := printf "https://images.redstrate.com/thumb/%s.jpg" $filename_without_ext }} {{ $title }} {{ else }} {{ with resources.Get (printf "art/%s" .filename) }} {{ $image := .Resize "500x" }} {{ $title }} {{ else }}

Thumbnail not found!

{{ end }} {{ end }}
{{ with .title }} "{{ . }}" {{ end }}
{{ end }} {{ end }}
{{ if not (eq (.Scratch.Get "skip_all") "true") }} View all art {{ end }}