Files
OPENBUREAU/layouts/index.html
T
karim 6a3b1b5b5e Autor-Seiten: /authors/<slug>/ (rundes Bild, Name, Bio, zentriert) + Byline-Link
- layouts/authors/single.html rendert die Autor-Seite zentriert
- Byline in single.html + index.html verlinkt den Autornamen zu /authors/<urlize name>/
  (nur wenn die Seite existiert)
- CMS-Profil-Speichern schreibt content/authors/<slug>.md (aus Name/Bio/Avatar)
  + data/authors.json und baut public neu → Seite & Links sofort live
- Autor-Seiten aus dem Inhalts-Editor ausgeblendet (über „Profil" verwaltet)
- custom.css: .author-page / -photo / -name / -bio + Byline-Link-Stil

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 13:07:26 +02:00

64 lines
2.7 KiB
HTML

{{ define "main" }}
{{ .Content }}
{{ $library := where site.RegularPages "Section" "library" }}
{{ $journal := first 20 $library.ByDate.Reverse }}
<section class="journal" aria-label="Journal — neueste Beiträge">
<header class="journal-header">
<h2>Journal</h2>
<p class="text-muted">Was zuletzt geschrieben wurde.</p>
</header>
<ol class="journal-list">
{{ range $journal }}
{{ $section := "" }}
{{ with .Parent }}{{ $section = path.Base .RelPermalink }}{{ end }}
{{ $author := .Params.author | default site.Params.author.name }}
{{ $authorPage := cond (ne $author "") (site.GetPage (printf "/authors/%s" (urlize $author))) false }}
{{ $cover := .Params.cover_image }}
{{/* Layout: explicit `layout:` in front matter, else derive:
- cover_image present → image
- none → text */}}
{{ $layout := .Params.layout }}
{{ if not $layout }}
{{ $layout = cond (ne $cover nil) "image" "text" }}
{{ end }}
<li class="journal-entry journal-entry--layout-{{ $layout }}"
data-section="{{ $section }}"
{{ with .Params.color }}data-color="{{ . }}"{{ end }}>
<a class="journal-entry-link" href="{{ .RelPermalink }}">
{{ if and $cover (eq $layout "image") }}
<img class="journal-bg-image" src="{{ $cover | relURL }}" alt="" loading="eager" />
{{ end }}
<div class="journal-entry-body">
{{ if and $cover (eq $layout "icon") }}
<img class="journal-icon-image" src="{{ $cover | relURL }}" alt="" loading="lazy" />
{{ end }}
{{ with .Parent }}
<p class="journal-rubric"><span class="journal-section">{{ .Title }}</span></p>
{{ end }}
<h3 class="journal-title">{{ .LinkTitle }}</h3>
{{ with .Params.summary }}
<p class="journal-summary">{{ . }}</p>
{{ end }}
<p class="journal-byline">
{{- with $author -}}
{{- if $authorPage -}}<a class="journal-author" href="{{ $authorPage.RelPermalink }}">{{ . }}</a>
{{- else -}}<span class="journal-author">{{ . }}</span>{{- end -}}
{{- end -}}
{{- if and $author .Date -}}, {{ end -}}
<time class="journal-date" datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "02.01.2006" }}</time>
</p>
</div>
</a>
</li>
{{ end }}
</ol>
{{ if gt (len $library) 20 }}
<p class="more"><a href="/library/">→ Alle Beiträge in der Library</a></p>
{{ end }}
</section>
{{ end }}