feature: lebende Dokumente — Fußnoten/Quellen + Provenance/Zitieren
- Fußnoten (Goldmark [^1], schon nativ) gestylt: ruhiges Schriftbild, automatische „Quellen"-Überschrift statt <hr> - provenance.html-Partial bei Library-Beiträgen: Version → Commit, Verlauf (Gitea), „Zitieren"-Knopf (kopiert Quellenangabe in die Zwischenablage) - repoURL-Param (git.openbureau.ch) für die Provenance-Links Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -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 <hr>) 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 <hr> 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); }
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -63,6 +63,11 @@
|
||||
</ul>
|
||||
{{- 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" }}
|
||||
<a class="dialog-link" id="dialog-link" data-thread="{{ .RelPermalink }}" href="/dialog/?thread={{ .RelPermalink }}">→ Dialog</a>
|
||||
|
||||
@@ -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 }}
|
||||
<div class="provenance" aria-label="Herkunft">
|
||||
{{ with .GitInfo }}
|
||||
{{ with $repo }}
|
||||
<a class="prov-version" href="{{ . }}/commit/{{ $.GitInfo.Hash }}" title="Diese Version als Commit ansehen">Version {{ $.GitInfo.AbbreviatedHash }}</a>
|
||||
<span class="prov-sep">·</span>
|
||||
<a class="prov-history" href="{{ . }}/commits/branch/main/content/{{ $.File.Path }}">Verlauf</a>
|
||||
<span class="prov-sep">·</span>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<button type="button" class="prov-cite"
|
||||
data-title="{{ .Title }}"
|
||||
data-author="{{ $author }}"
|
||||
data-url="{{ .Permalink }}"
|
||||
{{ with .GitInfo }}data-version="{{ .AbbreviatedHash }}"{{ end }}>Zitieren</button>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
if (window.__provCite) return; window.__provCite = 1;
|
||||
document.querySelectorAll('.prov-cite').forEach(function (btn) {
|
||||
btn.addEventListener('click', function () {
|
||||
var d = btn.dataset;
|
||||
var today = new Date().toLocaleDateString('de-CH');
|
||||
var v = d.version ? ', Version ' + d.version : '';
|
||||
var cite = d.author + ': ' + d.title + '. OPENBUREAU' + v + '. Abgerufen am ' + today + ', ' + d.url;
|
||||
navigator.clipboard.writeText(cite).then(function () {
|
||||
var t = btn.textContent; btn.textContent = 'Kopiert ✓';
|
||||
setTimeout(function () { btn.textContent = t; }, 1500);
|
||||
}).catch(function () {});
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
Reference in New Issue
Block a user