simoncor.net/themes/hugo-coder/layouts/partials/terms.html

30 lines
807 B
HTML
Raw Permalink Normal View History

2024-08-26 17:13:18 +02:00
<section class="container taxonomy">
<header>
<h1 class="title">
<a class="title-link" href="{{ .Permalink | safeURL }}">
{{- if eq .Kind "term" -}}
{{- i18n .Data.Plural | title -}}
{{- print ": " -}}
{{- end -}}
{{- i18n (lower .Title) | default .Title | title -}}
</a>
</h1>
</header>
{{ .Content }}
<ul>
{{ $type := .Type }}
{{ range $key, $value := .Data.Terms.Alphabetical }}
{{ $name := .Name }}
{{ $count := .Count }}
{{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
<li>
<span class="taxonomy-element">
<a href="{{ .Permalink }}">{{ .Name }}</a>
<sup>{{ $count }}</sup>
</span>
</li>
{{ end }}
{{ end }}
</ul>
</section>