2022-04-10 11:18:04 +02:00
|
|
|
{{ if and .amount (or .paginator .pages) }}
|
2022-04-09 21:34:04 +02:00
|
|
|
{{ $amount := .amount }}
|
2022-04-10 11:18:04 +02:00
|
|
|
{{ $pages := .pages.ByLastmod.Reverse }}
|
|
|
|
{{ if .paginator }}
|
2022-04-09 21:34:04 +02:00
|
|
|
{{ $pages = .paginator.Pages.ByLastmod.Reverse }}
|
|
|
|
{{ end }}
|
2022-04-10 11:18:04 +02:00
|
|
|
|
|
|
|
{{- $paginator := .context.Paginate $pages -}}
|
|
|
|
{{ if eq $paginator.PageNumber 1 }}
|
|
|
|
{{ if .content }}
|
|
|
|
{{ partial "snippets/content" (dict "content" .content) }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-04-09 21:34:04 +02:00
|
|
|
{{- if gt (len $pages) 0 -}}
|
2022-04-10 00:53:31 +02:00
|
|
|
{{ if .title }}<h2 style="margin-left: .6rem;">{{ .title }}</h2>{{ end }}
|
2022-04-09 21:34:04 +02:00
|
|
|
{{- range first $amount $pages -}}
|
|
|
|
<article class="articlebgcol1 borderrad25">
|
|
|
|
<a href="{{- .Permalink -}}">
|
|
|
|
<div id="articletitle">
|
|
|
|
<h2>{{- .Title -}}</h2>
|
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
<a href="{{- .Permalink -}}">
|
|
|
|
<div id="articlecontent">
|
2022-04-10 11:00:14 +02:00
|
|
|
{{ partial "layout/article" (dict "context" . "type" "list" "pic" "true") }}
|
2022-04-09 21:34:04 +02:00
|
|
|
</div>
|
|
|
|
</a>
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
2022-04-10 11:18:04 +02:00
|
|
|
{{ if .paginate }}
|
|
|
|
<div id="pagination_outer" style="display: flex; justify-content: center;">
|
|
|
|
{{ partial "snippets/paginator" (dict "paginator" $paginator) }}
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
2022-04-09 21:34:04 +02:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|