hackertours/layouts/_partials/icon.html
Vincent Mahnke 75a8d446e4
All checks were successful
/ build (push) Successful in 1m14s
/ accessibility (push) Successful in 2m2s
Keeps logo size across languages and resolves mobile menu overlap (#68)
## Header

![image](/attachments/dd741d30-ffbe-49ad-b717-cd3e7bd46bcb)

## Mobile menu
| | |
| --- | --- |
| ![localhost_8888_en_ (1)](/attachments/ce78aa3d-b229-457a-add5-0d5e3ddc71ec) | ![localhost_8888_en_](/attachments/ae1832d5-605d-4bd5-b41a-b7fe9d6e14e5) |

Reviewed-on: #68
2026-11-07 21:28:53 +01:00

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 -}}