bunteshaus.de/themes/buha/layouts/_default/news.html
2022-04-07 16:31:15 +02:00

32 lines
835 B
HTML

{{- define "title" -}}
{{ $name := .Name | lower }}
{{ if ne ($name | i18n) "" }}
{{ $name = $name | i18n }}
{{ else }}
{{ if ne .Section "events" }}
{{ $name = $name | singularize }}
{{ end }}
{{ $name = $name | humanize }}
{{ end }}
<h1>{{ $name }}</h1>
{{- end -}}
{{- define "main" -}}
{{ partial "debug" (dict "context" . "filename" "news.html") }}
{{- $paginator := .Paginate .Data.Pages -}}
{{ if eq $paginator.PageNumber 1 }}
{{ if ne .Content "" }}
<article>
{{ .Content }}
</article>
{{ end }}
{{ end }}
{{ partial "contentlayouts/list.html" (dict "context" . "paginator" $paginator "amount" "5") }}
{{ partial "structure/paginator" (dict "paginator" $paginator) }}
{{- end -}}
{{ define "sidebar" }}
{{- partial "contentlayouts/menu.html" . }}
{{ end }}