bunteshaus.de/themes/buha/layouts/_default/list.html

33 lines
882 B
HTML
Raw Normal View History

2021-10-23 22:20:01 +02:00
{{- define "title" -}}
2022-03-27 15:10:18 +02:00
{{ $name := .Name | lower }}
2022-03-27 14:24:21 +02:00
{{ if ne ($name | i18n) "" }}
{{ $name = $name | i18n }}
2022-03-27 15:10:18 +02:00
{{ else }}
{{ if ne .Section "events" }}
{{ $name = $name | singularize }}
{{ end }}
{{ $name = $name | humanize }}
2022-03-27 14:24:21 +02:00
{{ end }}
{{ $name }}
2021-10-23 22:20:01 +02:00
{{- end -}}
{{- define "main" -}}
2022-04-04 03:35:13 +02:00
{{ $s := .Site.Params }}
{{- $paginator := slice -}}
2022-04-04 12:50:21 +02:00
{{- $paginator = .Paginate .Data.Pages.ByDate.Reverse -}}
2022-04-04 03:35:13 +02:00
{{ if eq $paginator.PageNumber 1 }}
{{ if ne .Content "" }}
<article>
{{ .Content }}
</article>
{{ end }}
{{ end }}
{{- range first 5 $paginator.Pages -}}
{{ partial "structure/list_article.html" . }}
{{- end }}
{{ partial "structure/paginator" (dict "paginator" $paginator) }}
2021-10-23 22:20:01 +02:00
{{- end -}}
2022-03-26 20:28:14 +01:00
{{ define "sidebar" }}
2022-04-03 02:33:46 +02:00
{{- partial "structure/sidebar" . }}
2022-03-26 20:28:14 +01:00
{{ end }}