selfprivacy.org/_vendor/github.com/google/docsy/layouts/partials/taxonomy_terms_cloud.html

18 lines
735 B
HTML
Raw Normal View History

2024-04-21 23:04:16 +00:00
{{ $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 }}