fix archive layout

This commit is contained in:
Jimmy Cai 2022-03-03 21:23:06 +00:00 committed by GitHub
parent 2fa2eaea4e
commit a3d914667e

View File

@ -1,17 +1,19 @@
{{ define "body-class" }}template-archives{{ end }} {{ define "body-class" }}template-archives{{ end }}
{{ define "main" }} {{ define "main" }}
{{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}} <header>
{{- $terms := $taxonomy.Pages -}} {{- $taxonomy := $.Site.GetPage "taxonomyTerm" "categories" -}}
{{ if $terms }} {{- $terms := $taxonomy.Pages -}}
<h2 class="section-title">{{ $taxonomy.Title }}</h2> {{ if $terms }}
<div class="subsection-list"> <h2 class="section-title">{{ $taxonomy.Title }}</h2>
<div class="article-list--tile"> <div class="subsection-list">
{{ range $terms }} <div class="article-list--tile">
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }} {{ range $terms }}
{{ end }} {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "taxonomy") }}
{{ end }}
</div>
</div> </div>
</div> {{ end }}
{{ end }} </header>
{{ $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 }}