redstrate.com/themes/red/layouts/_default/art-stats.html

28 lines
1 KiB
HTML

{{/* Page layout used for art statistics page. */}}
{{ define "main" }}
<h2>{{ .Title }}</h2>
<hr>
{{ $.Scratch.Set "header-type" "h3" }}
{{ $.Scratch.Set "header-name" "Most Drawn Characters" }}
{{ partial "fake-heading.html" $ }}
<ol>
{{ range first 10 (index site.Taxonomies "characters").ByCount }}
{{ $year := .Page.Title }}
{{ $num := .Count }}
<a class="character" href="/art/characters/{{ urlize $year }}"><img class="gallery-img" width=256 height=256 src="https://images.redstrate.com/chars/{{ urlize $year }}.jpg"/><span>{{ $year }}<br>({{ $num }} artworks)</span></a>
{{ end }}
</ol>
{{ $.Scratch.Set "header-name" "# of Artworks by Year" }}
{{ partial "fake-heading.html" $ }}
<ol>
{{ range (where .Site.RegularPages "Section" "=" "art").GroupByDate "2006" }}
{{ $year := .Key }}
{{ $num := len (where .Pages "Params.guest" "=" false) }}
<li><a href="/art/{{ $year }}">{{ $year }}</a> ({{ $num }} artworks)</li>
{{ end }}
</ol>
{{ end }}