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

223bbcf7f65d3225b3c1568bd9ccb847c54028d8 · 765 B · 28 lines raw

1 <section class="container taxonomy">
2 <h1 class="title">
3 <a class="title-link" href="{{ .Permalink | safeURL }}">
4 {{- if eq .Kind "term" -}}
5 {{- i18n .Data.Singular | title -}}
6 {{- print ": " -}}
7 {{- end -}}
8
9 {{- i18n (lower .Title) | default .Title | title -}}
10 </a>
11 </h1>
12 {{ .Content }}
13 <ul>
14 {{ $type := .Type }}
15 {{ range $key, $value := .Data.Terms.Alphabetical }}
16 {{ $name := .Name }}
17 {{ $count := .Count }}
18 {{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}
19 <li>
20 <span class="taxonomy-element">
21 <a href="{{ .Permalink }}">{{ .Name }}</a>
22 <sup>{{ $count }}</sup>
23 </span>
24 </li>
25 {{ end }}
26 {{ end }}
27 </ul>
28 </section>