Files
OPENBUREAU/layouts/index.html
T
karim 07fdb6e726 Byline: kein Unterstrich; Link für Standard-Autor robust via E-Mail auflösen
- .byline-author/.journal-author: border-bottom entfernt; Stil nur noch auf
  echten Links (a.…), dezenter Hover statt Unterstrich
- Standard-Autor (ohne .Params.author) wird über site.Params.author.email in
  data/authors aufgelöst → Link greift unabhängig vom Namen, sobald Profil
  gespeichert ist; sonst Fallback auf urlize(Name)

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

66 lines
2.9 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 }}
{{ $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)) }}
{{ $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 }}