mirror of
https://github.com/foo-dogsquared/website.git
synced 2025-01-31 16:58:03 +00:00
29 lines
847 B
HTML
29 lines
847 B
HTML
{{ define "main" }}
|
|
|
|
{{ .Content }}
|
|
|
|
{{- /* 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 }}
|
|
{{ $pages = where $.Site.RegularPages "Type" "in" $.Site.Params.mainSections }}
|
|
{{ end }}
|
|
|
|
<ul class="posts--list">
|
|
{{- $paginator := .Paginate $pages }}
|
|
{{- range $paginator.Pages }}
|
|
<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>
|
|
</li>
|
|
{{- end }}
|
|
</ul>
|
|
|
|
{{ if $paginator.HasNext }}
|
|
<p style="margin: 1em;">
|
|
<a href="{{ "/archives" | relLangURL }}">View all posts</a>
|
|
</p>
|
|
{{ end }}
|
|
{{- end }}
|
|
|