6 lines
326 B
HTML
6 lines
326 B
HTML
|
{{- $fname:=print "assets/icons/" .icon ".svg" -}}
|
||
|
{{- $svg := readFile $fname -}}
|
||
|
{{- $filledPathSvg := replace $svg "<path" "<path fill='currentColor'" -}}
|
||
|
{{- $titledSvg := replaceRE "<svg (.*?)>" (printf `<svg role="img" width="28" height="28" $1 ><title>%s</title>` .title) $filledPathSvg -}}
|
||
|
{{ $titledSvg | safeHTML }}
|