ccchh-website/layouts/shortcodes/fa.html
2023-10-29 22:52:32 +01:00

6 lines
324 B
HTML

<!-- use default fontawesome class 'fas' or use a specified one like 'fab' for brands -->
{{- $faStylePrefix := "fa-solid" }}
{{- if in (slice "fa-solid" "fa-brands") (.Get 0) }}
{{- $faStylePrefix = (.Get 0) }}
{{- end }}
<i class="{{ $faStylePrefix }} {{ range $iconName := .Params }} fa-{{ $iconName }} {{ end }}"></i>