mirror of
https://github.com/TrezOne/congo-hindi-gujarati.git
synced 2026-07-24 03:14:27 -04:00
🥅 Catch any cases where resources don't exist
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
{{ define "main" }}
|
||||
{{ partial "section-heading.html" . }}
|
||||
{{ if gt .Pages 0 }}
|
||||
<section>
|
||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||
{{ if $.Site.Params.list.groupByYear }}
|
||||
@@ -12,4 +13,11 @@
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ else }}
|
||||
<section class="mt-10 prose dark:prose-light">
|
||||
<p class="py-8 border-t">
|
||||
<em>There's no articles to list here yet.</em>
|
||||
</p>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<span class="relative inline-block align-text-bottom icon">
|
||||
{{ $icon := resources.Get (print "icons/" . ".svg") }}
|
||||
{{ if $icon }}
|
||||
{{ $icon.Content | safeHTML }}
|
||||
{{ end }}
|
||||
</span>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<span class="relative inline-block align-text-bottom icon">
|
||||
{{ $icon := resources.Get (print "icons/" . ".svg") }}
|
||||
{{ $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