fix(archive): display categories list when it's available
This commit is contained in:
parent
3d57bfd59f
commit
37ca2cc167
@ -5,16 +5,19 @@
|
|||||||
{{ partial "sidebar/left.html" . }}
|
{{ partial "sidebar/left.html" . }}
|
||||||
|
|
||||||
<main class="main template-archive">
|
<main class="main template-archive">
|
||||||
|
{{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
|
||||||
|
{{ if $categories }}
|
||||||
<div class="widget">
|
<div class="widget">
|
||||||
<h1 class="widget-title">Categories</h1>
|
<h1 class="widget-title">Categories</h1>
|
||||||
<div class="category-list">
|
<div class="category-list">
|
||||||
<div class="article-list--tile">
|
<div class="article-list--tile">
|
||||||
{{ range ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
|
{{ range $categories }}
|
||||||
{{ partial "article-list/tile" (dict "context" . "size" "250x150") }}
|
{{ partial "article-list/tile" (dict "context" . "size" "250x150") }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
||||||
|
Loading…
Reference in New Issue
Block a user