Some layout tweaks for the term template

Allow removing the pages list if the "pages" page variable is set false.
This commit is contained in:
Eryn Wells 2023-04-23 22:07:27 +09:00
parent f21ac49b08
commit 66d50f773b

View file

@ -12,12 +12,11 @@
{{- $hasContent := false -}} {{- $hasContent := false -}}
{{ with .Content }} {{ with .Content }}
{{- $hasContent = true -}} {{- $hasContent = true -}}
<section>
{{ . }} {{ . }}
</section>
{{ end }} {{ end }}
{{ if $hasContent }} {{ if .Params.posts | default true }}
{{ if and $hasContent }}
<h2>Posts</h2> <h2>Posts</h2>
{{ end }} {{ end }}
@ -27,6 +26,7 @@
{{- end -}} {{- end -}}
</ul> </ul>
{{ end }} {{ end }}
{{ end }}
{{ define "footer" }} {{ define "footer" }}
{{ partial "footer.html" . }} {{ partial "footer.html" . }}