aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/handler/svg.html
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2023-10-02 09:02:20 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2023-10-02 09:02:20 +0200
commit2c17fbcdf8ea36d9d10dba243db94de85575e8ed (patch)
tree6609bbe9837d851f3d0be160f025285606465dc4 /layouts/partials/handler/svg.html
parentc6ef2fd7aeff28abfd4ec372262de3ecd4684c04 (diff)
chore: Copy theme layouts
Diffstat (limited to 'layouts/partials/handler/svg.html')
-rw-r--r--layouts/partials/handler/svg.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/partials/handler/svg.html b/layouts/partials/handler/svg.html
new file mode 100644
index 0000000..72162e8
--- /dev/null
+++ b/layouts/partials/handler/svg.html
@@ -0,0 +1,6 @@
+{{- $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