{{ define "main" }}

{{ .Title }}

{{ .Content }} {{ $selected_year := $.Param "selectedyear" }} {{ $art := (index site.Data ($.Param "json")) }} {{ $pixiv_icon := resources.Get "pixiv.webp" }} {{ $newgrounds_icon := resources.Get "newgrounds.webp" }}
Table of Contents
{{ range $art.categories }} {{ $should_include := false }} {{ range sort .years "year" "desc" }} {{ if eq (int .year) (int $selected_year) }} {{ $should_include = true }} {{ end }} {{ end }} {{ if $should_include }} {{ $without_space := replaceRE "(\\s)" "" .name }}

{{ .name }}

{{ range sort .years "year" "desc" }} {{ if eq (int .year) (int $selected_year) }} {{ $year := .year }}
{{ range .pieces }} {{ $filename_without_ext := strings.TrimSuffix (path.Ext .filename) .filename }} {{ $path := printf "/art/%s" $filename_without_ext}} {{ with $.Site.GetPage $path }} {{ partial "render-art" . }} {{ end }} {{ end }}
{{ end }} {{ end }} {{ end }} {{ end }} {{ $site := resources.Get "js/site.js" }} {{ if hugo.IsProduction }} {{ $site = $site | minify | fingerprint | resources.PostProcess }} {{ end }} {{ end }}