selfprivacy.org/_vendor/github.com/google/docsy/layouts/partials/taxonomy_terms_cloud.html
2024-04-26 01:15:39 +03:00

19 lines
749 B
HTML

{{ $context := .context -}}
{{ $taxo := .taxo -}}
{{ $title := .title -}}
{{ if isset $context.Site.Taxonomies (lower $taxo) -}}
{{ $taxonomy := index $context.Site.Taxonomies (lower $taxo) -}}
{{ if (gt (len $taxonomy) 0) -}}
<div class="taxonomy taxonomy-terms-cloud taxo-{{ urlize $taxo }}">
{{ with $title -}}
<h5 class="taxonomy-title">{{ . }}</h5>
{{ end -}}
<ul class="taxonomy-terms">
{{ range $taxonomy -}}
<li><a class="taxonomy-term" href="{{ .Page.Permalink }}" data-taxonomy-term="{{ urlize .Page.Title }}"><span class="taxonomy-label">{{ .Page.Title }}</span><span class="taxonomy-count">{{ .Count }}</span></a></li>
{{ end -}}
</ul>
</div>
{{ end -}}
{{ end -}}