2020-11-06 16:16:16 +00:00
|
|
|
{{ define "main" }}
|
2020-12-23 09:36:43 +00:00
|
|
|
|
2020-11-06 16:16:16 +00:00
|
|
|
{{ .Content }}
|
|
|
|
|
|
|
|
{{- /* The homepage should show only pages from the given sections (with `$.Site.Params.mainSections`).
|
|
|
|
Otherwise, we take the pages of a section. */ -}}
|
|
|
|
{{- $pages := where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
|
|
|
|
|
2021-02-01 04:34:15 +00:00
|
|
|
<ul class="posts--list">
|
2020-11-06 16:16:16 +00:00
|
|
|
{{- $paginator := .Paginate $pages }}
|
|
|
|
{{- range $paginator.Pages }}
|
2021-02-01 04:34:15 +00:00
|
|
|
<li class="post--list">
|
|
|
|
<time class="post--list__date" datetime="{{ .PublishDate.Format "2006-01-02" }}">{{ .PublishDate.Format "2006-01-02" }}</time>
|
|
|
|
<a class="post--list__title" href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
|
2020-11-06 16:16:16 +00:00
|
|
|
</li>
|
|
|
|
{{- end }}
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{{ if $paginator.HasNext }}
|
|
|
|
<p style="margin: 1em;">
|
|
|
|
<a href="{{ "/archives" | relLangURL }}">View all posts</a>
|
|
|
|
</p>
|
|
|
|
{{ end }}
|
|
|
|
{{- end }}
|
|
|
|
|