mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
11 lines
No EOL
302 B
HTML
11 lines
No EOL
302 B
HTML
{{- $context := .context }}
|
|
{{- $icon := .icon | default "" }}
|
|
{{- $icon = trim $icon " " }}
|
|
{{- if and $icon (not (findRE ".*?\\bfa-\\w.*?" $icon)) }}
|
|
{{- $icon = printf "fa-fw fas fa-%s" $icon }}
|
|
{{- end }}
|
|
{{- with $context }}
|
|
{{- if $icon -}}
|
|
<i class="{{ $icon }}"></i>
|
|
{{- end }}
|
|
{{- end }} |