feature: alte Versionen direkt auf openbureau anzeigen

- API (öffentlich): /api/history listet Git-Versionen eines Beitrags,
  /api/history/version rendert eine alte Fassung (marked + Fußnoten-Support),
  on-demand via git im CMS-Container — kein Vorbauen. Pfad/rev validiert.
- Versions-Marke neben dem Kopf jedes Library-Beitrags (zeigt bewusst die
  Fassung); öffnet den Verlauf, Auswahl ersetzt den Text + Rücksprung-Banner.
- CSS für Badge/Panel/Banner; marked als Dependency.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 01:38:48 +02:00
parent c6f5beaa7b
commit 0ce2c73004
7 changed files with 248 additions and 0 deletions
+68
View File
@@ -1529,3 +1529,71 @@ img:hover { filter: grayscale(0%); }
font-size: var(--font-size-small);
color: var(--color-text-muted);
}
/* ------------------------------------------------------------------------
Versions-Marke + Verlauf — alte Fassungen direkt auf der Seite anzeigen.
------------------------------------------------------------------------ */
.version-line { margin: 0.5rem 0 0; }
.version-badge {
font-family: var(--font-family-mono);
font-size: var(--font-size-small);
color: var(--color-text-muted);
background: none;
border: 1px solid var(--color-border);
border-radius: 999px;
padding: 0.12em 0.7em;
cursor: pointer;
}
.version-badge:hover { border-color: var(--accent); color: var(--accent); }
.version-badge[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.version-panel {
margin-top: 0.5rem;
border: 1px solid var(--color-border);
border-radius: 8px;
background: var(--color-bg-secondary);
padding: 0.3rem;
}
.version-list { list-style: none; margin: 0; padding: 0; }
.version-list button {
display: flex;
gap: 0.9em;
width: 100%;
text-align: left;
font-family: var(--font-family-mono);
font-size: var(--font-size-small);
color: var(--color-text-primary);
background: none;
border: none;
border-radius: 6px;
padding: 0.45em 0.6em;
cursor: pointer;
}
.version-list button:hover { background: var(--color-bg-primary); }
.version-list .v-date { white-space: nowrap; }
.version-list .v-subject { flex: 1; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.version-list .v-hash { white-space: nowrap; color: var(--color-text-muted); }
.version-empty { margin: 0.4rem 0.6rem; font-size: var(--font-size-small); color: var(--color-text-muted); }
.version-banner {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.6em;
margin-bottom: var(--spacing-md);
padding: 0.5em 0.8em;
border-left: 3px solid var(--accent);
background: var(--color-bg-secondary);
font-family: var(--font-family-mono);
font-size: var(--font-size-small);
color: var(--color-text-muted);
}
.version-back {
font: inherit;
color: var(--accent);
background: none;
border: none;
padding: 0;
cursor: pointer;
}
.version-loading { color: var(--color-text-muted); font-style: italic; }