mirror of
https://gitlab.com/ansol/web-ansol.org.git
synced 2024-12-27 06:10:19 +00:00
10 lines
568 B
HTML
10 lines
568 B
HTML
|
{{- if (.Get "name") -}}
|
||
|
{{- $icon := .Get "name" -}}
|
||
|
{{- $pack := or (.Get "pack") "fas" -}}
|
||
|
{{- $pack_prefix := $pack -}}
|
||
|
{{- if in (slice "fab" "fas" "far" "fal") $pack -}}
|
||
|
{{- $pack_prefix = "fa" -}}
|
||
|
{{- end -}}
|
||
|
{{- $padding_right := (.Get "padding_right") | default 1 -}}{{/* Defaulting to 1 prevents no spacing when minimizing HTML. */}}
|
||
|
<i class="{{ $pack }} {{ $pack_prefix }}-{{ $icon }} {{with (.Get "padding_left")}}pl-{{.}}{{end}} {{with $padding_right}}pr-{{.}}{{end}} {{if ne (.Get "fixed_width") "false"}}fa-fw{{end}}"></i>
|
||
|
{{- end -}}
|