2020-01-12 14:14:15 +01:00
|
|
|
{{ if .Site.Params.widgets.categories }}
|
|
|
|
{{ if not (eq (len .Site.Taxonomies.categories) 0) }}
|
|
|
|
<div class="widget-wrap">
|
2020-01-12 21:05:46 +01:00
|
|
|
<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 }}
|
2022-08-08 21:00:45 +02:00
|
|
|
<a class="category-list-link" href="{{ $.Site.BaseURL }}/categories/{{ $name | urlize | lower }}">
|
2020-01-12 21:05:46 +01:00
|
|
|
<li class="category-list-item">
|
|
|
|
{{ $name }}
|
|
|
|
<span class="category-list-count">{{ len $items }}</span>
|
|
|
|
</li>
|
|
|
|
</a>
|
|
|
|
{{ end }}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2020-01-12 14:14:15 +01:00
|
|
|
</div>
|
|
|
|
{{ end }}
|
2020-01-12 21:05:46 +01:00
|
|
|
{{ end }}
|