12 lines
599 B
HTML
12 lines
599 B
HTML
{{- /*
|
|
Render a Lucide icon from the local icons data file.
|
|
Usage: {{ partial "icon" "house" }}
|
|
Icons are fetched from data/lucideicons.json at build time
|
|
*/ -}}
|
|
{{- $iconName := . -}}
|
|
{{- with index hugo.Data.lucideicons $iconName -}}
|
|
{{- . | safeHTML -}}
|
|
{{- else -}}
|
|
{{- /* Fallback if icon not found */ -}}
|
|
<svg class="icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" focusable="false" aria-hidden="true"><circle cx="12" cy="12" r="10"/></svg>
|
|
{{- end -}}
|