hugo-theme/layouts/partials/block/taxonomies.html
2024-10-21 13:47:30 +02:00

28 lines
847 B
HTML

{{ if (or .Params.categories .Params.tags) }}
<ul class="flex flex-row flex-wrap text-slate-500 dark:text-slate-300">
{{ if .Params.categories }}
{{ range (.GetTerms "categories") }}
<li>
<a href="{{ .RelPermalink }}"
class="text-sm mr-2 px-2 py-1 rounded border border-emerald-800 bg-emerald-800 text-slate-50">
{{ .LinkTitle }}
</a>
</li>
{{ end }}
{{ end }}
{{ if .Params.tags }}
{{ range (.GetTerms "tags") }}
<li>
<a href="{{ .RelPermalink }}"
class="flex flex-row text-sm mr-2 py-1">
<i class="h-5 w-5 flex-none">
{{ partial "icon.html" site.Params.taxonomies.icons.tags }}
</i>
<span class="ml-0">{{ .LinkTitle }}</span>
</a>
</li>
{{ end }}
{{ end }}
</ul>
{{ end }}