{{- /* releaseryear.tmpl This template is for the list of the releases organized by the first year of the earliest release. Currently, the template is exclusively used for the magazines. */ -}} {{- define "content" }} {{- $path := "g" }} {{- $name := index .itemName}} {{- $pubs := index .stats.pubs }} {{- $orderBy := index .stats.orderBy }} {{- $class := "row row-cols-1 row-cols-sm-2 row-col-md-3 g-2"}}

Showing {{$pubs}}{{if ne $orderBy ""}}, ordered {{$orderBy | safeHTML}}{{end}}.

{{- $prevYear := 0 }} {{- range $index, $rel := .releasers -}} {{- $title := fmtRangeURI $rel.Unique.URI }} {{- $initialism := initialisms $rel.Unique.URI }} {{- $year := $rel.Unique.Year.Int }} {{ if eq $index 0}} {{ if (gt $year 0) }}

The first release in {{$year}}

{{end}}
{{- end}} {{- if and (gt $prevYear 0) (gt $year 0) (gt $year $prevYear) }} {{- $prevYear = $rel.Unique.Year.Int }}

{{$prevYear}}

{{- end}} {{- if eq $prevYear 0}} {{- $prevYear = $rel.Unique.Year.Int }} {{- end}}
{{trimSiteSuffix $title}}
{{ $initialism }}   {{- byteFileS $name $rel.Unique.Count $rel.Unique.Bytes }}
{{- end}}
{{- end }}