{{ define "main" }}

{{ if eq .Parent (.GetPage "/") }} {{ T "list.section" }} {{ else }} {{ .Parent.Title }} {{ end }}

{{ T "list.page" (len .Pages) }}

{{ .Title }}

{{ with .Params.description }}

{{ . }}

{{ end }}
{{- $image := partialCached "helper/image" (dict "Context" . "Type" "section") .RelPermalink "section" -}} {{ if $image.exists }}
{{ if $image.resource }} {{- $thumbnail := $image.resource.Fill "120x120" -}} {{ else }} {{ end }}
{{ end }}
{{ $subsections := .Sections }} {{ with $subsections }}

{{ T "list.subsection" (len $subsections) }}

{{ range . }} {{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "section") }} {{ end }}
{{ end }} {{/* List only pages that are not a subsection */}} {{ $paginator := .Paginate (.Pages | complement $subsections) }}
{{ range $paginator.Pages }} {{ partial "article-list/compact" . }} {{ end }}
{{- partial "pagination.html" . -}} {{ partialCached "footer/footer" . }} {{ end }} {{ define "right-sidebar" }} {{ partialCached "sidebar/right.html" . }} {{ end }}