mirror of https://github.com/luizdepra/hugo-coder.git

Alphonse Mariya
26.18.2021 d14dd837ec4077073ac3372cd77673c7d672d871
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<section class="container taxonomy">
  <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>
  {{ .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>