{{ define "main" }}
{{/* Variants (section "varianten") are detail pages per method, not their
own methods - deliberately excluded everywhere here, otherwise they'd
show up twice in search/filter/card list. Methods themselves live at
the content root (section ""), see hugo/hugo.toml. */}}
{{ $methodenPages := where site.RegularPages "Section" "" }}
{{/* Duration/group size/license no longer sit directly on the method since
variants were introduced, but are aggregated per method from its
variants into a range/set (partials/variantenspanne.html) - here
additionally aggregated across all methods, for the outer bounds of
the filter sliders resp. the license filter list. */}}
{{ $dauerMin := 0 }}{{ $dauerMax := 0 }}{{ $dauerSeen := false }}
{{ $groesseMin := 0 }}{{ $groesseMax := 0 }}{{ $groesseSeen := false }}
{{ $lizenzen := slice }}
{{ range $methodenPages }}
{{/* partialCached with .RelPermalink as the key: method-card.html below
computes the same partial for the same page again - caching avoids
running the variantenspanne.html aggregation twice per method. */}}
{{ $spanne := partialCached "variantenspanne.html" . .RelPermalink }}
{{ $lizenzen = $lizenzen | append $spanne.lizenzen }}
{{ if $spanne.dauerSeen }}
{{ if $dauerSeen }}
{{ if lt $spanne.dauerMin $dauerMin }}{{ $dauerMin = $spanne.dauerMin }}{{ end }}
{{ if gt $spanne.dauerMax $dauerMax }}{{ $dauerMax = $spanne.dauerMax }}{{ end }}
{{ else }}
{{ $dauerMin = $spanne.dauerMin }}{{ $dauerMax = $spanne.dauerMax }}{{ $dauerSeen = true }}
{{ end }}
{{ end }}
{{ if $spanne.groesseSeen }}
{{ if $groesseSeen }}
{{ if lt $spanne.groesseMin $groesseMin }}{{ $groesseMin = $spanne.groesseMin }}{{ end }}
{{ if gt $spanne.groesseMax $groesseMax }}{{ $groesseMax = $spanne.groesseMax }}{{ end }}
{{ else }}
{{ $groesseMin = $spanne.groesseMin }}{{ $groesseMax = $spanne.groesseMax }}{{ $groesseSeen = true }}
{{ end }}
{{ end }}
{{ end }}
{{ $lizenzen = $lizenzen | uniq | sort }}
{{/* Bridge to the Pagefind full-text search (layouts/suche/list.html):
the search up here only filters the cards' title/description/tags,
not the full variant text. filter.js keeps the href live in sync
with the current search field content. */}}
Volltextsuche über alle InhalteFilter
{{ if gt (len $lizenzen) 1 }}
{{ end }}
{{ if $dauerSeen }}
Dauer: – Min.
{{ end }}
{{ if $groesseSeen }}
Gruppengröße: –
{{ end }}
{{ range sort $methodenPages "Params.titel" }}
{{ partial "method-card.html" . }}
{{ end }}
Keine Methoden gefunden. Filter anpassen oder Suchbegriff ändern.