2021-02-18 21:44:01 +01:00
|
|
|
{{- with .Class -}}
|
2022-08-14 19:01:21 +02:00
|
|
|
<i class="{{ . }}" aria-hidden="true"></i>
|
2021-02-18 21:44:01 +01:00
|
|
|
{{- 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 -}}
|
2022-08-14 19:01:21 +02:00
|
|
|
<i data-svg-src="{{ $src }}" aria-hidden="true"></i>
|
2021-02-18 21:44:01 +01:00
|
|
|
{{- end -}}
|