{{ $base := "art" }} {{ if .Params.threed }} {{ $base = "3d" }} {{ end }} {{ if .Params.animation }} {{ $base = "animation" }} {{ end }} {{ $full := resources.Get (printf "%s/%s.webp" $base .Params.slug) }} {{ if $full }} {{ $filename_without_ext := .Params.slug }} {{ $month := 1 }} {{ $year := 1 }} {{ if .Params.date }} {{ $split := split .Params.date "-" }} {{ $month = index $split 0 }} {{ $year = index $split 3 }} {{ end }} {{ $path := printf "/%s/%d/%.2d/%s" $base (int $year) (int $month) $filename_without_ext}} {{ $title := .Params.title }} {{ $image := (resources.Get (printf "%s/%s.webp" $base .Params.slug)).Resize "400x" }} {{ if .Params.nsfw }} {{ $image = $image | images.Filter (images.GaussianBlur 6) (images.Pixelate 8) }} {{ end }} {{ with $image }} {{ if $.Params.threed }} {{ with resources.Get "3d.png" }} Viewable 3D {{ end }} {{ end }} {{ if $.Params.animation }} {{ with resources.Get "play-circle.png" }} Viewable Animation {{ end }} {{ end }} {{ $title }} {{ else }}

Thumbnail not found!

{{ end }}
{{ else }} CANNOT FIND {{ .Params.slug }} {{ end }}