blob: c5f98db9191b2d18d99439e7c1d07f9d766b7753 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
{{- 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 -}}
|