script to fix anubis

This commit is contained in:
Bel LaPointe
2021-11-29 15:25:43 -07:00
parent 7ee21a8e3f
commit 6efca3bc62
38 changed files with 80 additions and 44 deletions

View File

@@ -1,15 +1,15 @@
<span class="inline-svg" >
{{ $dict := newScratch }}
{{ if (eq .custom true) }}
{{ $dict.Set "filename" (print "static/fa-icons/" .iconName ".svg") }}
{{ if (eq .custom true) }}
{{ $dict.Set "svg" (readFile (print "static/fa-icons/" .iconName ".svg")) }}
{{ else }}
{{ $dict.Set "filename" (print "themes/anubis/static/fa-icons/" .iconName ".svg") }}
{{ $dict.Set "svg" (partial (print "fa-icons/" .iconName ".svg")) }}
{{ end }}
{{- $path:="<path" -}}
{{- $fill:="<path fill=\"currentColor\"" -}}
{{ replace (readFile ($dict.Get "filename")) $path $fill | safeHTML }}
{{ replace ($dict.Get "svg") $path $fill | safeHTML }}
</span>