mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-23 10:21:46 +01:00
fix(archive): display categories list when it's available
This commit is contained in:
parent
3d57bfd59f
commit
37ca2cc167
1 changed files with 4 additions and 1 deletions
|
@ -5,16 +5,19 @@
|
|||
{{ partial "sidebar/left.html" . }}
|
||||
|
||||
<main class="main template-archive">
|
||||
{{ $categories := ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
|
||||
{{ if $categories }}
|
||||
<div class="widget">
|
||||
<h1 class="widget-title">Categories</h1>
|
||||
<div class="category-list">
|
||||
<div class="article-list--tile">
|
||||
{{ range ($.Site.GetPage "taxonomyTerm" "categories").Pages }}
|
||||
{{ range $categories }}
|
||||
{{ partial "article-list/tile" (dict "context" . "size" "250x150") }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
|
||||
{{ $notHidden := where .Site.RegularPages "Params.hidden" "!=" true }}
|
||||
|
|
Loading…
Reference in a new issue