ui: Provenance als Pills + Byline nur bei Library-Beiträgen
- Version/Verlauf/Zitieren als dezente Outline-Pills (wie Versions-Marke), „·"-Trenner entfernt - Byline (Autor) + „Aktualisiert am" nur noch bei Library-Beiträgen; Seiten wie Manifest/Kontakt/Spenden/Colophon zeigen sie nicht mehr Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -15,30 +15,34 @@
|
||||
{{ with .Params.summary }}
|
||||
<p class="single-summary">{{ . }}</p>
|
||||
{{ end }}
|
||||
{{ $author := .Params.author | default site.Params.author.name }}
|
||||
{{ $aslug := urlize $author }}
|
||||
{{ if not .Params.author }}{{ with index site.Data.authors site.Params.author.email }}{{ with .slug }}{{ $aslug = . }}{{ end }}{{ end }}{{ end }}
|
||||
{{ $authorPage := and (ne $aslug "") (site.GetPage (printf "/authors/%s" $aslug)) }}
|
||||
{{ if or $author .Date }}
|
||||
<p class="single-byline">
|
||||
{{- with $author -}}
|
||||
{{- if $authorPage -}}<a class="byline-author" href="{{ $authorPage.RelPermalink }}">{{ . }}</a>
|
||||
{{- else -}}<span class="byline-author">{{ . }}</span>{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if and $author .Date -}}, {{ end -}}
|
||||
{{- if .Date -}}<time class="byline-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>{{- end -}}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{/* Byline + Meta nur bei Library-Beiträgen — Seiten wie Manifest,
|
||||
Kontakt, Spenden brauchen weder Autor noch „Aktualisiert am". */}}
|
||||
{{ if eq .Section "library" }}
|
||||
{{ $author := .Params.author | default site.Params.author.name }}
|
||||
{{ $aslug := urlize $author }}
|
||||
{{ if not .Params.author }}{{ with index site.Data.authors site.Params.author.email }}{{ with .slug }}{{ $aslug = . }}{{ end }}{{ end }}{{ end }}
|
||||
{{ $authorPage := and (ne $aslug "") (site.GetPage (printf "/authors/%s" $aslug)) }}
|
||||
{{ if or $author .Date }}
|
||||
<p class="single-byline">
|
||||
{{- with $author -}}
|
||||
{{- if $authorPage -}}<a class="byline-author" href="{{ $authorPage.RelPermalink }}">{{ . }}</a>
|
||||
{{- else -}}<span class="byline-author">{{ . }}</span>{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if and $author .Date -}}, {{ end -}}
|
||||
{{- if .Date -}}<time class="byline-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>{{- end -}}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{/* Reading time + last-modified — Republik-style, directly below byline */}}
|
||||
{{ $showReadingTime := .Params.showreadingtime | default site.Params.showreadingtime | default true }}
|
||||
{{ $showLastMod := .Params.showlastmod | default site.Params.showlastmod | default false }}
|
||||
{{ $hasLastmod := and $showLastMod .Lastmod (ne (.Lastmod.Format "2006-01-02") (.Date.Format "2006-01-02")) }}
|
||||
{{ if or (and $showReadingTime .ReadingTime) $hasLastmod }}
|
||||
<p class="single-meta">
|
||||
{{ if and $showReadingTime .ReadingTime }}<span class="reading-time">{{ .ReadingTime }} min Lesezeit</span>{{ end }}
|
||||
{{ if $hasLastmod }}{{ if and $showReadingTime .ReadingTime }} · {{ end }}<span class="lastmod">Aktualisiert am {{ .Lastmod.Format "02.01.2006" }}</span>{{ end }}
|
||||
</p>
|
||||
{{/* Reading time + last-modified — Republik-style, directly below byline */}}
|
||||
{{ $showReadingTime := .Params.showreadingtime | default site.Params.showreadingtime | default true }}
|
||||
{{ $showLastMod := .Params.showlastmod | default site.Params.showlastmod | default false }}
|
||||
{{ $hasLastmod := and $showLastMod .Lastmod (ne (.Lastmod.Format "2006-01-02") (.Date.Format "2006-01-02")) }}
|
||||
{{ if or (and $showReadingTime .ReadingTime) $hasLastmod }}
|
||||
<p class="single-meta">
|
||||
{{ if and $showReadingTime .ReadingTime }}<span class="reading-time">{{ .ReadingTime }} min Lesezeit</span>{{ end }}
|
||||
{{ if $hasLastmod }}{{ if and $showReadingTime .ReadingTime }} · {{ end }}<span class="lastmod">Aktualisiert am {{ .Lastmod.Format "02.01.2006" }}</span>{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{/* Versions-Marke: macht bewusst, dass dies eine bestimmte Fassung ist,
|
||||
|
||||
Reference in New Issue
Block a user