hugo-theme-zzo/layouts/partials/taxonomy/taxonomy-series.html

27 lines
1.1 KiB
HTML

{{ if and ($.Param "enableSidebarSeries") (ne (len .Site.Taxonomies.series) 0) }}
<div class="taxo">
<section>
<span class="title p2">
<a href="{{ "/series/" | relLangURL }}" class="taxo__title">
{{ i18n "series" }}
</a>
</span>
{{ $minItemsToShowInTagCloud := $.Site.Params.minItemsToShowInTagCloud }}
{{ range $index, $element := .Site.Taxonomies.series }}
{{ if and $index (ge (len $element) $minItemsToShowInTagCloud) }}
<span class="tag">
<a href="{{ $element.Page.RelPermalink }}" class="is-series taxo__link" data-dir="{{ if ne ($.Param "languagedir") "rtl" }}ltr{{ else }}rtl{{ end }}">
<span class="taxo__text">
{{ $element.Page.Title }}
</span>
<span class="taxo__num" dir="auto">
{{ printf "%#v" (len $element) }}
</span>
</a>
</span>
{{ end }}
{{ end }}
</section>
</div>
{{ end }}