Files
George Cushen 5733b053bb feat(icons): expand brands icon pack and update all packs
Also, refactor icon resolution to avoid duplicated logic:

get_icon_svg.html	New shared core — alias resolution, pack lookup, hb fallback, user assets, hugo fallback. Returns raw SVG string.

get_icon.html	Thin wrapper — emoji handling, calls get_icon_svg, Unicode emoji fallback for bare names, attribute injection, safeHTML return.

get_icon_data.html	Thin wrapper — one-liner delegating to get_icon_svg.
2026-03-27 00:19:41 +00:00

15 lines
504 B
HTML

{{/* Return raw SVG content for Preact component consumption.
Thin wrapper around get_icon_svg.html — see that partial for resolution logic.
USAGE:
{{ $svg := partial "functions/get_icon_data" (dict "name" "hero/arrow-right") }}
Then pass $svg as a prop to a Preact component.
*/}}
{{- $name := .name | default "" -}}
{{- $icon := "" -}}
{{- if $name -}}
{{- $icon = partial "functions/get_icon_svg" (dict "name" $name "pack" (.pack | default "")) -}}
{{- end -}}
{{- $icon -}}