hugo-theme-anubis2/layouts/partials/font-awesome.html

16 lines
390 B
HTML
Raw Normal View History

2021-05-17 20:04:42 +02:00
<span class="inline-svg" >
2021-05-17 20:04:42 +02:00
{{ $dict := newScratch }}
{{ if (eq .custom true) }}
{{ $dict.Set "svg" (readFile (print "static/fa-icons/" .iconName ".svg")) }}
2021-05-17 20:04:42 +02:00
{{ else }}
{{ $dict.Set "svg" (partial (print "fa-icons/" .iconName ".svg")) }}
2021-05-17 20:04:42 +02:00
{{ end }}
{{- $path:="<path" -}}
{{- $fill:="<path fill=\"currentColor\"" -}}
{{ replace ($dict.Get "svg") $path $fill | safeHTML }}
2021-05-17 20:04:42 +02:00
</span>