adding all svgs and partials to handle them in order to ask for help in the forums.
[theme-danix.xyz.git] / layouts / partials / funcs / svg.html
index 44e167b..7421dbe 100644 (file)
@@ -1,4 +1,6 @@
 <span class="inline-svg">
-{{ $svg := .Get 0 }}
-{{ readFile ( print "SVGs/" . ".svg" ) | safeHTML  }}
+{{- $fname:=print "SVGs/" . ".svg" -}}
+{{- $path:="<path" -}}
+{{- $fill:="<path fill=\"currentColor\"" -}}
+{{ replace (readFile $fname) $path $fill | safeHTML }}
 </span>