mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-11-14 04:15:58 -06:00
7 lines
338 B
HTML
7 lines
338 B
HTML
|
{{- $icon_resource := resources.Get (printf "jam/icons/%s.svg" .) -}}
|
||
|
{{- $icon := $icon_resource.Content -}}
|
||
|
{{- $icon = replaceRE `<svg` `<svg class="icon"` $icon -}}
|
||
|
{{- $icon = replaceRE `</svg>` (printf `<title>%s icon</title></svg>` .) $icon -}}
|
||
|
{{- $icon = replaceRE `(width|height)="[0-9]*"` "" $icon -}}
|
||
|
{{- $icon | safeHTML -}}
|