mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-07-18 08:48:26 -04:00
🥅 Catch any cases where resources don't exist
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
<span class="relative inline-block align-text-bottom icon">
|
||||
{{ $icon := resources.Get (print "icons/" . ".svg") }}
|
||||
{{ $icon.Content | safeHTML }}
|
||||
{{ $icon := resources.Get (printf "icons/%s.svg" ($.Get 0)) }}
|
||||
{{ if $icon }}
|
||||
{{ $icon.Content | safeHTML }}
|
||||
{{ else }}
|
||||
<em>Icon not found.</em>
|
||||
{{ end }}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user