website/themes/hugo-theme-wave/layouts/partials/widgets/categories.html
Paul Lecuq cbd1c10fff
All checks were successful
continuous-integration/drone/push Build is passing
updated website theme
2023-12-16 00:45:03 +01:00

16 lines
637 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 }}