bunteshaus.de/themes/buha/layouts/index.html

39 lines
1.1 KiB
HTML
Raw Normal View History

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-04-08 12:04:46 +02:00
{{ partial "rrule" . }}
2022-03-26 19:22:14 +01:00
{{ $s := .Site.Params }}
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-04-07 16:31:15 +02:00
{{- $paginator := .Paginate $posts -}}
2022-03-27 16:47:39 +02:00
{{ if eq $paginator.PageNumber 1 }}
{{ if ne .Content "" }}
<article>
{{ .Content }}
</article>
{{ end }}
2022-04-07 16:31:15 +02:00
<a href="/featured"><h2>{{ "featured" | T }}</h2></a>
{{ partial "contentlayouts/list.html" (dict "context" . "pages" $featured "amount" "3" "max_age" "3" "featured" "true") }}
2022-03-27 16:47:39 +02:00
{{ end }}
2022-04-07 16:31:15 +02:00
<a href="/news"><h2>{{ "news" | T }}</h2></a>
{{ partial "contentlayouts/list.html" (dict "context" . "paginator" $paginator "amount" "5" "max_age" "-14") }}
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 }}