From 54375572e11d23dacb20c5742d171af3072d7b9c Mon Sep 17 00:00:00 2001 From: Alexander Neonxp Kiryukhin Date: Thu, 28 Nov 2024 00:46:17 +0300 Subject: Серьезная реновация MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/icon.html | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 layouts/partials/icon.html (limited to 'layouts/partials/icon.html') 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 -- cgit v1.2.3