2021-10-23 22:20:01 +02:00
|
|
|
{{ define "title" }}
|
2022-04-05 15:47:23 +02:00
|
|
|
{{ if .Content }}
|
|
|
|
<h1>{{ .Title }}</h1>
|
|
|
|
{{ end }}
|
2021-10-23 22:20:01 +02:00
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ define "main" }}
|
2022-03-27 16:47:39 +02:00
|
|
|
|
|
|
|
|
2022-03-27 15:22:14 +02:00
|
|
|
<!-- <a href="/news"><h2>{{ "news" | T }}</h2></a> -->
|
2022-03-26 19:22:14 +01:00
|
|
|
{{ $s := .Site.Params }}
|
2022-03-27 16:47:39 +02:00
|
|
|
{{ $meta := false }}
|
2022-04-04 12:44:19 +02:00
|
|
|
{{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.searchSections }}
|
2022-04-04 13:05:33 +02:00
|
|
|
{{- $featured := where (where $posts ".Params.featured" "=" true) "Type" "in" $s.searchSections }}
|
2022-03-26 19:22:14 +01:00
|
|
|
{{- $paginator := slice -}}
|
2022-03-28 12:08:00 +02:00
|
|
|
{{- $paginator = .Paginate $posts.ByDate.Reverse -}}
|
2022-03-27 16:47:39 +02:00
|
|
|
<!-- <a href="/featured"><h2>{{ "featured" | T }}</h2></a> -->
|
|
|
|
{{ if eq $paginator.PageNumber 1 }}
|
|
|
|
{{ if ne .Content "" }}
|
|
|
|
<article>
|
|
|
|
{{ .Content }}
|
|
|
|
</article>
|
|
|
|
{{ end }}
|
2022-04-04 13:06:15 +02:00
|
|
|
{{ range first 3 $featured.ByLastmod.Reverse }}
|
2022-03-28 12:36:58 +02:00
|
|
|
{{ $article_age := sub now.Unix (int .Date.Unix) }}
|
|
|
|
{{ if lt $article_age "1209600" }}
|
2022-04-05 20:58:02 +02:00
|
|
|
{{ partial "contentlayouts/list.html" . }}
|
2022-03-28 12:36:58 +02:00
|
|
|
{{ end }}
|
2022-03-27 16:47:39 +02:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-04-07 00:10:22 +02:00
|
|
|
{{- range first 5 $paginator.Pages.ByLastmod.Reverse -}}
|
2022-03-28 12:47:10 +02:00
|
|
|
{{ $article_age := sub now.Unix (int .Date.Unix) }}
|
2022-03-28 12:53:53 +02:00
|
|
|
{{ if or (ne .Params.featured true) (ge $article_age "1209600") }}
|
2022-04-05 20:58:02 +02:00
|
|
|
{{ partial "contentlayouts/list.html" . }}
|
2022-03-27 15:35:05 +02:00
|
|
|
{{ end }}
|
2022-03-27 00:05:47 +01:00
|
|
|
{{- end }}
|
2022-04-04 12:44:19 +02:00
|
|
|
<div id="pagination_outer" style="display: flex; justify-content: center;">
|
2022-04-03 21:10:38 +02:00
|
|
|
{{ partial "structure/paginator" (dict "paginator" $paginator) }}
|
|
|
|
</div>
|
2022-03-26 19:22:14 +01:00
|
|
|
|
2022-03-27 16:47:39 +02:00
|
|
|
|
2022-03-26 19:22:14 +01:00
|
|
|
{{ end }}
|
2022-03-26 20:28:14 +01:00
|
|
|
|
|
|
|
{{ define "sidebar" }}
|
2022-04-05 20:58:02 +02:00
|
|
|
{{- partial "contentlayouts/menu.html" . }}
|
2022-04-03 21:08:42 +02:00
|
|
|
{{ end }}
|
|
|
|
|