aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/utils/icon.html
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2025-09-29 19:17:13 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2025-10-01 07:51:11 +0200
commit4c41e477e13d37e187c8de4225c7e8056bd9ed28 (patch)
tree33a7b51a0ed2c2ae207fc8f89f1454ccb77596a5 /layouts/partials/utils/icon.html
parent4720b07e9f18915cf1f6466245a92dedd11fdc55 (diff)
Internalise theme
Diffstat (limited to 'layouts/partials/utils/icon.html')
-rw-r--r--layouts/partials/utils/icon.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/layouts/partials/utils/icon.html b/layouts/partials/utils/icon.html
new file mode 100644
index 0000000..7f72418
--- /dev/null
+++ b/layouts/partials/utils/icon.html
@@ -0,0 +1,7 @@
+{{- $iconFile := resources.GetMatch (printf "icons/%s.svg" .) -}}
+
+{{- if $iconFile -}}
+ {{- $iconFile.Content | safeHTML -}}
+{{- else -}}
+ {{- errorf "Error: icon '%s.svg' is not found under 'assets/icons' folder" . -}}
+{{- end -}} \ No newline at end of file