aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials/icon.html
diff options
context:
space:
mode:
authorAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-11-28 00:46:17 +0300
committerAlexander Neonxp Kiryukhin <i@neonxp.ru>2024-11-28 00:46:17 +0300
commit54375572e11d23dacb20c5742d171af3072d7b9c (patch)
treea190e43087c520846658f7d68cc3bb263427a254 /layouts/partials/icon.html
parent8b78390987476352a6459460e00d5c4cdc0717c2 (diff)
Серьезная реновация
Diffstat (limited to 'layouts/partials/icon.html')
-rw-r--r--layouts/partials/icon.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/partials/icon.html b/layouts/partials/icon.html
new file mode 100644
index 0000000..72162e8
--- /dev/null
+++ b/layouts/partials/icon.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