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:
2026-06-02 00:56:28 +02:00
parent 9f9071d23f
commit c3c8c9639f
4 changed files with 109 additions and 0 deletions
+5
View File
@@ -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>
+37
View File
@@ -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>