2021-10-23 22:20:01 +02:00
|
|
|
{{ define "title" }}
|
2022-03-27 15:22:14 +02:00
|
|
|
<!-- {{ .Title }} -->
|
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-03-27 14:24:21 +02:00
|
|
|
{{- $posts := where (where .Site.RegularPages "Permalink" "!=" .Permalink) "Type" "in" $s.mainSections }}
|
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 }}
|
|
|
|
{{ range first 3 (where (where .Site.RegularPages "Type" "in" site.Params.mainSections) ".Params.featured" "=" true) }}
|
2022-03-28 12:36:58 +02:00
|
|
|
{{ $article_age := sub now.Unix (int .Date.Unix) }}
|
|
|
|
{{ if lt $article_age "1209600" }}
|
2022-04-03 21:08:42 +02:00
|
|
|
{{ partial "structure/list_article.html" . }}
|
2022-03-28 12:36:58 +02:00
|
|
|
{{ end }}
|
2022-03-27 16:47:39 +02:00
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
2022-03-26 19:22:14 +01:00
|
|
|
{{- range first 5 $paginator.Pages -}}
|
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-03 21:08:42 +02:00
|
|
|
{{ partial "structure/list_article.html" . }}
|
2022-03-27 15:35:05 +02:00
|
|
|
{{ end }}
|
2022-03-27 00:05:47 +01:00
|
|
|
{{- end }}
|
2022-04-03 21:10:38 +02:00
|
|
|
<div id="pagination_outer" style="display: flex; justify-content: flex-end;">
|
|
|
|
{{ 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-03 02:33:46 +02:00
|
|
|
{{- partial "structure/sidebar" . }}
|
2022-04-03 21:08:42 +02:00
|
|
|
{{ end }}
|
|
|
|
|