24 lines
763 B
HTML
24 lines
763 B
HTML
{{ with .Param "categories" }}
|
|
{{ range $i, $category := . }}
|
|
{{ if eq $i 0 }}
|
|
{{ with $.Site.GetPage (printf "/%s/%s" "categories" $category) }}
|
|
{{ $iconDictionary := dict
|
|
"video" "fad fa-video"
|
|
"paper" "fad fa-book"
|
|
"poster" "fad fa-presentation"
|
|
"thesis" "fad fa-graduation-cap"
|
|
"presentation" "fad fa-podium"
|
|
"web" "fad fa-globe"
|
|
}}
|
|
{{ $categoryIcon := index $iconDictionary $category }}
|
|
<a
|
|
class="category-button"
|
|
href="{{ .RelPermalink }}"
|
|
title="{{ humanize $category }}"
|
|
>
|
|
<i class="{{ $categoryIcon | default "fad fa-tag" }} fa-fw"></i>
|
|
</a>
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|
|
{{ end }}
|