diff --git a/assets/css/custom.css b/assets/css/custom.css index 4e4c37c..dd42f50 100644 --- a/assets/css/custom.css +++ b/assets/css/custom.css @@ -1430,3 +1430,68 @@ img { margin: var(--spacing-sm) 0; } img:hover { filter: grayscale(0%); } + +/* ------------------------------------------------------------------------ + Fußnoten / Quellen — Goldmark rendert [^1] als hochgestellte Verweise + + eine .footnotes-Sektion am Textende. Wir geben ihr eine „Quellen"-Über- + schrift (statt des
) und ein ruhigeres, kleineres Schriftbild. + ------------------------------------------------------------------------ */ +/* Hochgestellte Verweis-Nummer im Fließtext. */ +.single-content .footnote-ref a, +.single-content sup a.footnote-ref { + text-decoration: none; + font-variant-numeric: tabular-nums; +} +.single-content sup { line-height: 0; } + +.single-content .footnotes { + margin-top: var(--spacing-xl); + padding-top: var(--spacing-md); + border-top: 1px solid var(--color-border); + font-size: var(--font-size-small); + color: var(--color-text-muted); +} +/* Goldmark setzt ein
an den Anfang — wir ersetzen es durch die Überschrift. */ +.single-content .footnotes > hr { display: none; } +.single-content .footnotes::before { + content: "Quellen"; + display: block; + font-family: var(--font-family-serif); + font-size: 1rem; + font-weight: 600; + color: var(--color-text-primary); + margin-bottom: var(--spacing-sm); +} +.single-content .footnotes ol { margin: 0; padding-left: 1.4em; } +.single-content .footnotes li { margin: 0.3em 0; } +.single-content .footnotes li p { margin: 0; } +.single-content .footnote-backref { text-decoration: none; margin-left: 0.3em; } + +/* ------------------------------------------------------------------------ + Herkunft / Zitieren — „lebendes Dokument": Version (→ Commit), Verlauf, + Zitieren-Knopf. Dezent unter dem Beitrag. + ------------------------------------------------------------------------ */ +.provenance { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 0.5em; + margin-top: var(--spacing-lg); + padding-top: var(--spacing-sm); + border-top: 1px solid var(--color-border); + font-family: var(--font-family-mono); + font-size: var(--font-size-small); + color: var(--color-text-muted); +} +.provenance a { color: var(--color-text-muted); text-decoration: none; } +.provenance a:hover { color: var(--accent); } +.provenance .prov-sep { opacity: 0.5; } +.prov-cite { + font: inherit; + color: var(--color-text-muted); + background: none; + border: none; + padding: 0; + cursor: pointer; +} +.prov-cite:hover { color: var(--accent); } diff --git a/hugo.yaml b/hugo.yaml index e612cdb..1000713 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -80,6 +80,8 @@ menus: weight: 50 params: + # Öffentliche Gitea-Repo-URL (für Provenance: Version → Commit, Verlauf). + repoURL: "https://git.openbureau.ch/karim/OPENBUREAU" author: name: "Karim Gabriele Varano" email: "karim@gabrielevarano.ch" diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7debd23..4892322 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -63,6 +63,11 @@ {{- end }} + {{/* Herkunft/Zitieren — nur bei Library-Beiträgen (lebendes Dokument). */}} + {{ if eq .Section "library" }} + {{ partial "provenance.html" . }} + {{ end }} + {{/* Dialog nur bei Artikeln (Library), nicht auf Seiten wie Spenden/Manifest. */}} {{ if eq .Section "library" }} → Dialog diff --git a/layouts/_partials/provenance.html b/layouts/_partials/provenance.html new file mode 100644 index 0000000..5a68324 --- /dev/null +++ b/layouts/_partials/provenance.html @@ -0,0 +1,37 @@ +{{/* Herkunft eines Beitrags: Version (→ Commit), Verlauf, Zitieren. + Version/Verlauf nur, wenn Git-Info da ist (enableGitInfo) und repoURL gesetzt. + „Zitieren" kopiert eine Quellenangabe in die Zwischenablage. */}} +{{ $repo := site.Params.repoURL }} +{{ $author := .Params.author | default site.Params.author.name }} +
+ {{ with .GitInfo }} + {{ with $repo }} + Version {{ $.GitInfo.AbbreviatedHash }} + · + Verlauf + · + {{ end }} + {{ end }} + +
+