mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-28 19:22:50 +01:00
13 lines
494 B
HTML
13 lines
494 B
HTML
{{- with .Class -}}
|
|
<i class="{{ . }}" aria-hidden="true"></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 }}" aria-hidden="true"></i>
|
|
{{- end -}}
|