2020-09-06 14:18:38 +02:00
|
|
|
{{ define "main" }}
|
2022-03-03 23:11:19 +01:00
|
|
|
<header>
|
|
|
|
|
<h3 class="section-title">
|
|
|
|
|
{{ if eq .Parent (.GetPage "/") }}
|
|
|
|
|
{{ T "list.section" }}
|
|
|
|
|
{{ else }}
|
|
|
|
|
{{ .Parent.Title }}
|
2020-12-22 21:14:50 +01:00
|
|
|
{{ end }}
|
2022-03-03 23:11:19 +01:00
|
|
|
</h3>
|
2020-12-22 21:14:50 +01:00
|
|
|
|
2022-03-03 23:11:19 +01:00
|
|
|
<div class="section-card">
|
|
|
|
|
<div class="section-details">
|
|
|
|
|
<h3 class="section-count">{{ T "list.page" (len .Pages) }}</h3>
|
|
|
|
|
<h1 class="section-term">{{ .Title }}</h1>
|
|
|
|
|
{{ with .Params.description }}
|
|
|
|
|
<h2 class="section-description">{{ . }}</h2>
|
2020-12-22 21:14:50 +01:00
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
2022-03-03 23:11:19 +01:00
|
|
|
|
2026-03-05 17:58:40 +01:00
|
|
|
{{- $image := partial "helper/image" (dict "Image" .Params.image "Resources" .Resources "Context" .) -}}
|
2026-01-25 23:29:41 +01:00
|
|
|
{{ if $image }}
|
2022-03-03 23:11:19 +01:00
|
|
|
<div class="section-image">
|
2026-03-05 13:57:37 +01:00
|
|
|
{{ partial "helper/thumbnail-image" (dict
|
|
|
|
|
"Resource" $image.Resource
|
|
|
|
|
"Width" 60
|
|
|
|
|
"Height" 60
|
|
|
|
|
"Resize" .Site.Params.ImageProcessing.Thumbnail.Enabled
|
|
|
|
|
"Attributes" (dict
|
|
|
|
|
"src" $image.Permalink
|
|
|
|
|
"alt" .Title
|
|
|
|
|
"loading" "lazy"
|
|
|
|
|
"width" $image.Width
|
|
|
|
|
"height" $image.Height
|
|
|
|
|
)
|
|
|
|
|
) }}
|
2022-03-03 23:11:19 +01:00
|
|
|
</div>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
|
|
|
|
</header>
|
2020-12-22 21:14:50 +01:00
|
|
|
|
2026-01-27 12:34:15 +01:00
|
|
|
{{- $pages := partial "helper/pages.html" . -}}
|
2021-01-07 11:28:16 +01:00
|
|
|
{{- $subsections := .Sections -}}
|
|
|
|
|
|
2026-01-27 12:34:15 +01:00
|
|
|
{{- if and (eq (len $pages) (len $subsections)) (eq $pages $subsections) -}}
|
2021-01-07 11:28:16 +01:00
|
|
|
{{- $subsections = slice -}}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
|
|
{{- with $subsections -}}
|
2022-03-03 23:11:19 +01:00
|
|
|
<aside>
|
|
|
|
|
<h2 class="section-title">{{ T "list.subsection" (len $subsections) }}</h2>
|
|
|
|
|
<div class="subsection-list">
|
|
|
|
|
<div class="article-list--tile">
|
|
|
|
|
{{ range . }}
|
|
|
|
|
{{ partial "article-list/tile" (dict "context" . "size" "250x150" "Type" "section") }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
2020-12-22 21:14:50 +01:00
|
|
|
</div>
|
2022-03-03 23:11:19 +01:00
|
|
|
</aside>
|
2021-01-07 11:28:16 +01:00
|
|
|
{{- end -}}
|
2020-12-22 21:14:50 +01:00
|
|
|
|
|
|
|
|
{{/* List only pages that are not a subsection */}}
|
2026-01-25 17:54:13 +01:00
|
|
|
{{ $paginator := partial "helper/paginator.html" . }}
|
|
|
|
|
{{ with $paginator }}
|
|
|
|
|
<section class="article-list--compact">
|
|
|
|
|
{{ range .Pages }}
|
|
|
|
|
{{ partial "article-list/compact" . }}
|
|
|
|
|
{{ end }}
|
|
|
|
|
</section>
|
|
|
|
|
{{ end }}
|
2020-09-06 14:18:38 +02:00
|
|
|
|
2020-09-12 10:33:53 +02:00
|
|
|
{{- partial "pagination.html" . -}}
|
2020-09-06 14:18:38 +02:00
|
|
|
|
2020-09-12 10:33:53 +02:00
|
|
|
{{ partialCached "footer/footer" . }}
|
|
|
|
|
{{ end }}
|
2020-09-06 14:18:38 +02:00
|
|
|
|
2020-09-12 10:33:53 +02:00
|
|
|
{{ define "right-sidebar" }}
|
2022-02-26 23:45:25 +01:00
|
|
|
{{ partial "sidebar/right.html" (dict "Context" . "Scope" "homepage") }}
|
2020-09-06 14:18:38 +02:00
|
|
|
{{ end }}
|