mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
14 lines
442 B
HTML
14 lines
442 B
HTML
{{- with .Class -}}
|
|
<i class="{{ . }}"></i>
|
|
{{- else -}}
|
|
{{- $src := .Src -}}
|
|
{{- with .Simpleicons -}}
|
|
{{- $prefix := $.Prefix | default "lib/simple-icons/icons" | strings.TrimSuffix "/" -}}
|
|
{{- $src = printf "%v/%v.svg" $prefix . -}}
|
|
{{- end -}}
|
|
{{- if (urls.Parse $src).Host | not -}}
|
|
{{- $src = (resources.Get $src | minify).RelPermalink -}}
|
|
{{- end -}}
|
|
<i data-svg-src="{{ $src }}"></i>
|
|
{{- end -}}
|