hugo-theme/layouts/partials/block/taxonomies.html

25 lines
720 B
HTML
Raw Permalink Normal View History

2024-10-21 13:47:30 +02:00
{{ 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">
<span class="ml-0">{{ .LinkTitle }}</span>
</a>
</li>
{{ end }}
{{ end }}
</ul>
{{ end }}