2020-11-02 08:53:37 +00:00
|
|
|
{{ define "main" }}
|
2022-11-22 11:59:24 +00:00
|
|
|
<article>
|
|
|
|
<main>{{- .Content }}</main>
|
2020-11-02 08:53:37 +00:00
|
|
|
|
|
|
|
{{- /* The homepage should show only pages from the given sections (with `$.Site.Params.mainSections`).
|
|
|
|
Otherwise, we take the pages of a section. */ -}}
|
|
|
|
{{- $pages := .Pages }}
|
|
|
|
{{- if .IsHome }}
|
2020-11-05 05:54:38 +00:00
|
|
|
{{- $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
|
2020-11-02 08:53:37 +00:00
|
|
|
{{- end }}
|
|
|
|
|
2020-11-06 10:19:33 +00:00
|
|
|
{{- range (.Paginate $pages).Pages }}
|
2020-11-02 08:53:37 +00:00
|
|
|
<article class="post">
|
2023-04-27 16:53:55 +00:00
|
|
|
<h1><a href="{{ .RelPermalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
|
2020-11-05 05:54:38 +00:00
|
|
|
{{ partial "partials/components/post-meta.html" . }}
|
2020-11-02 08:53:37 +00:00
|
|
|
</article>
|
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{- partial "pagination.html" (dict "Paginator" .Paginator "activeNumberOfPages" 2) }}
|
2022-11-22 11:59:24 +00:00
|
|
|
</article>
|
2020-11-02 08:53:37 +00:00
|
|
|
{{- end }}
|