mirror of https://github.com/jpanther/congo.git
🥅 Catch any cases where resources don't exist
parent
b114f3be73
commit
5575d2b43e
|
@ -1,5 +1,6 @@
|
||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
{{ partial "section-heading.html" . }}
|
{{ partial "section-heading.html" . }}
|
||||||
|
{{ if gt .Pages 0 }}
|
||||||
<section>
|
<section>
|
||||||
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
|
||||||
{{ if $.Site.Params.list.groupByYear }}
|
{{ if $.Site.Params.list.groupByYear }}
|
||||||
|
@ -12,4 +13,11 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</section>
|
</section>
|
||||||
{{ partial "pagination.html" . }}
|
{{ 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 }}
|
{{ end }}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<span class="relative inline-block align-text-bottom icon">
|
<span class="relative inline-block align-text-bottom icon">
|
||||||
{{ $icon := resources.Get (print "icons/" . ".svg") }}
|
{{ $icon := resources.Get (print "icons/" . ".svg") }}
|
||||||
|
{{ if $icon }}
|
||||||
{{ $icon.Content | safeHTML }}
|
{{ $icon.Content | safeHTML }}
|
||||||
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<span class="relative inline-block align-text-bottom icon">
|
<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 }}
|
{{ $icon.Content | safeHTML }}
|
||||||
|
{{ else }}
|
||||||
|
<em>Icon not found.</em>
|
||||||
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue