website/themes/hugo-theme-wave/layouts/partials/widgets/categories.html
Paul Lecuq cdc4da40e4
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
updated style on website
2022-08-08 21:00:45 +02:00

19 lines
668 B
HTML

{{ if .Site.Params.widgets.categories }}
{{ if not (eq (len .Site.Taxonomies.categories) 0) }}
<div class="widget-wrap">
<div class="widget">
<ul class="category-list">
<h3 class="widget-title">Categories {{with .Site.Data.l10n.widgets.categories.title}}{{.}}{{end}}</h3>
{{ range $name, $items := .Site.Taxonomies.categories }}
<a class="category-list-link" href="{{ $.Site.BaseURL }}/categories/{{ $name | urlize | lower }}">
<li class="category-list-item">
{{ $name }}
<span class="category-list-count">{{ len $items }}</span>
</li>
</a>
{{ end }}
</ul>
</div>
</div>
{{ end }}
{{ end }}