summaryrefslogtreecommitdiff
path: root/layouts/_partials/section-categories.html
blob: 40e6600ee6b8038ebaf4de69805cdc5e69a1e18e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{{ $categories := slice }}
{{ range . }}
    {{ with .Params.categories }}
        {{ if not (in $categories .) }}
            {{ $categories = $categories | append . }}
        {{ end }}
    {{ end }}
{{ end }}

<div class="flex gap-2 flex-wrap">
    {{ range $categories }}
    <a href="/categories/{{ . | urlize }}/"
        class="text-size-lg px-3 py-2
        transition-colors duration-300 rounded-xl hover:no-underline
        bg-slate-2/50 dark:bg-neutral-800/50
        hover:bg-[var(--text-color)] hover:text-[var(--block-background-color)]">
            {{ . }}
    </a>
    {{ end }}
</div>