feature: Versionsverlauf + Diff (rot/grün) komplett auf der Seite
- API: /api/history/diff liefert den Unified-Diff einer Fassung (git show) - „Version vom <Datum>"-Pill (statt Marke oben + Git-Links) öffnet den Verlauf direkt auf openbureau: Liste der Fassungen → Diff rot/grün wie auf GitHub, Toggle „ganze Fassung anzeigen", Rücksprung. Keine externen Git-Links mehr. - Pills neu: Dialog (Akzent-Outline, wie zuvor) + Version/Zitieren im Tag-Look - CSS: Tag-Pills, Diff-Styling (d-add/d-del/d-hunk), alte Badge-Styles raus Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -44,15 +44,6 @@
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Versions-Marke: macht bewusst, dass dies eine bestimmte Fassung ist,
|
||||
und öffnet den Verlauf (alte Fassungen direkt auf der Seite). */}}
|
||||
{{ if and (eq .Section "library") .GitInfo }}
|
||||
<p class="version-line">
|
||||
<button type="button" id="version-badge" class="version-badge" aria-expanded="false"
|
||||
data-path="{{ .File.Path }}">Version {{ .GitInfo.AbbreviatedHash }}</button>
|
||||
</p>
|
||||
{{ end }}
|
||||
</header>
|
||||
|
||||
{{/* Table of Contents */}}
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
{{/* 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">
|
||||
{{/* Dialog: gleiche Pill-Reihe, sticht durch Pfeil + Akzentfarbe hervor. */}}
|
||||
<a class="prov-dialog" id="dialog-link" data-thread="{{ .RelPermalink }}" href="/dialog/?thread={{ .RelPermalink }}">→ Dialog</a>
|
||||
{{ with .GitInfo }}
|
||||
{{ with $repo }}
|
||||
<a class="prov-version" href="{{ . }}/commit/{{ $.GitInfo.Hash }}" title="Diese Version als Commit ansehen">Version {{ $.GitInfo.AbbreviatedHash }}</a>
|
||||
<a class="prov-history" href="{{ . }}/commits/branch/main/content/{{ $.File.Path }}">Verlauf</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{/* „Version vom <Datum>" öffnet den Verlauf direkt auf der Seite (Diff rot/grün). */}}
|
||||
<button type="button" class="prov-version" id="version-badge" aria-expanded="false"
|
||||
data-path="{{ .File.Path }}">Version vom {{ .Lastmod.Format "02.01.2006" }}</button>
|
||||
<button type="button" class="prov-cite" aria-expanded="false"
|
||||
data-title="{{ .Title }}"
|
||||
data-author="{{ $author }}"
|
||||
|
||||
Reference in New Issue
Block a user