Vorlage fuer eigene Ableger-Installationen: Website + CMS-Code
Bereinigt von Pilot-Spezifika (echte Inhalte, Erzbistum-Hamburg-Bezuege, Domain-Werte) - install.env und hugo.toml [params] mit generischen Platzhaltern. docs/ komplett entfernt: Konzept, Manifest, Installations- anleitungen leben jetzt auf der Projekt-Website statt redundant im Repo, README verweist dorthin. Decap-CMS-Version von einer floatenden ^3.0.0 auf ein festes 3.15.1 gepinnt.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{{/* Attachments belong to the variant (page resources in the respective
|
||||
bundle folder), not the method - called with the respective variant
|
||||
page as context. */}}
|
||||
{{ with .Params.anhaenge }}
|
||||
<section class="method__section">
|
||||
<h2>Anhänge</h2>
|
||||
<ul class="method__attachments">
|
||||
{{ range . }}
|
||||
{{ $anhang := . }}
|
||||
{{ with $.Resources.GetMatch $anhang.datei }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ $anhang.beschreibung | default $anhang.datei }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,33 @@
|
||||
{{/* "Diese Variante" (this variant) - all variant-specific details,
|
||||
deliberately NOT in the steckbrief box (see
|
||||
partials/steckbrief-box.html), so the box always looks the same
|
||||
regardless of the number of variants. The variant description is
|
||||
deliberately shown first, right under the heading. Shared between the
|
||||
method page (when the method has exactly one variant) and the variant
|
||||
page itself - see the project website (background/analysis notes) Teil 2.3. Called with
|
||||
the respective variant as context. */}}
|
||||
{{ $variante := . }}
|
||||
<section class="method__section">
|
||||
<h2>Diese Variante</h2>
|
||||
{{ with $variante.Params.varianten_beschreibung }}<p class="method__lead">{{ . }}</p>{{ end }}
|
||||
<dl class="method__meta-inline">
|
||||
{{ if isset $variante.Params "dauer_minuten" }}<div><dt>Dauer</dt><dd>{{ $variante.Params.dauer_minuten }} Minuten</dd></div>{{ end }}
|
||||
{{ if or (isset $variante.Params "gruppengroesse_min") (isset $variante.Params "gruppengroesse_max") }}
|
||||
<div><dt>Gruppengröße</dt><dd>{{ if eq $variante.Params.gruppengroesse_min $variante.Params.gruppengroesse_max }}{{ $variante.Params.gruppengroesse_min }}{{ else }}{{ $variante.Params.gruppengroesse_min }}–{{ $variante.Params.gruppengroesse_max }}{{ end }}</dd></div>
|
||||
{{ end }}
|
||||
{{ with $variante.Params.lizenz }}<div><dt>Lizenz</dt><dd>{{ . }}</dd></div>{{ end }}
|
||||
{{ with $variante.Params.kennung }}<div><dt>ID</dt><dd>{{ . }}</dd></div>{{ end }}
|
||||
</dl>
|
||||
{{ with $variante.Params.material }}
|
||||
<p class="method__label">Material</p>
|
||||
<ul>{{ range . }}<li>{{ . }}</li>{{ end }}</ul>
|
||||
{{ end }}
|
||||
{{ with $variante.Params.autoren }}
|
||||
<p class="method__label">Autor:innen</p>
|
||||
<ul>{{ range . }}<li>{{ . }}</li>{{ end }}</ul>
|
||||
{{ end }}
|
||||
{{ with $variante.Params.quellen }}
|
||||
<p class="method__label">Quellen</p>
|
||||
<ul>{{ range . }}<li>{{ . }}</li>{{ end }}</ul>
|
||||
{{ end }}
|
||||
</section>
|
||||
@@ -0,0 +1,65 @@
|
||||
{{ $p := . }}
|
||||
{{ $spanne := partialCached "variantenspanne.html" $p $p.RelPermalink }}
|
||||
{{ $searchbits := slice ($p.Params.titel | default $p.Title) }}
|
||||
{{ with $p.Params.kurzbeschreibung }}{{ $searchbits = $searchbits | append . }}{{ end }}
|
||||
{{ with $p.Params.verwendungsmoeglichkeit }}{{ $searchbits = $searchbits | append . }}{{ end }}
|
||||
{{ with $p.Params.zielgruppe }}{{ $searchbits = $searchbits | append (delimit . " ") }}{{ end }}
|
||||
{{ with $p.Params.kompetenzbereich }}{{ $searchbits = $searchbits | append (delimit . " ") }}{{ end }}
|
||||
{{ with $p.Params.kategorie }}{{ $searchbits = $searchbits | append (delimit . " ") }}{{ end }}
|
||||
{{ with $p.Params.tags }}{{ $searchbits = $searchbits | append (delimit . " ") }}{{ end }}
|
||||
{{ with $spanne.lizenzen }}{{ $searchbits = $searchbits | append (delimit . " ") }}{{ end }}
|
||||
{{ $searchtext := delimit $searchbits " " | lower }}
|
||||
<article class="method-card"
|
||||
data-search="{{ $searchtext }}"
|
||||
data-zielgruppe="{{ with $p.Params.zielgruppe }}{{ delimit . "|" }}{{ end }}"
|
||||
data-kompetenzbereich="{{ with $p.Params.kompetenzbereich }}{{ delimit . "|" }}{{ end }}"
|
||||
data-kategorie="{{ with $p.Params.kategorie }}{{ delimit . "|" }}{{ end }}"
|
||||
data-lizenz="{{ with $spanne.lizenzen }}{{ delimit . "|" }}{{ end }}"
|
||||
data-dauer-min="{{ if $spanne.dauerSeen }}{{ $spanne.dauerMin }}{{ end }}"
|
||||
data-dauer-max="{{ if $spanne.dauerSeen }}{{ $spanne.dauerMax }}{{ end }}"
|
||||
data-gruppengroesse-min="{{ if $spanne.groesseSeen }}{{ $spanne.groesseMin }}{{ end }}"
|
||||
data-gruppengroesse-max="{{ if $spanne.groesseSeen }}{{ $spanne.groesseMax }}{{ end }}"
|
||||
>
|
||||
<h3><a href="{{ $p.RelPermalink }}">{{ $p.Params.titel | default $p.Title }}</a></h3>
|
||||
{{ with $p.Params.kurzbeschreibung }}<p class="method-card__desc">{{ . }}</p>{{ end }}
|
||||
<dl class="method-card__meta">
|
||||
{{ if $spanne.dauerSeen }}
|
||||
<div><dt>Dauer</dt><dd>{{ if eq $spanne.dauerMin $spanne.dauerMax }}{{ $spanne.dauerMin }}{{ else }}{{ $spanne.dauerMin }}–{{ $spanne.dauerMax }}{{ end }} Min.</dd></div>
|
||||
{{ end }}
|
||||
{{ if $spanne.groesseSeen }}
|
||||
<div><dt>Gruppengröße</dt><dd>{{ if eq $spanne.groesseMin $spanne.groesseMax }}{{ $spanne.groesseMin }}{{ else }}{{ $spanne.groesseMin }}–{{ $spanne.groesseMax }}{{ end }}</dd></div>
|
||||
{{ end }}
|
||||
</dl>
|
||||
{{ with $p.Params.zielgruppe }}
|
||||
<div class="method-card__group">
|
||||
<p class="method-card__label">Zielgruppe</p>
|
||||
<ul class="method-card__tags method-card__tags--zielgruppe">
|
||||
{{ range . }}<li><button type="button" class="facet-chip" data-facet="zielgruppe" data-value="{{ . }}">{{ . }}</button></li>{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with $p.Params.kompetenzbereich }}
|
||||
<div class="method-card__group">
|
||||
<p class="method-card__label">Kompetenzbereich</p>
|
||||
<ul class="method-card__tags method-card__tags--kompetenz">
|
||||
{{ range . }}<li><button type="button" class="facet-chip" data-facet="kompetenzbereich" data-value="{{ . }}">{{ . }}</button></li>{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with $p.Params.kategorie }}
|
||||
<div class="method-card__group">
|
||||
<p class="method-card__label">Kategorie</p>
|
||||
<ul class="method-card__tags method-card__tags--kategorie">
|
||||
{{ range . }}<li><button type="button" class="facet-chip" data-facet="kategorie" data-value="{{ . }}">{{ . }}</button></li>{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ with $p.Params.tags }}
|
||||
<div class="method-card__group">
|
||||
<p class="method-card__label">Tags</p>
|
||||
<ul class="method-card__tags">
|
||||
{{ range . }}<li><button type="button" class="facet-chip facet-chip--tag" data-facet="search" data-value="{{ . }}">{{ . }}</button></li>{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
{{ end }}
|
||||
</article>
|
||||
@@ -0,0 +1,7 @@
|
||||
{{/* Returns the method page belonging to the variant (or nil, if none is
|
||||
found - should practically never happen due to Regel 1 in
|
||||
scripts/validate.rb). Called with the respective variant as context.
|
||||
Linked via Params.kennung, not via Params.titel or the filename/slug,
|
||||
see admin/config.template.yml and the Manifest chapter on the project website. */}}
|
||||
{{ $matches := where site.RegularPages "Params.kennung" .Params.methode }}
|
||||
{{ if $matches }}{{ return (index $matches 0) }}{{ end }}
|
||||
@@ -0,0 +1,85 @@
|
||||
{{/* Self-describing markdown document for a variant, for the methoden-set
|
||||
tool (methoden-set/, see the Methoden-Set chapter on the project website). Shared by
|
||||
varianten/single.md (own variant URL) and _default/single.md (method
|
||||
URL, when the method has exactly one variant - the same "one variant
|
||||
-> embed" logic as _default/single.html, see there) - methods with
|
||||
only one variant otherwise have no URL usable via the tool, because
|
||||
their HTML page embeds the variant text directly, without showing a
|
||||
visible link to the actual variant URL. Deliberately ONLY a minimal
|
||||
YAML header (titel, quelle) - the client only needs the title from it
|
||||
for the sort list and the source as a validation anchor; authors/
|
||||
license/origin are instead written as readable text directly into the
|
||||
body (a prose citation at the end), no second metadata structure to
|
||||
parse in JS needed for that - assembly happens here in Hugo, not in
|
||||
the client. Fields/order follow partials/steckbrief-box.html and
|
||||
partials/diese-variante.html, just rendered as markdown instead of
|
||||
HTML. Called with the respective variant as context. */}}
|
||||
{{- $variante := . -}}
|
||||
{{- $methode := partial "methode-fuer-variante.html" . -}}
|
||||
{{- $methodenTitel := "" -}}
|
||||
{{- with $methode }}{{ $methodenTitel = (.Params.titel | default .Title) }}{{ end -}}
|
||||
{{- $titel := printf "%s – %s" $methodenTitel $variante.Params.untertitel -}}
|
||||
{{/* Embedded images () are still relative in the raw
|
||||
markdown - unlike .Content (see _markup/render-image.html), Hugo does
|
||||
not apply its render hooks to .RawContent. So for every page resource
|
||||
of the variant, the filename in the parenthesized part of a markdown
|
||||
image reference is replaced here by the absolute permalink URL, so the
|
||||
image also resolves outside the original page (zip/markdown/Word) -
|
||||
covers the "" case used in practice, not every
|
||||
conceivable markdown syntax variant (e.g. reference links). */ -}}
|
||||
{{- $inhalt := $variante.RawContent -}}
|
||||
{{- range $variante.Resources -}}
|
||||
{{- $inhalt = replace $inhalt (printf "](%s)" .Name) (printf "](%s)" .Permalink) -}}
|
||||
{{- end -}}
|
||||
{{/* Sections written by users (preparation/procedure/background) are H1 in
|
||||
the editor, but here should sit under the document heading and
|
||||
"## Diese Variante", not next to it - see
|
||||
partials/methoden-set-shift-headings.html. */ -}}
|
||||
{{- $inhalt = partial "methoden-set-shift-headings.html" $inhalt -}}
|
||||
---
|
||||
titel: {{ $titel | jsonify }}
|
||||
quelle: {{ $variante.Permalink | jsonify }}
|
||||
---
|
||||
# {{ $titel }}
|
||||
|
||||
{{ with $methode }}
|
||||
{{ with .Params.verwendungsmoeglichkeit }}{{ . }}
|
||||
{{ end }}
|
||||
## Steckbrief
|
||||
|
||||
{{ with .Params.zielgruppe }}- Zielgruppe: {{ delimit . ", " }}
|
||||
{{ end -}}
|
||||
{{ with .Params.kompetenzbereich }}- Kompetenzbereich: {{ delimit . ", " }}
|
||||
{{ end -}}
|
||||
{{ with .Params.kategorie }}- Kategorie: {{ delimit . ", " }}
|
||||
{{ end -}}
|
||||
{{ if isset $variante.Params "dauer_minuten" }}- Dauer: {{ $variante.Params.dauer_minuten }} Minuten
|
||||
{{ end -}}
|
||||
{{ if or (isset $variante.Params "gruppengroesse_min") (isset $variante.Params "gruppengroesse_max") -}}
|
||||
- Gruppengröße: {{ if eq $variante.Params.gruppengroesse_min $variante.Params.gruppengroesse_max }}{{ $variante.Params.gruppengroesse_min }}{{ else }}{{ $variante.Params.gruppengroesse_min }}–{{ $variante.Params.gruppengroesse_max }}{{ end }}
|
||||
{{ end -}}
|
||||
{{ with $variante.Params.lizenz }}- Lizenz: {{ . }}
|
||||
{{ end }}
|
||||
{{ with .Params.lernchancen }}**Lernchancen:** {{ delimit . ", " }}
|
||||
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
## Diese Variante
|
||||
|
||||
{{ with $variante.Params.varianten_beschreibung }}{{ . }}
|
||||
|
||||
{{ end -}}
|
||||
{{ $inhalt }}
|
||||
|
||||
{{ with $variante.Params.anhaenge }}
|
||||
## Anhänge
|
||||
|
||||
{{ range . }}
|
||||
{{ $anhang := . }}
|
||||
{{ with $variante.Resources.GetMatch $anhang.datei }}- [{{ $anhang.beschreibung | default $anhang.datei }}]({{ .Permalink }})
|
||||
{{ end -}}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
---
|
||||
|
||||
*Quelle: [{{ $titel }}]({{ $variante.Permalink }}){{ with $variante.Params.autoren }} · Autor:innen: {{ delimit . ", " }}{{ end }}{{ with $variante.Params.lizenz }} · Lizenz: {{ . }}{{ end }}*
|
||||
@@ -0,0 +1,36 @@
|
||||
{{/* Shifts ATX headings (#, ##, ...) in the given markdown text down by one
|
||||
level (H1->H2 etc.), outside fenced code blocks (``` or ~~~). Reason:
|
||||
users write preparation/procedure/background as standalone H1
|
||||
sections (see the Decap CMS editor), which in the methoden-set
|
||||
document (varianten/single.md) should sit under the document heading
|
||||
and "## Diese Variante" though, not next to it at the same level.
|
||||
Called with the text as context, returns the shifted text (see
|
||||
hugo/layouts/varianten/single.md). Known limit: at most H5->H6, an H6
|
||||
would stay unshifted (no valid H7 in markdown) - doesn't occur in
|
||||
practice for this content (preparation/procedure/background, rarely
|
||||
deeper than H3). */}}
|
||||
{{- $text := . -}}
|
||||
{{- $lines := split $text "\n" -}}
|
||||
{{- $inFence := false -}}
|
||||
{{- $fenceChar := "" -}}
|
||||
{{- $ergebnis := slice -}}
|
||||
{{- range $lines -}}
|
||||
{{- $line := . -}}
|
||||
{{- $trimmed := trim $line " \t" -}}
|
||||
{{- $neueZeile := $line -}}
|
||||
{{- if or (hasPrefix $trimmed "```") (hasPrefix $trimmed "~~~") -}}
|
||||
{{- $char := substr $trimmed 0 1 -}}
|
||||
{{- if not $inFence -}}
|
||||
{{- $inFence = true -}}
|
||||
{{- $fenceChar = $char -}}
|
||||
{{- else if eq $char $fenceChar -}}
|
||||
{{- $inFence = false -}}
|
||||
{{- end -}}
|
||||
{{- else if not $inFence -}}
|
||||
{{- if findRE "^#{1,5} " $line -}}
|
||||
{{- $neueZeile = printf "#%s" $line -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $ergebnis = $ergebnis | append $neueZeile -}}
|
||||
{{- end -}}
|
||||
{{- delimit $ergebnis "\n" -}}
|
||||
@@ -0,0 +1,51 @@
|
||||
{{/* The "Steckbrief" (profile) box looks the same everywhere, regardless of
|
||||
whether it's seen on the method page (with one or several variants)
|
||||
or on the variant page - see the project website (background/analysis notes) Teil 2.3. It
|
||||
therefore contains exclusively method-owned details:
|
||||
verwendungsmoeglichkeit, zielgruppe/kompetenzbereich/kategorie/ID,
|
||||
lernchancen, herkunft, initiatoren, tags. Variant-specific fields
|
||||
(variant description, duration, group size, material, authors,
|
||||
license, sources) deliberately do NOT belong here, see
|
||||
partials/diese-variante.html - otherwise the box would look different
|
||||
depending on the number of variants. Expects a dict: methode,
|
||||
zeigeKurzbeschreibung (true only on the variant page, since it's not
|
||||
visible anywhere else there - on the method page it's already in
|
||||
method__header), zeigeLink (true only on the variant page, for the
|
||||
back-link to the method). */}}
|
||||
{{ $methode := .methode }}
|
||||
<div class="method__section method__section--methode">
|
||||
<h2>Steckbrief</h2>
|
||||
{{ if .zeigeKurzbeschreibung }}
|
||||
{{ with $methode.Params.kurzbeschreibung }}<p class="method__lead">{{ . }}</p>{{ end }}
|
||||
{{ end }}
|
||||
{{ with $methode.Params.verwendungsmoeglichkeit }}
|
||||
<p class="method__label">Verwendungsmöglichkeit</p>
|
||||
<p>{{ . }}</p>
|
||||
{{ end }}
|
||||
<dl class="method__meta-inline">
|
||||
{{ with $methode.Params.zielgruppe }}<div><dt>Zielgruppe</dt><dd>{{ delimit . ", " }}</dd></div>{{ end }}
|
||||
{{ with $methode.Params.kompetenzbereich }}<div><dt>Kompetenzbereich</dt><dd>{{ delimit . ", " }}</dd></div>{{ end }}
|
||||
{{ with $methode.Params.kategorie }}<div><dt>Kategorie</dt><dd>{{ delimit . ", " }}</dd></div>{{ end }}
|
||||
{{ with $methode.Params.kennung }}<div><dt>ID</dt><dd>{{ . }}</dd></div>{{ end }}
|
||||
</dl>
|
||||
{{ with $methode.Params.lernchancen }}
|
||||
<p class="method__label">Lernchancen</p>
|
||||
<ul>{{ range . }}<li>{{ . }}</li>{{ end }}</ul>
|
||||
{{ end }}
|
||||
{{ with $methode.Params.herkunft }}
|
||||
<p class="method__label">Herkunft</p>
|
||||
<ul>{{ range . }}<li>{{ . }}</li>{{ end }}</ul>
|
||||
{{ end }}
|
||||
{{ with $methode.Params.initiatoren }}
|
||||
<p class="method__label">Initiator:innen</p>
|
||||
<ul>{{ range . }}<li>{{ . }}</li>{{ end }}</ul>
|
||||
{{ end }}
|
||||
{{ with $methode.Params.tags }}
|
||||
<ul class="method__tags">
|
||||
{{ range . }}<li><a href="{{ (printf "/tags/%s/" (. | urlize)) | relURL }}">{{ . }}</a></li>{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
{{ if .zeigeLink }}
|
||||
<p class="method__updated"><a href="{{ $methode.RelPermalink }}">Zur Methode „{{ $methode.Params.titel | default $methode.Title }}“ →</a></p>
|
||||
{{ end }}
|
||||
</div>
|
||||
@@ -0,0 +1,25 @@
|
||||
{{/* Comparison card for a variant - used both in the multi-variant list on
|
||||
the method page and in the "Andere Varianten dieser Methode" (other
|
||||
variants of this method) section on the variant page itself (see
|
||||
hugo/layouts/_default/single.html and
|
||||
hugo/layouts/varianten/single.html). Deliberately shows only the
|
||||
fields meant for comparison - variant description, duration, group
|
||||
size, authors, license, date - no material and no attachments (see
|
||||
the project website (background/analysis notes) Teil 2.2), no highlighting of differing
|
||||
values. Called with the respective variant as context. */}}
|
||||
{{ $variante := . }}
|
||||
<article class="variant-card">
|
||||
<h3><a href="{{ $variante.RelPermalink }}">{{ $variante.Params.untertitel }}</a></h3>
|
||||
{{ with $variante.Params.varianten_beschreibung }}<p class="variant-card__desc">{{ . }}</p>{{ end }}
|
||||
<dl class="variant-card__meta">
|
||||
{{ if isset $variante.Params "dauer_minuten" }}<div><dt>Dauer</dt><dd>{{ $variante.Params.dauer_minuten }} Min.</dd></div>{{ end }}
|
||||
{{ if or (isset $variante.Params "gruppengroesse_min") (isset $variante.Params "gruppengroesse_max") }}
|
||||
<div><dt>Gruppengröße</dt><dd>{{ if eq $variante.Params.gruppengroesse_min $variante.Params.gruppengroesse_max }}{{ $variante.Params.gruppengroesse_min }}{{ else }}{{ $variante.Params.gruppengroesse_min }}–{{ $variante.Params.gruppengroesse_max }}{{ end }}</dd></div>
|
||||
{{ end }}
|
||||
{{ with $variante.Params.lizenz }}<div><dt>Lizenz</dt><dd>{{ . }}</dd></div>{{ end }}
|
||||
</dl>
|
||||
{{ with $variante.Params.autoren }}<p class="variant-card__autoren">Autor:innen: {{ delimit . ", " }}</p>{{ end }}
|
||||
{{ with index hugo.Data.varianten $variante.File.ContentBaseName }}
|
||||
<p class="method__updated">Zuletzt geändert: {{ .geaendert | time.AsTime | dateFormat "02.01.2006" }}</p>
|
||||
{{ end }}
|
||||
</article>
|
||||
@@ -0,0 +1,10 @@
|
||||
{{/* Returns all variant pages (section "varianten") belonging to the given
|
||||
method page, matched via Params.kennung, not title/slug (see
|
||||
admin/config.template.yml and the Manifest chapter on the project website) - the reverse
|
||||
direction of partials/methode-fuer-variante.html. Called with the
|
||||
respective method as context. Unsorted and unfiltered - callers apply
|
||||
their own sort/exclusion on top (see hugo/layouts/_default/single.html,
|
||||
hugo/layouts/varianten/single.html, partials/variantenspanne.html,
|
||||
hugo/layouts/_default/single.md). */}}
|
||||
{{ $varianten := where (where site.RegularPages "Section" "varianten") "Params.methode" .Params.kennung }}
|
||||
{{ return $varianten }}
|
||||
@@ -0,0 +1,37 @@
|
||||
{{/* Computes the duration/group-size range and the set of licenses present
|
||||
for a method from its variants. Called with the respective method
|
||||
page as context, returns a dict with dauerMin/dauerMax/dauerSeen,
|
||||
groesseMin/groesseMax/groesseSeen ("Seen" distinguishes "no value
|
||||
present" from "value is 0") and lizenzen (sorted, unique list). Used
|
||||
by the method page, the cards on the homepage, and the filters there,
|
||||
so the same logic doesn't exist multiple times. Material deliberately
|
||||
NOT here: no aggregation planned on the method page, see
|
||||
admin/config.template.yml. */}}
|
||||
{{ $methode := . }}
|
||||
{{ $varianten := partial "varianten-fuer-methode.html" $methode }}
|
||||
|
||||
{{ $dauerMin := 0 }}{{ $dauerMax := 0 }}{{ $dauerSeen := false }}
|
||||
{{ $groesseMin := 0 }}{{ $groesseMax := 0 }}{{ $groesseSeen := false }}
|
||||
{{ $lizenzen := slice }}
|
||||
{{ range $varianten }}
|
||||
{{ if isset .Params "dauer_minuten" }}
|
||||
{{ $dauer := .Params.dauer_minuten }}
|
||||
{{ if $dauerSeen }}
|
||||
{{ if lt $dauer $dauerMin }}{{ $dauerMin = $dauer }}{{ end }}
|
||||
{{ if gt $dauer $dauerMax }}{{ $dauerMax = $dauer }}{{ end }}
|
||||
{{ else }}
|
||||
{{ $dauerMin = $dauer }}{{ $dauerMax = $dauer }}{{ $dauerSeen = true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if isset .Params "gruppengroesse_min" }}
|
||||
{{ $gmin := .Params.gruppengroesse_min }}
|
||||
{{ if $groesseSeen }}{{ if lt $gmin $groesseMin }}{{ $groesseMin = $gmin }}{{ end }}{{ else }}{{ $groesseMin = $gmin }}{{ $groesseSeen = true }}{{ end }}
|
||||
{{ end }}
|
||||
{{ if isset .Params "gruppengroesse_max" }}
|
||||
{{ if gt .Params.gruppengroesse_max $groesseMax }}{{ $groesseMax = .Params.gruppengroesse_max }}{{ end }}
|
||||
{{ end }}
|
||||
{{ with .Params.lizenz }}{{ $lizenzen = $lizenzen | append . }}{{ end }}
|
||||
{{ end }}
|
||||
{{ $lizenzen = $lizenzen | uniq | sort }}
|
||||
|
||||
{{ return dict "dauerMin" $dauerMin "dauerMax" $dauerMax "dauerSeen" $dauerSeen "groesseMin" $groesseMin "groesseMax" $groesseMax "groesseSeen" $groesseSeen "lizenzen" $lizenzen }}
|
||||
Reference in New Issue
Block a user