mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-15 11:33:20 +01:00
c2197b7411
* replace forkawesome and iconfont with simple icons * add more configs for social
17 lines
553 B
HTML
17 lines
553 B
HTML
{{- with .class -}}
|
|
<i class="{{ . }}"></i>
|
|
{{- else -}}
|
|
{{- $src := .src -}}
|
|
{{- with .simpleicons -}}
|
|
{{- $prefix := "lib/simple-icons/icons" -}}
|
|
{{- with $.prefix -}}
|
|
{{- $prefix = . -}}
|
|
{{- end -}}
|
|
{{- $prefix = $prefix | strings.TrimSuffix "/" -}}
|
|
{{- $src = printf "%s/%s.svg" $prefix . -}}
|
|
{{- end -}}
|
|
{{- if (urls.Parse $src).Host | not -}}
|
|
{{- $src = (resources.Get $src | minify).RelPermalink -}}
|
|
{{- end -}}
|
|
<i data-svg-src="{{ $src }}"></i>
|
|
{{- end -}}
|