forked from Bunteshaus/bunteshaus.de
33 lines
889 B
HTML
33 lines
889 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" -}}
|
|
{{ $s := .Site.Params }}
|
|
{{- $paginator := slice -}}
|
|
{{- $paginator = .Paginate .Data.Pages.ByDate.Reverse -}}
|
|
{{ 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) }}
|
|
{{- end -}}
|
|
|
|
{{ define "sidebar" }}
|
|
{{- partial "structure/empty" . }}
|
|
{{ end }} |