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.
@@ -0,0 +1,3 @@
|
||||
---
|
||||
title: "Suche"
|
||||
---
|
||||
@@ -0,0 +1,175 @@
|
||||
# hugo/hugo.template.toml
|
||||
# Root configuration for Ableger - template, not read by Hugo directly.
|
||||
# scripts/generate-config.sh generates hugo/hugo.toml from this file (same
|
||||
# {{VARIABLE}} substitution it already does for admin/config.yml), filling
|
||||
# in WEBSITE_DOMAIN/GITEA_DOMAIN/METHODEN_REPO from install.env. hugo.toml
|
||||
# itself is generated and not versioned (see .gitignore) - edit this file
|
||||
# instead. Reason: Hugo's own config file can't read install.env, so these
|
||||
# two values (baseURL, methoden_repo_url below) would otherwise have to be
|
||||
# kept in sync by hand on every fork - found live, twice, while setting up
|
||||
# a second test instance.
|
||||
|
||||
baseURL = "https://{{WEBSITE_DOMAIN}}/"
|
||||
locale = "de-DE"
|
||||
title = "Ableger"
|
||||
|
||||
# Once module.mounts is set at all, every mount needed must be listed
|
||||
# explicitly - Hugo's default mounts no longer apply automatically then.
|
||||
|
||||
[[module.mounts]]
|
||||
# Method content lives in the separate repo ableger_demo/ableger_methoden
|
||||
# (see the concept chapter on the project website Abschnitt 9). ../_content is freshly fetched by
|
||||
# scripts/sync-methoden.sh (not versioned, see .gitignore) and itself
|
||||
# contains a methoden/ subfolder (Decap CMS workaround, see
|
||||
# admin/config.yml).
|
||||
source = "../_content/methoden"
|
||||
target = "content"
|
||||
|
||||
[[module.mounts]]
|
||||
# Variants (preparation/procedure/background per method, see Konzept
|
||||
# Abschnitt 8) live as their own Decap collection in a dedicated top-level
|
||||
# folder in the content repo, not inside the method's own folder - the
|
||||
# link to the corresponding method happens via a relation field,
|
||||
# evaluated in hugo/layouts/_default/single.html via "where", not via
|
||||
# file paths. varianten/_index.md (in the content repo, not managed by
|
||||
# Decap) hides variant pages from all views that list methods (cascade
|
||||
# "_build.list: never") - they can still be opened individually, just
|
||||
# aren't part of .Site.RegularPages.
|
||||
source = "../_content/varianten"
|
||||
target = "content/varianten"
|
||||
|
||||
[[module.mounts]]
|
||||
# protokoll_version for the footer (see layouts/_default/baseof.html) -
|
||||
# the same file that the Manifest chapter on the project website requires as Regel 14. Lives at the
|
||||
# root of the content repo, not in methoden/ or varianten/.
|
||||
source = "../_content/ableger.yml"
|
||||
target = "data/ableger.yml"
|
||||
|
||||
[[module.mounts]]
|
||||
# Static pages with no relation to the content repo (currently: /suche/,
|
||||
# see layouts/suche/list.html) - a dedicated mount versioned here in the
|
||||
# website repo instead of a local hugo/content/ folder, because
|
||||
# module.mounts is already set, so Hugo's implicit default mount for
|
||||
# "content" no longer applies (see comment above).
|
||||
source = "content-static"
|
||||
target = "content"
|
||||
|
||||
[[module.mounts]]
|
||||
source = "static"
|
||||
target = "static"
|
||||
|
||||
[[module.mounts]]
|
||||
source = "layouts"
|
||||
target = "layouts"
|
||||
|
||||
[[module.mounts]]
|
||||
source = "assets"
|
||||
target = "assets"
|
||||
|
||||
[[module.mounts]]
|
||||
source = "data"
|
||||
target = "data"
|
||||
|
||||
# Taxonomies: map the metadata fields from the schema (Abschnitt 8 of the
|
||||
# Konzept) directly to filterable, searchable categories - no extra code.
|
||||
# Key and value deliberately kept identical (instead of e.g.
|
||||
# zielgruppe = "zielgruppen"): Hugo's automatic singular/plural detection is
|
||||
# built for English words and otherwise creates extra, empty ghost
|
||||
# taxonomies for German plural forms. The only exception: `tag`/"tags",
|
||||
# because the frontmatter field itself is already called "tags".
|
||||
# Variants live in Hugo's "varianten" section (see module.mounts above),
|
||||
# but are meant to appear in the URL without a folder prefix, just like
|
||||
# methods (expected by the Decap preview button, preview_path:
|
||||
# "{{dirname}}" in admin/config.template.yml - without this override,
|
||||
# preview would point to a 404 URL without the "varianten/" prefix). :slug
|
||||
# is always "<methode>--<untertitel>" for variants, so it doesn't collide
|
||||
# with method slugs.
|
||||
[permalinks]
|
||||
# :slug stays empty here (variants have no title/slug frontmatter field -
|
||||
# the slug is derived purely from the folder name assigned by Decap),
|
||||
# :contentbasename is used instead, which takes the actual bundle folder
|
||||
# name. Verified live: with :slug, all variant URLs collapsed onto "/"
|
||||
# (":filename" would be the obvious name, but has been removed since Hugo
|
||||
# 0.144).
|
||||
varianten = "/:contentbasename/"
|
||||
|
||||
# Raw markdown per variant, for the methoden-set tool (methoden-set/, see
|
||||
# the Methoden-Set chapter on the project website) - serves a self-describing markdown document under
|
||||
# "<variant>index.md" (own YAML header, steckbrief and variant fields,
|
||||
# content, attachment links) that the client fetches via fetch(), instead
|
||||
# of parsing HTML.
|
||||
[outputFormats.MethodenSetMd]
|
||||
mediaType = "text/markdown"
|
||||
baseName = "index"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
|
||||
[[cascade]]
|
||||
outputs = ["HTML", "MethodenSetMd"]
|
||||
[cascade.target]
|
||||
kind = "page"
|
||||
path = "{/varianten/**}"
|
||||
|
||||
# Method URLs also serve "index.md" - with exactly one variant, using the
|
||||
# same document as the variant itself (see partials/methoden-set-
|
||||
# dokument.html and _default/single.md), otherwise a short notice document.
|
||||
# Reason: if a method has only one variant, its HTML page
|
||||
# (_default/single.html) embeds the variant text directly, without showing
|
||||
# a visible link to the actual variant URL - so users are likely to copy
|
||||
# the method URL, not the (non-obvious) variant URL. A dedicated, second
|
||||
# cascade rule instead of a single "{/**}" pattern for both sections:
|
||||
# method paths have exactly one segment ("/beispiel-methode"), variant
|
||||
# paths have two ("/varianten/<slug>") - the "{/*}" glob (no "**") only
|
||||
# matches single path segments, so it doesn't collide with the rule above.
|
||||
[[cascade]]
|
||||
outputs = ["HTML", "MethodenSetMd"]
|
||||
[cascade.target]
|
||||
kind = "page"
|
||||
path = "{/*}"
|
||||
|
||||
# Serves the site title (among other things) as JSON under /site-meta.json -
|
||||
# admin/index.html and admin/status/index.html are plain static files
|
||||
# without Hugo templating (see the installation guide on the project website, copied unchanged
|
||||
# via rsync) and therefore load this file via fetch(), so "Ableger" isn't
|
||||
# hardcoded a second time in the title/header but taken from .Site.Title.
|
||||
[outputFormats.SiteMeta]
|
||||
mediaType = "application/json"
|
||||
baseName = "site-meta"
|
||||
isPlainText = true
|
||||
notAlternative = true
|
||||
|
||||
[outputs]
|
||||
home = ["HTML", "RSS", "SiteMeta"]
|
||||
|
||||
[taxonomies]
|
||||
zielgruppe = "zielgruppe"
|
||||
kompetenzbereich = "kompetenzbereich"
|
||||
kategorie = "kategorie"
|
||||
tag = "tags"
|
||||
|
||||
[params]
|
||||
# First sentence on the homepage - deliberately generic instead of
|
||||
# provider-specific, so forks don't have to change it.
|
||||
beschreibung = "Ableger ist eine strukturierte Sammlung von Methoden."
|
||||
# Primary (accent) color of the read UI - set as a CSS custom property in baseof.html.
|
||||
farbe_primaer = "#3c8a98"
|
||||
# Footer link to the content repo (see layouts/_default/baseof.html) -
|
||||
# replaces a blanket license sentence, which would be wrong anyway since
|
||||
# variants were introduced (no longer ONE value for all methods, see the
|
||||
# "Manifest" chapter on the project website). Derived automatically from
|
||||
# GITEA_DOMAIN + METHODEN_REPO in install.env, not edited here directly.
|
||||
methoden_repo_url = "https://{{GITEA_DOMAIN}}/{{METHODEN_REPO}}"
|
||||
# Provider name for the footer (see layouts/_default/baseof.html).
|
||||
# Rendered as a link when betreiber_url is set, otherwise as plain text.
|
||||
betreiber_name = "Ableger-Projekt"
|
||||
# Link to the provider. Placeholder - adjust on a fork.
|
||||
betreiber_url = "https://example.org"
|
||||
# Imprint, privacy policy, and a link to the website repo (counterpart to
|
||||
# methoden_repo_url above, for the footer placeholder "Ableger-Projekt") -
|
||||
# still without a target, since there is no project page for it yet. As
|
||||
# long as these three lines stay commented out, the footer keeps showing
|
||||
# the previous "Folgt" placeholder (see baseof.html). On a fork, fill in
|
||||
# your own URL here once you have one.
|
||||
# impressum_url = ""
|
||||
# datenschutz_url = ""
|
||||
# website_repo_url = ""
|
||||
@@ -0,0 +1,18 @@
|
||||
{{/* We resolve image paths in variant content () via the
|
||||
page resources of the page the content belongs to (the variant) - not
|
||||
the page that embeds .Content. With only one variant, the method page
|
||||
(hugo/layouts/_default/single.html) embeds this content directly; a
|
||||
raw relative path would resolve against the wrong URL there (the file
|
||||
lives in the variant's bundle folder, not the method's). An absolute
|
||||
permalink makes the embed location-independent. */}}
|
||||
{{- $resource := "" }}
|
||||
{{- if not (urls.Parse .Destination).IsAbs }}
|
||||
{{- with .Page.Resources.GetMatch .Destination }}
|
||||
{{- $resource = . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if $resource }}
|
||||
<img src="{{ $resource.Permalink }}" alt="{{ .Text }}"{{ with .Title }} title="{{ . }}"{{ end }}>
|
||||
{{- else }}
|
||||
<img src="{{ .Destination }}" alt="{{ .Text }}"{{ with .Title }} title="{{ . }}"{{ end }}>
|
||||
{{- end }}
|
||||
@@ -0,0 +1,191 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Site.Language.Locale | default "de" }}">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
{{ $seiten_titel := .Params.titel | default .Title }}
|
||||
{{ $beschreibung := .Params.kurzbeschreibung | default .Site.Params.beschreibung }}
|
||||
{{ if eq .Section "varianten" }}
|
||||
{{ with partial "methode-fuer-variante.html" . }}
|
||||
{{ $seiten_titel = printf "%s – %s" (.Params.titel | default .Title) $.Params.untertitel }}
|
||||
{{ $beschreibung = .Params.kurzbeschreibung | default $.Site.Params.beschreibung }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ $seiten_titel }} · {{ .Site.Title }}{{ end }}</title>
|
||||
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.beschreibung }}{{ else }}{{ $beschreibung }}{{ end }}">
|
||||
<link rel="stylesheet" href="{{ "css/style.css" | relURL }}">
|
||||
{{/* SVG first: has dark-mode switching built in (@media
|
||||
prefers-color-scheme within the file itself) and is preferred by
|
||||
current browsers. The PNG variants below are the fallback for
|
||||
browsers/contexts without SVG favicon support - since PNGs can't do
|
||||
@media queries themselves, there's a separate light/dark pair for
|
||||
them with media="(prefers-color-scheme: ...)" on the <link> itself
|
||||
(introduced by Safari, meanwhile more widely supported). Without
|
||||
this, the PNG fallback would be low-contrast in dark browser chrome
|
||||
(dark green icon on a transparent background). */}}
|
||||
<link rel="icon" href="{{ "favicon.svg" | relURL }}" type="image/svg+xml">
|
||||
<link rel="icon" href="{{ "favicon-32x32.png" | relURL }}" sizes="32x32" type="image/png" media="(prefers-color-scheme: light)">
|
||||
<link rel="icon" href="{{ "favicon-16x16.png" | relURL }}" sizes="16x16" type="image/png" media="(prefers-color-scheme: light)">
|
||||
<link rel="icon" href="{{ "favicon-32x32-dark.png" | relURL }}" sizes="32x32" type="image/png" media="(prefers-color-scheme: dark)">
|
||||
<link rel="icon" href="{{ "favicon-16x16-dark.png" | relURL }}" sizes="16x16" type="image/png" media="(prefers-color-scheme: dark)">
|
||||
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | relURL }}">
|
||||
{{ with .Site.Params.farbe_primaer }}
|
||||
<style>:root{ --color-accent: {{ . }}; }</style>
|
||||
{{ end }}
|
||||
</head>
|
||||
<body>
|
||||
<header class="site-header">
|
||||
<a class="site-title" href="{{ "/" | relURL }}">
|
||||
<img src="{{ "img/logo.svg" | relURL }}" alt="" class="site-logo" width="32" height="32">
|
||||
{{ .Site.Title }}
|
||||
</a>
|
||||
<div class="site-header__actions">
|
||||
{{/* On a wide screen, a real, always-visible search bar; on narrow
|
||||
screens it expands via the button. Deliberately NO <details>
|
||||
here AND for "Stöbern" (browse) (unlike an earlier version):
|
||||
<details> internally collapses to 0×0 in current Chromium
|
||||
versions as soon as you try to override the closed state via CSS
|
||||
(reproduced live) - and has no native "expand on hover" anyway.
|
||||
Instead both are a button + CSS-driven panel, visible via hover
|
||||
(only on pointer devices with hover, see style.css), keyboard
|
||||
focus, or click/tap - click/tap for touch devices without hover,
|
||||
see inline script below. Also works completely without
|
||||
JavaScript: a real <form method="get">, submitting navigates to
|
||||
/?q=... - filter.js prevents that only on the homepage itself
|
||||
and filters live instead, see there. */}}
|
||||
<div class="header-search" id="header-search">
|
||||
<button type="button" class="header-toggle" id="header-search-toggle" aria-expanded="false" aria-controls="header-search-form">Suchen</button>
|
||||
{{/* Target since the introduction of Pagefind full-text search:
|
||||
/suche/ instead of / - filter.js still only prevents
|
||||
submission on the homepage itself (that's where the fast
|
||||
metadata filtering over the cards lives, see there); on every
|
||||
other page a real <form method="get"> now navigates to the
|
||||
full-text search instead of the weaker metadata search on the
|
||||
homepage. */}}
|
||||
<form class="header-search__form" id="header-search-form" action="{{ "/suche/" | relURL }}" method="get" role="search">
|
||||
<label for="header-search-input" class="visually-hidden">Suchen</label>
|
||||
<input type="search" name="q" id="header-search-input" placeholder="Titel, Beschreibung, Tags …" autocomplete="off">
|
||||
</form>
|
||||
</div>
|
||||
{{/* "Stöbern" (browse) always expands regardless of screen width -
|
||||
the same four overview pages as previously in the main
|
||||
navigation. */}}
|
||||
<div class="header-browse" id="header-browse">
|
||||
<button type="button" class="header-toggle" id="header-browse-toggle" aria-expanded="false" aria-controls="header-browse-nav">Stöbern</button>
|
||||
<nav class="header-browse__nav" id="header-browse-nav">
|
||||
<a href="{{ "/zielgruppe/" | relURL }}">Zielgruppen</a>
|
||||
<a href="{{ "/kompetenzbereich/" | relURL }}">Kompetenzbereiche</a>
|
||||
<a href="{{ "/kategorie/" | relURL }}">Kategorien</a>
|
||||
<a href="{{ "/tags/" | relURL }}">Tags</a>
|
||||
</nav>
|
||||
</div>
|
||||
{{/* Standalone, static app outside of Hugo (like /admin/, see
|
||||
hugo/hugo.toml module.mounts) - hence a plain link instead of a
|
||||
relURL reference to a Hugo page. A user-visible feature, so it
|
||||
lives here in the header next to Suchen/Stöbern, not in the
|
||||
footer next to Redaktion/Status (see the Methoden-Set chapter on the project website). */}}
|
||||
<a href="/methoden-set/" class="header-toggle header-toggle--link">Methoden-Set</a>
|
||||
</div>
|
||||
</header>
|
||||
<script>
|
||||
// Runs on every page (unlike filter.js, which exits immediately if
|
||||
// #method-grid is missing) - drives click/tap toggling for
|
||||
// "Suchen"/"Stöbern" (hover itself is plain CSS, see style.css) and
|
||||
// keeps the search open once something has been entered, even after
|
||||
// the mouse moves away again or the field loses focus.
|
||||
(function () {
|
||||
function wireToggle(wrapperId, toggleId, staysOpen) {
|
||||
var wrapper = document.getElementById(wrapperId);
|
||||
var toggle = document.getElementById(toggleId);
|
||||
if (!wrapper || !toggle) return;
|
||||
|
||||
function setOpen(open) {
|
||||
wrapper.classList.toggle("is-open", open);
|
||||
toggle.setAttribute("aria-expanded", String(open));
|
||||
}
|
||||
|
||||
toggle.addEventListener("click", function () {
|
||||
setOpen(!wrapper.classList.contains("is-open"));
|
||||
});
|
||||
|
||||
document.addEventListener("click", function (event) {
|
||||
if (wrapper.contains(event.target)) return;
|
||||
if (staysOpen && staysOpen()) return;
|
||||
setOpen(false);
|
||||
});
|
||||
|
||||
return setOpen;
|
||||
}
|
||||
|
||||
var searchInput = document.getElementById("header-search-input");
|
||||
var searchHasValue = function () {
|
||||
return !!(searchInput && searchInput.value.trim());
|
||||
};
|
||||
var setSearchOpen = wireToggle("header-search", "header-search-toggle", searchHasValue);
|
||||
wireToggle("header-browse", "header-browse-toggle", null);
|
||||
|
||||
if (searchInput && setSearchOpen) {
|
||||
searchInput.addEventListener("input", function () {
|
||||
setSearchOpen(searchHasValue());
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
||||
{{/* data-pagefind-body limits the area indexed by Pagefind to the actual
|
||||
page content - without this attribute, Pagefind would also index the
|
||||
header (logo, "Suchen"/"Stöbern", navigation) and footer on every
|
||||
single page, and every search hit would additionally carry these
|
||||
terms in the index. This lives here in baseof.html, so it applies
|
||||
equally to every page - no risk that individual pages drop out of
|
||||
the index because of it (per Pagefind's own docs: "if
|
||||
data-pagefind-body appears anywhere on the site, pages without this
|
||||
attribute are no longer indexed at all"). */}}
|
||||
<main class="site-main" data-pagefind-body>
|
||||
{{ block "main" . }}{{ end }}
|
||||
</main>
|
||||
|
||||
<footer class="site-footer">
|
||||
<div class="site-footer__grid">
|
||||
<div class="site-footer__col">
|
||||
<h2 class="site-footer__heading">Ableger</h2>
|
||||
<p>Ableger ist ein Framework zur Sammlung und Entwicklung von Methoden.</p>
|
||||
<ul class="site-footer__links">
|
||||
{{ with .Site.Params.website_repo_url }}<li><a href="{{ . }}">Ableger-Projekt</a></li>{{ else }}<li><span class="site-footer__placeholder" title="Folgt">Ableger-Projekt</span></li>{{ end }}
|
||||
<li><a href="https://gohugo.io">Hugo</a></li>
|
||||
<li><a href="https://decapcms.org">Decap CMS</a></li>
|
||||
<li><a href="https://pagefind.app">Pagefind</a></li>
|
||||
<li><a href="https://pandoc.org">Pandoc</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="site-footer__col">
|
||||
<h2 class="site-footer__heading">Instanz</h2>
|
||||
<ul class="site-footer__links">
|
||||
{{ with .Site.Params.methoden_repo_url }}<li><a href="{{ . }}">Quell-Repository</a></li>{{ end }}
|
||||
{{ if .Site.Params.betreiber_url }}<li>Betreiber: <a href="{{ .Site.Params.betreiber_url }}">{{ .Site.Params.betreiber_name }}</a></li>{{ else }}<li>Betreiber: {{ .Site.Params.betreiber_name }}</li>{{ end }}
|
||||
{{ with hugo.Data.ableger }}<li>Manifest-Version {{ .protokoll_version }}</li>{{ end }}
|
||||
{{/* Current commit of THIS website repo, not a frozen "forked
|
||||
from template version X" marker - see
|
||||
scripts/generate-version-info.sh. Deliberately separate from
|
||||
"Manifest-Version" above: that one is a rarely-changing
|
||||
structural compatibility marker for the data model, this one
|
||||
changes with every deploy and reflects the code actually
|
||||
running here (still identical to the template initially,
|
||||
diverges once a fork develops further on its own). */}}
|
||||
{{ with hugo.Data.website }}<li>Stand: {{ .commit }} ({{ .datum | time.AsTime | dateFormat "02.01.2006" }})</li>{{ end }}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="site-footer__col">
|
||||
<ul class="site-footer__links">
|
||||
{{ with .Site.Params.impressum_url }}<li><a href="{{ . }}">Impressum</a></li>{{ else }}<li><span class="site-footer__placeholder" title="Folgt">Impressum</span></li>{{ end }}
|
||||
{{ with .Site.Params.datenschutz_url }}<li><a href="{{ . }}">Datenschutz</a></li>{{ else }}<li><span class="site-footer__placeholder" title="Folgt">Datenschutz</span></li>{{ end }}
|
||||
<li><a href="{{ "/admin/" | relURL }}">Redaktion</a></li>
|
||||
<li><a href="{{ "/admin/status/" | relURL }}">Status</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="{{ "js/filter.js" | relURL }}" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
{{ define "main" }}
|
||||
<section class="method-list">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ with .Content }}<div class="taxonomy-intro">{{ . }}</div>{{ end }}
|
||||
<div class="method-grid">
|
||||
{{ range sort .Pages "Params.titel" }}
|
||||
{{ partial "method-card.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,40 @@
|
||||
{{ define "main" }}
|
||||
{{ $methode := . }}
|
||||
<article class="method">
|
||||
<header class="method__header">
|
||||
<h1>{{ .Params.titel | default .Title }}</h1>
|
||||
{{ with .Params.kurzbeschreibung }}<p class="method__lead">{{ . }}</p>{{ end }}
|
||||
{{ with index hugo.Data.methoden $.File.ContentBaseName }}
|
||||
<p class="method__updated">Erstellt: {{ .erstellt | time.AsTime | dateFormat "02.01.2006" }}</p>
|
||||
<p class="method__updated">Zuletzt geändert: {{ .geaendert | time.AsTime | dateFormat "02.01.2006" }}</p>
|
||||
{{ end }}
|
||||
</header>
|
||||
|
||||
{{ partial "steckbrief-box.html" (dict "methode" $methode "zeigeKurzbeschreibung" false "zeigeLink" false) }}
|
||||
|
||||
{{/* Linked via Params.kennung, not via Params.titel or the folder
|
||||
name/slug: the title may change at any time (see
|
||||
the Manifest chapter on the project website), the kennung may not - Decap's relation widget
|
||||
therefore stores the method's kennung in the variant's "methode"
|
||||
field (value_field: "kennung" in admin/config.template.yml). */}}
|
||||
{{ $varianten := partial "varianten-fuer-methode.html" . }}
|
||||
{{ $varianten = sort $varianten "Params.untertitel" }}
|
||||
|
||||
{{ if eq (len $varianten) 1 }}
|
||||
{{ with index $varianten 0 }}
|
||||
{{ partial "diese-variante.html" . }}
|
||||
<div class="method__body">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ partial "attachments.html" . }}
|
||||
{{ end }}
|
||||
{{ else if gt (len $varianten) 1 }}
|
||||
<section class="method__section">
|
||||
<h2>Varianten</h2>
|
||||
<div class="variant-grid">
|
||||
{{ range $varianten }}{{ partial "variante-card.html" . }}{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,27 @@
|
||||
{{/* Served under "<method-url>index.md" (see [outputFormats.MethodenSetMd]
|
||||
and the second cascade rule in hugo/hugo.toml), for the methoden-set
|
||||
tool (methoden-set/, see the Methoden-Set chapter on the project website). Same "one variant ->
|
||||
embed" logic as _default/single.html (see there): if the method has
|
||||
exactly one variant, this URL returns exactly the same document as
|
||||
the variant URL itself (partials/methoden-set-dokument.html) - methods
|
||||
with only one variant otherwise have no URL usable via the tool,
|
||||
because the HTML page embeds the variant text directly, without
|
||||
showing a visible link to the actual variant URL. With 0 or several
|
||||
variants, a short notice document instead of a generic 404 in the
|
||||
tool - see its error messages in methoden-set/app.js. */}}
|
||||
{{- $methode := . -}}
|
||||
{{- $varianten := partial "varianten-fuer-methode.html" . -}}
|
||||
{{- if eq (len $varianten) 1 -}}
|
||||
{{- partial "methoden-set-dokument.html" (index $varianten 0) -}}
|
||||
{{- else -}}
|
||||
---
|
||||
titel: {{ (.Params.titel | default .Title) | jsonify }}
|
||||
quelle: {{ .Permalink | jsonify }}
|
||||
fehler: {{ if gt (len $varianten) 1 }}"mehrere_varianten"{{ else }}"keine_variante"{{ end }}
|
||||
---
|
||||
{{ if gt (len $varianten) 1 -}}
|
||||
Diese Methode hat mehrere Varianten. Bitte auf der Methoden-Seite die gewünschte Variante öffnen und deren eigenen Link einfügen.
|
||||
{{- else -}}
|
||||
Diese Methode hat noch keine veröffentlichte Variante.
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,10 @@
|
||||
{{ define "main" }}
|
||||
<section class="taxonomy-overview">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<ul class="filter-list">
|
||||
{{ range .Pages }}
|
||||
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a> ({{ len .Pages }})</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,135 @@
|
||||
{{ 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 }}
|
||||
|
||||
<section class="toolbar" aria-label="Filter">
|
||||
<p id="result-count" role="status"></p>
|
||||
{{/* 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. */}}
|
||||
<a class="search-more-link" id="search-more-link" href="{{ "/suche/" | relURL }}">Volltextsuche über alle Inhalte</a>
|
||||
|
||||
<details class="filter-panel" id="filter-panel">
|
||||
<summary>Filter</summary>
|
||||
<div class="filter-panel__body">
|
||||
<fieldset class="filter-group">
|
||||
<legend>Zielgruppe</legend>
|
||||
{{ range $term, $pages := .Site.Taxonomies.zielgruppe }}
|
||||
<label class="filter-checkbox">
|
||||
<input type="checkbox" data-facet="zielgruppe" value="{{ $term }}">
|
||||
{{ $term | title }} <span class="filter-count">({{ len $pages }})</span>
|
||||
</label>
|
||||
{{ end }}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="filter-group">
|
||||
<legend>Kompetenzbereich</legend>
|
||||
{{ range $term, $pages := .Site.Taxonomies.kompetenzbereich }}
|
||||
<label class="filter-checkbox">
|
||||
<input type="checkbox" data-facet="kompetenzbereich" value="{{ $term }}">
|
||||
{{ $term | title }} <span class="filter-count">({{ len $pages }})</span>
|
||||
</label>
|
||||
{{ end }}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="filter-group">
|
||||
<legend>Kategorie</legend>
|
||||
{{ range $term, $pages := .Site.Taxonomies.kategorie }}
|
||||
<label class="filter-checkbox">
|
||||
<input type="checkbox" data-facet="kategorie" value="{{ $term }}">
|
||||
{{ $term | title }} <span class="filter-count">({{ len $pages }})</span>
|
||||
</label>
|
||||
{{ end }}
|
||||
</fieldset>
|
||||
|
||||
{{ if gt (len $lizenzen) 1 }}
|
||||
<fieldset class="filter-group">
|
||||
<legend>Lizenz</legend>
|
||||
{{ range $lizenzen }}
|
||||
<label class="filter-checkbox">
|
||||
<input type="checkbox" data-facet="lizenz" value="{{ . }}">
|
||||
{{ . }}
|
||||
</label>
|
||||
{{ end }}
|
||||
</fieldset>
|
||||
{{ end }}
|
||||
|
||||
{{ if $dauerSeen }}
|
||||
<div class="filter-group filter-range" data-range-facet="dauer" data-min="{{ $dauerMin }}" data-max="{{ $dauerMax }}">
|
||||
<div class="filter-range__label">
|
||||
Dauer: <output data-range-output-min>{{ $dauerMin }}</output>–<output data-range-output-max>{{ $dauerMax }}</output> Min.
|
||||
</div>
|
||||
<div class="filter-range__slider">
|
||||
<div class="filter-range__track"></div>
|
||||
<div class="filter-range__fill" data-range-fill></div>
|
||||
<input type="range" min="{{ $dauerMin }}" max="{{ $dauerMax }}" value="{{ $dauerMin }}" data-range-min>
|
||||
<input type="range" min="{{ $dauerMin }}" max="{{ $dauerMax }}" value="{{ $dauerMax }}" data-range-max>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
{{ if $groesseSeen }}
|
||||
<div class="filter-group filter-range" data-range-facet="groesse" data-min="{{ $groesseMin }}" data-max="{{ $groesseMax }}">
|
||||
<div class="filter-range__label">
|
||||
Gruppengröße: <output data-range-output-min>{{ $groesseMin }}</output>–<output data-range-output-max>{{ $groesseMax }}</output>
|
||||
</div>
|
||||
<div class="filter-range__slider">
|
||||
<div class="filter-range__track"></div>
|
||||
<div class="filter-range__fill" data-range-fill></div>
|
||||
<input type="range" min="{{ $groesseMin }}" max="{{ $groesseMax }}" value="{{ $groesseMin }}" data-range-min>
|
||||
<input type="range" min="{{ $groesseMin }}" max="{{ $groesseMax }}" value="{{ $groesseMax }}" data-range-max>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
<button type="button" id="filter-reset">Filter zurücksetzen</button>
|
||||
</div>
|
||||
</details>
|
||||
</section>
|
||||
|
||||
<section class="method-list" id="ergebnisse">
|
||||
<div class="method-grid" id="method-grid">
|
||||
{{ range sort $methodenPages "Params.titel" }}
|
||||
{{ partial "method-card.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
<p id="no-results" hidden>Keine Methoden gefunden. Filter anpassen oder Suchbegriff ändern.</p>
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,5 @@
|
||||
{{- /* Site metadata for admin/index.html and admin/status/index.html (see
|
||||
hugo.toml, outputFormats.SiteMeta) - these two files are plain static
|
||||
HTML without Hugo templating and load this file via fetch(), so the
|
||||
site title isn't hardcoded a second time. */ -}}
|
||||
{{- dict "title" .Site.Title | jsonify -}}
|
||||
@@ -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 }}
|
||||
@@ -0,0 +1,66 @@
|
||||
{{ define "main" }}
|
||||
{{/* A dedicated, deliberately simple full-text search via Pagefind instead
|
||||
of trying to merge it here with the homepage's facet search
|
||||
(index.html, filter.js) into one component: Pagefind only knows
|
||||
pages/URLs, not the method-vs-variant relationship, so mixing it with
|
||||
the card facets there would be a lot of glue code for little benefit.
|
||||
Robustness over feature scope: Pagefind's own bundled default widget
|
||||
(PagefindUI) instead of custom rendering of the results - see
|
||||
https://pagefind.app/docs/ui/. The index itself is only created AFTER
|
||||
the Hugo build (command-line step "pagefind --site public", see
|
||||
the installation guide on the project website) - under "hugo server" there is no index yet,
|
||||
see the note below in the script. */}}
|
||||
<section class="search-page" data-pagefind-ignore="all">
|
||||
<h1>{{ .Title }}</h1>
|
||||
<p class="search-page__hint">
|
||||
Durchsucht alle veröffentlichten Methoden und Varianten vollständig –
|
||||
auch Vorbereitung, Ablauf und Hintergründe, nicht nur Titel und Tags.
|
||||
Für eine schnelle Filterung nach Zielgruppe, Kompetenzbereich, Kategorie,
|
||||
Dauer oder Gruppengröße: <a href="{{ "/" | relURL }}">Startseite mit Filtern</a>.
|
||||
</p>
|
||||
<div id="pagefind-suche"></div>
|
||||
</section>
|
||||
|
||||
<link href="{{ "pagefind/pagefind-ui.css" | relURL }}" rel="stylesheet">
|
||||
<script src="{{ "pagefind/pagefind-ui.js" | relURL }}" defer></script>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
// "pagefind-ui.js" only exists after the separate indexing step
|
||||
// following the Hugo build (see comment above) - deliberately stay
|
||||
// silent here without an index instead of showing an error, e.g. under
|
||||
// "hugo server".
|
||||
if (typeof PagefindUI === "undefined") return;
|
||||
|
||||
var ui = new PagefindUI({
|
||||
element: "#pagefind-suche",
|
||||
showSubResults: true,
|
||||
autofocus: true,
|
||||
// German translation given explicitly instead of relying on
|
||||
// Pagefind's automatic language detection via <html lang>: more
|
||||
// robust against differing locale spellings (here "de-DE" instead
|
||||
// of "de"), see hugo/layouts/_default/baseof.html. Wording taken
|
||||
// 1:1 from Pagefind's own de.json.
|
||||
translations: {
|
||||
placeholder: "Suchen",
|
||||
clear_search: "Löschen",
|
||||
load_more: "Weitere Ergebnisse laden",
|
||||
search_label: "Diese Seite durchsuchen",
|
||||
filters_label: "Filter",
|
||||
zero_results: "Keine Ergebnisse für [SEARCH_TERM]",
|
||||
many_results: "[COUNT] Ergebnisse für [SEARCH_TERM]",
|
||||
one_result: "Ein Ergebnis für [SEARCH_TERM]",
|
||||
alt_search: "Keine Ergebnisse für [SEARCH_TERM]. Stattdessen erscheinen Ergebnisse für [DIFFERENT_TERM].",
|
||||
search_suggestion: "Keine Ergebnisse für [SEARCH_TERM]. Probier einen der folgenden Vorschläge:",
|
||||
searching: "[SEARCH_TERM] wird gesucht …"
|
||||
}
|
||||
});
|
||||
|
||||
// Takes ?q=... from the URL (from the search field in the header, see
|
||||
// baseof.html - whose form now submits here instead of to the
|
||||
// homepage) as a pre-filled search, the documented way via the
|
||||
// PagefindUI instance method, see https://pagefind.app/docs/ui/.
|
||||
var q = new URLSearchParams(window.location.search).get("q");
|
||||
if (q) ui.triggerSearch(q);
|
||||
});
|
||||
</script>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,10 @@
|
||||
{{ define "main" }}
|
||||
{{/* Deliberately empty: variants are detail pages per method and are only
|
||||
linked from there (see hugo/layouts/_default/single.html), not via
|
||||
their own overview page. A dedicated template instead of a
|
||||
content/varianten/_index.md with "build.render: never", so that no
|
||||
file sits in the content repo that Decap CMS would incorrectly list
|
||||
as a (broken) entry in the variants collection - the same class of
|
||||
bug as a README.md in the collection folder, see the concept chapter on the project website
|
||||
Abschnitt 9. */}}
|
||||
{{ end }}
|
||||
@@ -0,0 +1,42 @@
|
||||
{{ define "main" }}
|
||||
{{/* Linked via Params.kennung, not via Params.titel or the folder
|
||||
name/slug, see hugo/layouts/_default/single.html and
|
||||
admin/config.template.yml. The steckbrief box and "Diese Variante" are
|
||||
the same partials as on the method page (case: exactly one variant) -
|
||||
see the project website (background/analysis notes) Teil 2.3. */}}
|
||||
{{ $variante := . }}
|
||||
{{ $methode := partial "methode-fuer-variante.html" . }}
|
||||
<article class="method variant">
|
||||
<header class="method__header">
|
||||
{{ with $methode }}<p class="variant__back"><a href="{{ .RelPermalink }}">← {{ .Params.titel | default .Title }}</a></p>{{ end }}
|
||||
<h1>{{ with $methode }}{{ .Params.titel | default .Title }} – {{ end }}{{ $variante.Params.untertitel }}</h1>
|
||||
{{ with index hugo.Data.varianten $.File.ContentBaseName }}
|
||||
<p class="method__updated">Erstellt: {{ .erstellt | time.AsTime | dateFormat "02.01.2006" }}</p>
|
||||
<p class="method__updated">Zuletzt geändert: {{ .geaendert | time.AsTime | dateFormat "02.01.2006" }}</p>
|
||||
{{ end }}
|
||||
</header>
|
||||
|
||||
{{ with $methode }}
|
||||
{{ partial "steckbrief-box.html" (dict "methode" . "zeigeKurzbeschreibung" true "zeigeLink" true) }}
|
||||
{{ end }}
|
||||
|
||||
{{ partial "diese-variante.html" $variante }}
|
||||
|
||||
<div class="method__body">
|
||||
{{ $variante.Content }}
|
||||
</div>
|
||||
{{ partial "attachments.html" $variante }}
|
||||
|
||||
{{ with $methode }}
|
||||
{{ $andere := where (partial "varianten-fuer-methode.html" .) "Params.kennung" "ne" $variante.Params.kennung }}
|
||||
{{ with $andere }}
|
||||
<section class="method__section">
|
||||
<h2>Andere Varianten dieser Methode</h2>
|
||||
<div class="variant-grid">
|
||||
{{ range . }}{{ partial "variante-card.html" . }}{{ end }}
|
||||
</div>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</article>
|
||||
{{ end }}
|
||||
@@ -0,0 +1,6 @@
|
||||
{{/* Served under "<variant-url>index.md" (see [outputFormats.MethodenSetMd]
|
||||
and the cascade rule in hugo/hugo.toml) - the assembly logic lives
|
||||
together with _default/single.md (method with exactly one variant) in
|
||||
partials/methoden-set-dokument.html. Called with the respective
|
||||
variant as context (section "varianten"). */ -}}
|
||||
{{- partial "methoden-set-dokument.html" . -}}
|
||||
|
After Width: | Height: | Size: 4.8 KiB |
@@ -0,0 +1,517 @@
|
||||
:root {
|
||||
--color-bg: #fdfcfb;
|
||||
--color-text: #1f2320;
|
||||
--color-muted: #5b645d;
|
||||
--color-accent: #3c8a98;
|
||||
--color-accent-contrast: #fff;
|
||||
--color-border: #dcd8d0;
|
||||
--color-card-bg: #ffffff;
|
||||
--radius: 8px;
|
||||
--spacing: 1rem;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--color-bg: #16181a;
|
||||
--color-text: #e9e9e6;
|
||||
--color-muted: #a3aba5;
|
||||
--color-accent: #6fc2d1;
|
||||
--color-accent-contrast: #06272b;
|
||||
--color-border: #33372f;
|
||||
--color-card-bg: #1f2321;
|
||||
}
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
background: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
line-height: 1.55;
|
||||
}
|
||||
|
||||
a { color: var(--color-accent); }
|
||||
a:focus-visible, button:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
|
||||
|
||||
.site-header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: var(--spacing);
|
||||
padding: var(--spacing) 1.5rem;
|
||||
border-bottom: 1px solid var(--color-border);
|
||||
/* Explicit background instead of inheriting from body: on
|
||||
admin/index.html, Decap's own, later-loading CSS-in-JS overrides
|
||||
body's background color with its light-gray default - our text color
|
||||
here (.site-title, our own class, untouched by Decap) still switches
|
||||
correctly in dark mode though, which resulted in light text on a
|
||||
light background. Found and verified live. */
|
||||
background: var(--color-bg);
|
||||
}
|
||||
|
||||
.site-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
text-decoration: none;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.site-logo { display: block; }
|
||||
|
||||
.visually-hidden {
|
||||
position: absolute;
|
||||
width: 1px; height: 1px;
|
||||
padding: 0; margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
/* --- Header: "Suchen" and "Stöbern" ---------------------------------
|
||||
Both open on hover (only on pointer devices that support hover -
|
||||
deliberately not on touch, see media query below), on keyboard focus
|
||||
(:focus-within, e.g. Tab to the search field), or on click/tap (the
|
||||
"is-open" class, toggled by the inline script in baseof.html - the
|
||||
only way on touch devices without hover). The search additionally
|
||||
stays open once it contains a value, even without hover/focus - also
|
||||
driven via "is-open", see script. */
|
||||
|
||||
.site-header__actions { display: flex; gap: 1.5rem; align-items: flex-start; }
|
||||
|
||||
.header-search, .header-browse { position: relative; }
|
||||
|
||||
.header-toggle {
|
||||
display: inline-block;
|
||||
cursor: pointer;
|
||||
padding: 0.5rem 0.25rem;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: var(--color-text);
|
||||
font: inherit;
|
||||
font-weight: 500;
|
||||
font-size: 0.9rem;
|
||||
user-select: none;
|
||||
}
|
||||
.header-toggle:hover, .header-toggle[aria-expanded="true"] { color: var(--color-accent); }
|
||||
/* header-toggle was designed for the Suchen/Stöbern <button> elements,
|
||||
which naturally have no underline - the methoden-set link is a real
|
||||
<a> (standalone page, no panel to expand/collapse) and therefore needs
|
||||
the reset explicitly, otherwise the browser underlines it like any
|
||||
other link. */
|
||||
.header-toggle--link { text-decoration: none; }
|
||||
|
||||
.header-search__form,
|
||||
.header-browse__nav {
|
||||
display: none;
|
||||
position: absolute;
|
||||
/* Attach directly to the button (top: 100%, no gap) instead of leaving
|
||||
a gap: a gap would not be a hoverable area - moving the mouse down
|
||||
from the button to the menu would briefly leave every hoverable
|
||||
surface, closing the menu before the mouse arrives there (reported
|
||||
live). The visual spacing to the links instead comes from the
|
||||
"padding" below, which counts as part of the box's own hoverable
|
||||
area. */
|
||||
top: 100%;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
background: var(--color-card-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius);
|
||||
padding: 0.5rem;
|
||||
}
|
||||
.header-search__form { width: max(18rem, 80vw); max-width: 22rem; }
|
||||
.header-browse__nav { flex-direction: column; gap: 0.25rem; min-width: 12rem; }
|
||||
|
||||
@media (hover: hover) and (pointer: fine) {
|
||||
.header-search:hover .header-search__form,
|
||||
.header-search:focus-within .header-search__form,
|
||||
.header-browse:hover .header-browse__nav,
|
||||
.header-browse:focus-within .header-browse__nav {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
.header-search.is-open .header-search__form,
|
||||
.header-browse.is-open .header-browse__nav {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.header-search__form input[type="search"] {
|
||||
width: 100%;
|
||||
padding: 0.6rem 0.8rem;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius);
|
||||
background: var(--color-bg);
|
||||
color: var(--color-text);
|
||||
font-size: 1rem;
|
||||
}
|
||||
.header-search__form input[type="search"]:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 1px; }
|
||||
|
||||
.header-browse__nav a {
|
||||
padding: 0.5rem 0.75rem;
|
||||
border-radius: calc(var(--radius) - 2px);
|
||||
text-decoration: none;
|
||||
font-weight: 500;
|
||||
color: var(--color-text);
|
||||
}
|
||||
.header-browse__nav a:hover { background: var(--color-bg); color: var(--color-accent); }
|
||||
|
||||
/* At sufficient width, "Suchen" is no longer a collapsible bar but an
|
||||
always-visible search bar directly in the header - the rules above
|
||||
(hover/focus/is-open) are deliberately ignored here (!important beats
|
||||
the lower specificity of the display:none default). "Stöbern" stays a
|
||||
collapsible bar at every width. */
|
||||
@media (min-width: 48rem) {
|
||||
.header-search .header-toggle { display: none; }
|
||||
.header-search__form {
|
||||
display: flex !important;
|
||||
position: static;
|
||||
width: 16rem;
|
||||
max-width: none;
|
||||
background: none;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.site-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
|
||||
.site-nav a { text-decoration: none; font-weight: 500; }
|
||||
.site-nav a:hover { text-decoration: underline; }
|
||||
|
||||
.site-main {
|
||||
max-width: 72rem;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1.5rem 4rem;
|
||||
}
|
||||
|
||||
/* --- Footer: three columns, stack on narrow screens ----------------- */
|
||||
|
||||
.site-footer {
|
||||
padding: 2.5rem 1.5rem;
|
||||
color: var(--color-muted);
|
||||
font-size: 0.875rem;
|
||||
border-top: 1px solid var(--color-border);
|
||||
}
|
||||
|
||||
.site-footer__grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 2rem;
|
||||
max-width: 72rem;
|
||||
margin: 0 auto;
|
||||
}
|
||||
@media (min-width: 40rem) {
|
||||
.site-footer__grid { grid-template-columns: repeat(3, 1fr); }
|
||||
}
|
||||
|
||||
.site-footer__heading {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.03em;
|
||||
color: var(--color-muted);
|
||||
margin: 0 0 0.6rem;
|
||||
}
|
||||
|
||||
.site-footer__col p { margin: 0 0 0.75rem; }
|
||||
|
||||
.site-footer__links {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.4rem;
|
||||
}
|
||||
.site-footer__links a { color: var(--color-muted); }
|
||||
.site-footer__links a:hover { color: var(--color-accent); }
|
||||
|
||||
.site-footer__placeholder {
|
||||
color: var(--color-muted);
|
||||
opacity: 0.6;
|
||||
cursor: default;
|
||||
border-bottom: 1px dashed var(--color-border);
|
||||
}
|
||||
|
||||
.filter-list {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
padding: 0;
|
||||
margin: 0.5rem 0 1.5rem;
|
||||
}
|
||||
.filter-list li a {
|
||||
display: inline-block;
|
||||
padding: 0.35rem 0.75rem;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: 999px;
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
.filter-list li a:hover { border-color: var(--color-accent); }
|
||||
|
||||
/* --- Filter -----------------------------------------------------------
|
||||
The search itself has lived in the <header> (baseof.html,
|
||||
.header-search) since the header rework, instead of here on the
|
||||
homepage. */
|
||||
|
||||
.toolbar {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
margin: 2rem 0;
|
||||
}
|
||||
.toolbar #result-count { padding-top: 0.7rem; }
|
||||
|
||||
.filter-panel {
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius);
|
||||
background: var(--color-card-bg);
|
||||
margin-bottom: 1rem;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
/* Opens at full width (matching the width of the method cards below)
|
||||
instead of only as wide as the "Filter" button - result-count wraps
|
||||
onto its own line on its own thanks to flex-wrap on .toolbar. */
|
||||
.filter-panel[open] { flex: 1 1 100%; }
|
||||
.filter-panel summary {
|
||||
cursor: pointer;
|
||||
padding: 0.75rem 1rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
.filter-panel[open] summary { border-bottom: 1px solid var(--color-border); }
|
||||
.filter-panel__body {
|
||||
padding: 1.25rem;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.filter-group { border: 0; padding: 0; margin: 0; min-width: 0; }
|
||||
.filter-group legend, .filter-range__label { font-weight: 600; font-size: 0.875rem; margin-bottom: 0.5rem; padding: 0; }
|
||||
.filter-checkbox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
font-size: 0.9rem;
|
||||
padding: 0.2rem 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.filter-count { color: var(--color-muted); font-size: 0.8rem; }
|
||||
|
||||
.filter-range__slider {
|
||||
position: relative;
|
||||
height: 2rem;
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
.filter-range__track, .filter-range__fill {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
height: 4px;
|
||||
transform: translateY(-50%);
|
||||
border-radius: 2px;
|
||||
}
|
||||
.filter-range__track { left: 0; right: 0; background: var(--color-border); }
|
||||
.filter-range__fill { background: var(--color-accent); }
|
||||
|
||||
.filter-range__slider input[type="range"] {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 2rem;
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
pointer-events: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
.filter-range__slider input[type="range"]::-webkit-slider-runnable-track { background: transparent; }
|
||||
.filter-range__slider input[type="range"]::-moz-range-track { background: transparent; }
|
||||
.filter-range__slider input[type="range"]::-webkit-slider-thumb {
|
||||
-webkit-appearance: none;
|
||||
pointer-events: auto;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
background: var(--color-accent);
|
||||
border: 2px solid var(--color-card-bg);
|
||||
box-shadow: 0 0 0 1px var(--color-border);
|
||||
cursor: pointer;
|
||||
margin-top: 6px;
|
||||
}
|
||||
.filter-range__slider input[type="range"]::-moz-range-thumb {
|
||||
pointer-events: auto;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border-radius: 50%;
|
||||
background: var(--color-accent);
|
||||
border: 2px solid var(--color-card-bg);
|
||||
box-shadow: 0 0 0 1px var(--color-border);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#filter-reset {
|
||||
grid-column: 1 / -1;
|
||||
justify-self: start;
|
||||
padding: 0.5rem 1rem;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius);
|
||||
background: transparent;
|
||||
color: var(--color-text);
|
||||
cursor: pointer;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
#filter-reset:hover { border-color: var(--color-accent); }
|
||||
|
||||
#result-count { color: var(--color-muted); font-size: 0.875rem; margin: 0; }
|
||||
#no-results { color: var(--color-muted); padding: 2rem 0; }
|
||||
|
||||
.search-more-link { font-size: 0.875rem; padding-top: 0.7rem; }
|
||||
|
||||
/* --- Full-text search (/suche/, layouts/suche/list.html) ---------------
|
||||
PagefindUI brings its own CSS (pagefind-ui.css) and reads its colors
|
||||
via these custom properties - see
|
||||
https://pagefind.app/docs/ui/#styling-the-ui - instead of writing
|
||||
custom CSS against the result list generated by Pagefind. */
|
||||
.search-page { max-width: 40rem; margin: 2rem auto 0; }
|
||||
.search-page__hint { color: var(--color-muted); margin-bottom: 1.5rem; }
|
||||
#pagefind-suche {
|
||||
--pagefind-ui-primary: var(--color-accent);
|
||||
--pagefind-ui-text: var(--color-text);
|
||||
--pagefind-ui-background: var(--color-bg);
|
||||
--pagefind-ui-border: var(--color-border);
|
||||
--pagefind-ui-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
||||
}
|
||||
|
||||
.method-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
|
||||
gap: 1.25rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.method-card {
|
||||
background: var(--color-card-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.25rem;
|
||||
}
|
||||
.method-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
|
||||
.method-card h3 a { text-decoration: none; }
|
||||
.method-card h3 a:hover { text-decoration: underline; }
|
||||
.method-card__desc { color: var(--color-muted); font-size: 0.9rem; margin: 0 0 0.75rem; }
|
||||
|
||||
.method-card__meta { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin: 0 0 0.75rem; font-size: 0.825rem; }
|
||||
.method-card__meta div { display: flex; gap: 0.35rem; }
|
||||
.method-card__meta dt { color: var(--color-muted); margin: 0; }
|
||||
.method-card__meta dd { margin: 0; font-weight: 500; }
|
||||
|
||||
.method-card__group { margin-top: 0.6rem; }
|
||||
.method-card__label {
|
||||
color: var(--color-muted);
|
||||
font-size: 0.75rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.method-card__tags {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.35rem;
|
||||
padding: 0;
|
||||
margin: 0.3rem 0 0;
|
||||
}
|
||||
.facet-chip {
|
||||
font: inherit;
|
||||
font-size: 0.75rem;
|
||||
background: var(--color-border);
|
||||
color: var(--color-text);
|
||||
border: 0;
|
||||
border-radius: 999px;
|
||||
padding: 0.15rem 0.6rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
.facet-chip:hover { filter: brightness(0.92); }
|
||||
.method-card__tags--kompetenz .facet-chip { background: var(--color-accent); color: var(--color-accent-contrast); }
|
||||
.method-card__tags--kategorie .facet-chip { background: transparent; border: 1px solid var(--color-border); }
|
||||
|
||||
.method__header { margin-bottom: 1.5rem; }
|
||||
.method__lead { color: var(--color-muted); font-size: 1.05rem; }
|
||||
.method__updated { font-size: 0.8rem; color: var(--color-muted); }
|
||||
|
||||
.method__section { margin: 1.75rem 0; }
|
||||
.method__section h2 { font-size: 1.1rem; border-bottom: 1px solid var(--color-border); padding-bottom: 0.25rem; }
|
||||
|
||||
.method__meta dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.75rem 1.5rem; }
|
||||
.method__meta dt { color: var(--color-muted); font-size: 0.8rem; margin: 0; }
|
||||
.method__meta dd { margin: 0; font-weight: 500; }
|
||||
|
||||
.method__body { margin: 2rem 0; }
|
||||
.method__body h1 { font-size: 1.3rem; }
|
||||
.method__body h2 { font-size: 1.1rem; }
|
||||
|
||||
.method__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; }
|
||||
.method__tags li a {
|
||||
display: inline-block;
|
||||
font-size: 0.8rem;
|
||||
background: var(--color-border);
|
||||
border-radius: 999px;
|
||||
padding: 0.2rem 0.7rem;
|
||||
text-decoration: none;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.method__label { color: var(--color-muted); font-size: 0.8rem; margin: 1rem 0 0.25rem; }
|
||||
|
||||
.method__meta-inline { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin: 0.75rem 0; }
|
||||
.method__meta-inline div { display: flex; gap: 0.35rem; font-size: 0.9rem; }
|
||||
.method__meta-inline dt { color: var(--color-muted); margin: 0; }
|
||||
.method__meta-inline dd { margin: 0; font-weight: 500; }
|
||||
|
||||
/* "About the method" - a visually distinct block on the variant page, so
|
||||
it stays clear what comes from the method and what belongs to the
|
||||
variant itself (see the project website (background/analysis notes) Teil 2.3). */
|
||||
.method__section--methode {
|
||||
background: var(--color-card-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.25rem 1.5rem;
|
||||
}
|
||||
|
||||
.variant__back { font-size: 0.875rem; margin: 0 0 0.5rem; }
|
||||
.variant__back a { color: var(--color-muted); text-decoration: none; }
|
||||
.variant__back a:hover { text-decoration: underline; }
|
||||
|
||||
.variant-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
|
||||
gap: 1.25rem;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.variant-card {
|
||||
background: var(--color-card-bg);
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius);
|
||||
padding: 1.25rem;
|
||||
}
|
||||
.variant-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
|
||||
.variant-card h3 a { text-decoration: none; }
|
||||
.variant-card h3 a:hover { text-decoration: underline; }
|
||||
.variant-card__desc { color: var(--color-muted); font-size: 0.9rem; margin: 0 0 0.75rem; }
|
||||
.variant-card__autoren { font-size: 0.85rem; margin: 0.5rem 0 0; }
|
||||
|
||||
.variant-card__meta { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; margin: 0 0 0.5rem; font-size: 0.825rem; }
|
||||
.variant-card__meta div { display: flex; gap: 0.35rem; }
|
||||
.variant-card__meta dt { color: var(--color-muted); margin: 0; }
|
||||
.variant-card__meta dd { margin: 0; font-weight: 500; }
|
||||
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 252 B |
|
After Width: | Height: | Size: 755 B |
|
After Width: | Height: | Size: 462 B |
@@ -0,0 +1,11 @@
|
||||
<svg width="32" height="32" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Ableger">
|
||||
<style>
|
||||
path { fill: #1f504a; stroke: #1f504a; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
path { fill: #6fc9bd; stroke: #6fc9bd; }
|
||||
}
|
||||
</style>
|
||||
<g transform="matrix(0.108231,0,0,0.108231,5.88452,7.40178)">
|
||||
<path d="M476.581,897.288C471.876,892.583 472.935,897.826 471.752,802.641C470.881,732.626 470.647,676.385 469.299,661.783C456.112,518.95 392.326,426.644 292.656,406.16C273.275,402.176 247.201,401.016 247.44,404.147C247.812,409.029 269.225,439.924 279.884,450.957C305.357,477.327 328.637,487.571 363.745,487.86C382.443,488.014 382.443,488.014 390.921,499.937C395.583,506.494 398.573,512.591 397.564,513.485C389.061,521.02 347.21,523.041 324.551,517.011C280.051,505.17 244.563,471.758 216.916,415.674C202.628,386.691 201.446,380.615 208.687,373.375C213.031,369.03 216.707,368.551 245.492,368.58C310.457,368.643 361.736,387.469 405.952,427.486C442.724,460.767 476.309,523.964 491.347,588.173C503.043,638.112 504.796,636.454 504.88,786.757C504.942,896.233 505.913,892.089 500.912,897.091C494.512,903.491 482.878,903.585 476.581,897.288L476.581,897.288ZM494.977,522.071C484.075,490.832 482.34,475.515 486.095,443.677C501.157,315.959 558.365,220.986 644.094,181.377C678.021,165.702 728.466,157.191 769.191,160.271C797.977,162.448 801.625,169.861 788.118,198.725C755.903,267.567 700.57,310.625 644.316,310.625C630.288,310.625 602.763,305.02 599.166,301.432C598.227,300.494 601.585,294.339 606.628,287.752C615.799,275.777 615.799,275.777 642.174,275.703C667.171,275.63 669.414,275.205 685.06,267.503C704.655,257.856 727.381,236.527 741.729,214.316C756.122,192.036 755.883,191.593 730.597,193.651C638.193,201.172 571.599,258.906 538.599,360.101C525.333,400.779 519.373,431.371 515.088,480.774C512.721,508.058 506.928,546.826 504.987,548.37C504.629,548.655 500.124,536.821 494.977,522.071ZM521.756,270.404C522.881,265.57 524.288,260.283 526.01,254.509C543.966,194.319 618.428,72.847 625.54,70.773C636.909,67.457 647.233,75.36 646.429,86.764C646.171,90.419 613.517,136.837 584.212,196.334C559.921,215.848 538.944,240.801 521.756,270.404Z" style="fill-rule:nonzero;stroke-width:14;stroke-linejoin:round;stroke-linecap:round;"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,11 @@
|
||||
<svg width="120" height="120" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Ableger">
|
||||
<style>
|
||||
path { fill: #1f504a; }
|
||||
@media (prefers-color-scheme: dark) {
|
||||
path { fill: #6fc9bd; }
|
||||
}
|
||||
</style>
|
||||
<g transform="matrix(0.108231,0,0,0.108231,5.88452,7.40178)">
|
||||
<path d="M476.581,897.288C471.876,892.583 472.935,897.826 471.752,802.641C470.881,732.626 470.647,676.385 469.299,661.783C456.112,518.95 392.326,426.644 292.656,406.16C273.275,402.176 247.201,401.016 247.44,404.147C247.812,409.029 269.225,439.924 279.884,450.957C305.357,477.327 328.637,487.571 363.745,487.86C382.443,488.014 382.443,488.014 390.921,499.937C395.583,506.494 398.573,512.591 397.564,513.485C389.061,521.02 347.21,523.041 324.551,517.011C280.051,505.17 244.563,471.758 216.916,415.674C202.628,386.691 201.446,380.615 208.687,373.375C213.031,369.03 216.707,368.551 245.492,368.58C310.457,368.643 361.736,387.469 405.952,427.486C442.724,460.767 476.309,523.964 491.347,588.173C503.043,638.112 504.796,636.454 504.88,786.757C504.942,896.233 505.913,892.089 500.912,897.091C494.512,903.491 482.878,903.585 476.581,897.288L476.581,897.288ZM494.977,522.071C484.075,490.832 482.34,475.515 486.095,443.677C501.157,315.959 558.365,220.986 644.094,181.377C678.021,165.702 728.466,157.191 769.191,160.271C797.977,162.448 801.625,169.861 788.118,198.725C755.903,267.567 700.57,310.625 644.316,310.625C630.288,310.625 602.763,305.02 599.166,301.432C598.227,300.494 601.585,294.339 606.628,287.752C615.799,275.777 615.799,275.777 642.174,275.703C667.171,275.63 669.414,275.205 685.06,267.503C704.655,257.856 727.381,236.527 741.729,214.316C756.122,192.036 755.883,191.593 730.597,193.651C638.193,201.172 571.599,258.906 538.599,360.101C525.333,400.779 519.373,431.371 515.088,480.774C512.721,508.058 506.928,546.826 504.987,548.37C504.629,548.655 500.124,536.821 494.977,522.071ZM521.756,270.404C522.881,265.57 524.288,260.283 526.01,254.509C543.966,194.319 618.428,72.847 625.54,70.773C636.909,67.457 647.233,75.36 646.429,86.764C646.171,90.419 613.517,136.837 584.212,196.334C559.921,215.848 538.944,240.801 521.756,270.404Z" style="fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,303 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var grid = document.getElementById("method-grid");
|
||||
if (!grid) return; // Not on the homepage
|
||||
|
||||
var cards = Array.prototype.slice.call(grid.querySelectorAll(".method-card"));
|
||||
// Search field has lived in the <header> (baseof.html) since the header
|
||||
// rework, no longer on the homepage itself - the same field on every
|
||||
// page, wired up here additionally for live filtering only on the
|
||||
// homepage.
|
||||
var searchInput = document.getElementById("header-search-input");
|
||||
var searchForm = searchInput ? searchInput.closest("form") : null;
|
||||
var resultCount = document.getElementById("result-count");
|
||||
var searchMoreLink = document.getElementById("search-more-link");
|
||||
var searchMoreBaseHref = searchMoreLink ? searchMoreLink.getAttribute("href") : "";
|
||||
var noResults = document.getElementById("no-results");
|
||||
var resetButton = document.getElementById("filter-reset");
|
||||
var filterPanel = document.getElementById("filter-panel");
|
||||
var checkboxes = Array.prototype.slice.call(document.querySelectorAll("[data-facet]"));
|
||||
var rangeGroups = Array.prototype.slice.call(document.querySelectorAll("[data-range-facet]"));
|
||||
|
||||
function checkboxesFor(facet) {
|
||||
return checkboxes.filter(function (el) {
|
||||
return el.dataset.facet === facet && el.type === "checkbox";
|
||||
});
|
||||
}
|
||||
|
||||
function selectedValues(facet) {
|
||||
return checkboxesFor(facet)
|
||||
.filter(function (el) { return el.checked; })
|
||||
.map(function (el) { return el.value.toLowerCase(); });
|
||||
}
|
||||
|
||||
function cardValues(card, key) {
|
||||
var raw = card.dataset[key] || "";
|
||||
if (!raw) return [];
|
||||
return raw.split("|").map(function (v) { return v.toLowerCase(); });
|
||||
}
|
||||
|
||||
// --- Dual range slider -----------------------------------------------
|
||||
|
||||
function rangeState(group) {
|
||||
var minInput = group.querySelector("[data-range-min]");
|
||||
var maxInput = group.querySelector("[data-range-max]");
|
||||
return {
|
||||
group: group,
|
||||
minInput: minInput,
|
||||
maxInput: maxInput,
|
||||
bounds: [parseFloat(group.dataset.min), parseFloat(group.dataset.max)],
|
||||
};
|
||||
}
|
||||
|
||||
function updateRangeVisuals(state) {
|
||||
var min = parseFloat(state.minInput.value);
|
||||
var max = parseFloat(state.maxInput.value);
|
||||
var lo = state.bounds[0];
|
||||
var hi = state.bounds[1];
|
||||
var span = hi - lo || 1;
|
||||
|
||||
var outMin = state.group.querySelector("[data-range-output-min]");
|
||||
var outMax = state.group.querySelector("[data-range-output-max]");
|
||||
if (outMin) outMin.textContent = min;
|
||||
if (outMax) outMax.textContent = max;
|
||||
|
||||
var fill = state.group.querySelector("[data-range-fill]");
|
||||
if (fill) {
|
||||
var left = ((min - lo) / span) * 100;
|
||||
var right = ((max - lo) / span) * 100;
|
||||
fill.style.left = left + "%";
|
||||
fill.style.width = Math.max(0, right - left) + "%";
|
||||
}
|
||||
}
|
||||
|
||||
var rangeStates = rangeGroups.map(function (group) {
|
||||
var state = rangeState(group);
|
||||
|
||||
function onMinInput() {
|
||||
if (parseFloat(state.minInput.value) > parseFloat(state.maxInput.value)) {
|
||||
state.minInput.value = state.maxInput.value;
|
||||
}
|
||||
updateRangeVisuals(state);
|
||||
applyFilters();
|
||||
syncUrl();
|
||||
}
|
||||
function onMaxInput() {
|
||||
if (parseFloat(state.maxInput.value) < parseFloat(state.minInput.value)) {
|
||||
state.maxInput.value = state.minInput.value;
|
||||
}
|
||||
updateRangeVisuals(state);
|
||||
applyFilters();
|
||||
syncUrl();
|
||||
}
|
||||
|
||||
state.minInput.addEventListener("input", onMinInput);
|
||||
state.maxInput.addEventListener("input", onMaxInput);
|
||||
updateRangeVisuals(state);
|
||||
return state;
|
||||
});
|
||||
|
||||
function rangeIsNarrowed(state) {
|
||||
return (
|
||||
parseFloat(state.minInput.value) > state.bounds[0] ||
|
||||
parseFloat(state.maxInput.value) < state.bounds[1]
|
||||
);
|
||||
}
|
||||
|
||||
// --- Filtering ----------------------------------------------------------
|
||||
|
||||
function matchesFacets(card) {
|
||||
// "lizenz" is multi-valued here just like the other facets since
|
||||
// variants were introduced (a method can have several licenses via
|
||||
// its variants) - the same cardValues logic is enough, no special
|
||||
// handling needed anymore.
|
||||
var groups = { zielgruppe: 1, kompetenzbereich: 1, kategorie: 1, lizenz: 1 };
|
||||
for (var facet in groups) {
|
||||
var selected = selectedValues(facet);
|
||||
if (selected.length === 0) continue;
|
||||
var values = cardValues(card, facet);
|
||||
var hasMatch = values.some(function (v) { return selected.indexOf(v) !== -1; });
|
||||
if (!hasMatch) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function matchesRanges(card) {
|
||||
for (var i = 0; i < rangeStates.length; i++) {
|
||||
var state = rangeStates[i];
|
||||
if (!rangeIsNarrowed(state)) continue;
|
||||
var facet = state.group.dataset.rangeFacet;
|
||||
var fMin = parseFloat(state.minInput.value);
|
||||
var fMax = parseFloat(state.maxInput.value);
|
||||
|
||||
if (facet === "dauer") {
|
||||
// Duration has been a range per method since variants were
|
||||
// introduced (shortest to longest variant), no longer a single
|
||||
// value - same overlap logic as "groesse" below.
|
||||
var dMinRaw = card.dataset.dauerMin;
|
||||
var dMaxRaw = card.dataset.dauerMax;
|
||||
if (dMinRaw === "" || dMaxRaw === "") return false;
|
||||
var dMin = parseFloat(dMinRaw);
|
||||
var dMax = parseFloat(dMaxRaw);
|
||||
if (dMax < fMin || dMin > fMax) return false;
|
||||
} else if (facet === "groesse") {
|
||||
var gMinRaw = card.dataset.gruppengroesseMin;
|
||||
var gMaxRaw = card.dataset.gruppengroesseMax;
|
||||
if (gMinRaw === "" || gMaxRaw === "") return false;
|
||||
var gMin = parseFloat(gMinRaw);
|
||||
var gMax = parseFloat(gMaxRaw);
|
||||
// Overlap of the two intervals
|
||||
if (gMax < fMin || gMin > fMax) return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function matchesSearch(card) {
|
||||
var q = searchInput.value.trim().toLowerCase();
|
||||
if (!q) return true;
|
||||
return (card.dataset.search || "").indexOf(q) !== -1;
|
||||
}
|
||||
|
||||
function applyFilters() {
|
||||
var visible = 0;
|
||||
cards.forEach(function (card) {
|
||||
var match = matchesSearch(card) && matchesFacets(card) && matchesRanges(card);
|
||||
card.hidden = !match;
|
||||
if (match) visible++;
|
||||
});
|
||||
|
||||
if (resultCount) {
|
||||
resultCount.textContent = visible + " von " + cards.length + " Methoden";
|
||||
}
|
||||
if (noResults) {
|
||||
noResults.hidden = visible !== 0;
|
||||
}
|
||||
if (searchMoreLink) {
|
||||
var q = searchInput.value.trim();
|
||||
searchMoreLink.href = q ? searchMoreBaseHref + "?q=" + encodeURIComponent(q) : searchMoreBaseHref;
|
||||
}
|
||||
}
|
||||
|
||||
// --- Clickable chips on the cards ---------------------------------------
|
||||
|
||||
grid.addEventListener("click", function (event) {
|
||||
var chip = event.target.closest(".facet-chip");
|
||||
if (!chip) return;
|
||||
var facet = chip.dataset.facet;
|
||||
var value = chip.dataset.value;
|
||||
|
||||
if (facet === "search") {
|
||||
searchInput.value = value;
|
||||
applyFilters();
|
||||
syncUrl();
|
||||
searchInput.focus();
|
||||
} else {
|
||||
var box = checkboxesFor(facet).filter(function (el) {
|
||||
return el.value.toLowerCase() === value.toLowerCase();
|
||||
})[0];
|
||||
if (box) {
|
||||
box.checked = true;
|
||||
if (filterPanel) filterPanel.open = true;
|
||||
applyFilters();
|
||||
syncUrl();
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById("ergebnisse").scrollIntoView({ behavior: "smooth", block: "start" });
|
||||
});
|
||||
|
||||
// --- Reset ---------------------------------------------------------------
|
||||
|
||||
if (resetButton) {
|
||||
resetButton.addEventListener("click", function () {
|
||||
searchInput.value = "";
|
||||
checkboxes.forEach(function (el) { el.checked = false; });
|
||||
rangeStates.forEach(function (state) {
|
||||
state.minInput.value = state.bounds[0];
|
||||
state.maxInput.value = state.bounds[1];
|
||||
updateRangeVisuals(state);
|
||||
});
|
||||
applyFilters();
|
||||
syncUrl();
|
||||
});
|
||||
}
|
||||
|
||||
// --- URL sync (shareable filtered views) ----------------------------
|
||||
|
||||
function syncUrl() {
|
||||
var params = new URLSearchParams();
|
||||
var q = searchInput.value.trim();
|
||||
if (q) params.set("q", q);
|
||||
|
||||
["zielgruppe", "kompetenzbereich", "kategorie", "lizenz"].forEach(function (facet) {
|
||||
var values = selectedValues(facet);
|
||||
if (values.length) params.set(facet, values.join(","));
|
||||
});
|
||||
|
||||
rangeStates.forEach(function (state) {
|
||||
if (!rangeIsNarrowed(state)) return;
|
||||
var facet = state.group.dataset.rangeFacet;
|
||||
params.set(facet + "_min", state.minInput.value);
|
||||
params.set(facet + "_max", state.maxInput.value);
|
||||
});
|
||||
|
||||
var query = params.toString();
|
||||
var url = window.location.pathname + (query ? "?" + query : "");
|
||||
window.history.replaceState(null, "", url);
|
||||
}
|
||||
|
||||
function restoreFromUrl() {
|
||||
var params = new URLSearchParams(window.location.search);
|
||||
var q = params.get("q");
|
||||
if (q) searchInput.value = q;
|
||||
|
||||
["zielgruppe", "kompetenzbereich", "kategorie", "lizenz"].forEach(function (facet) {
|
||||
var raw = params.get(facet);
|
||||
if (!raw) return;
|
||||
var wanted = raw.split(",").map(function (v) { return v.toLowerCase(); });
|
||||
checkboxesFor(facet).forEach(function (el) {
|
||||
if (wanted.indexOf(el.value.toLowerCase()) !== -1) el.checked = true;
|
||||
});
|
||||
});
|
||||
|
||||
var anyFacetChecked = checkboxes.some(function (el) { return el.checked; });
|
||||
rangeStates.forEach(function (state) {
|
||||
var facet = state.group.dataset.rangeFacet;
|
||||
var min = params.get(facet + "_min");
|
||||
var max = params.get(facet + "_max");
|
||||
if (min !== null) state.minInput.value = min;
|
||||
if (max !== null) state.maxInput.value = max;
|
||||
if (min !== null || max !== null) anyFacetChecked = true;
|
||||
updateRangeVisuals(state);
|
||||
});
|
||||
|
||||
if ((q || anyFacetChecked) && filterPanel) filterPanel.open = true;
|
||||
}
|
||||
|
||||
// --- Wire up ----------------------------------------------------------
|
||||
|
||||
searchInput.addEventListener("input", function () {
|
||||
applyFilters();
|
||||
syncUrl();
|
||||
});
|
||||
// Without JavaScript, the search form navigates completely normally to
|
||||
// /?q=... (a real <form method="get">, see baseof.html) - on the
|
||||
// already-loaded homepage itself, the "input" event above filters live
|
||||
// instead; an additional full reload on Enter would only be disruptive.
|
||||
if (searchForm) {
|
||||
searchForm.addEventListener("submit", function (event) {
|
||||
event.preventDefault();
|
||||
});
|
||||
}
|
||||
checkboxes.forEach(function (el) {
|
||||
el.addEventListener("change", function () {
|
||||
applyFilters();
|
||||
syncUrl();
|
||||
});
|
||||
});
|
||||
|
||||
restoreFromUrl();
|
||||
applyFilters();
|
||||
})();
|
||||