{{ define "main" }} {{ with .Title }}

{{ . }}

{{ else }}

Untitled Artwork

{{ end }}
{{ $month := 1 }} {{ $year := 1 }} {{ if .Params.date }} {{ $split := split .Params.date "-" }} {{ $year = int (index $split 0) }} {{ $month = int (index $split 3) }} {{ end }} {{ if (and (not $.Params.animation) (and (not (in .File.Dir "art/guest")) (and (not $.Params.threed) (not $.Params.comic) )) ) }} {{ $full := printf "https://images.redstrate.com/art/%s.avif" $.Params.slug }} {{ $jpeg := printf "https://images.redstrate.com/art/%s.jpg" $.Params.slug }} {{ $.Params.alt_text }} {{ else }} {{ $file := printf "https://images.redstrate.com%s" $.Params.filename }} {{ with $file }} {{ if $.Params.threed }} {{ $cameraorbit := $.Params.orbit }} {{ $cameratarget := $.Params.target }} {{ $fov := $.Params.fov }} {{ else }} {{ if $.Params.animation }}
{{ end }} {{ end }} {{ end }} {{ end }} {{ if $.Params.comic }} {{ range $.Params.pages }} {{ $full := printf "https://images.redstrate.com/art/%s.avif" .filename }} {{ $jpeg := printf "https://images.redstrate.com/art/%s.jpg" .filename}} {{ .alt_text }} {{ end }} {{ end }} {{ partial "voting" . }} {{ with .Params.arttags }} {{ end }} {{ with .Params.characters }} {{ end }} {{ with .Params.artist }} {{ end }} {{ with .Params.program }} {{ end }} {{ with .Params.mastodon_url }} {{ end }} {{ with .Params.newgrounds_url }} {{ end }} {{ with .Params.pixiv_url }} {{ end }}
Date
Tags {{ $len := (len .) }} {{ range $index, $element := . }} {{ $element }}{{ if not (eq (add $index 1) $len) }},{{ end }} {{ end }}
Characters {{ $len := (len .) }} {{ range $index, $element := . }} {{ $element }}{{ if not (eq (add $index 1) $len) }},{{ end }} {{ end }}
Artist {{ . }}
Program {{ . }}
Mastodon URL Mastodon Post
Newgrounds URL Newgrounds Post
Pixiv URL Pixiv Post
{{ with .Content }} {{ $.Scratch.Set "header-type" "h3" }} {{ $.Scratch.Set "header-name" "Commentary" }} {{ partial "fake-heading.html" $ }} {{ . }} {{ end }} {{ if .Params.threed }} {{ $site := resources.Get "js/model-viewer.min.js" }} {{ if hugo.IsProduction }} {{ $site = $site | fingerprint | resources.PostProcess }} {{ end }} {{ end }} {{ partial "comments" . }} {{ end }}