mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
11 lines
487 B
HTML
11 lines
487 B
HTML
{{- /* Avoid extra whitespace */ -}}
|
|
{{- /* https://discourse.gohugo.io/t/55399/5 */ -}}
|
|
{{- $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) -}}
|
|
{{- if $icon -}}
|
|
<span class="relative inline-block align-text-bottom icon">
|
|
{{- strings.Replace $icon.Content "\n" "" | safeHTML -}}
|
|
</span>
|
|
{{- else -}}
|
|
{{- errorf `icon shortcode: resource "%s" not found. Check the path is correct or remove the shortcode: %s` (printf "icons/%s.svg" ($.Get 0)) .Position -}}
|
|
{{- end -}}
|