ui: Headings kleiner + Library als Archiv-Zwilling (Sidebar weg)
- section-title 2.6→1.9rem max, 800→700; single-header h1 3→2.2rem max, 800→700; single-summary 1.4→1.2rem. Ruhiger, redaktioneller, site-weit. - Library raus aus der zweispaltigen Sonderform: Übersicht = .atlas (gruppiert, wie Archiv-Root), Eintrag = .single (wie Essay) mit Quellen + Fuss (Gruppe · weitere Einträge · bearbeiten). library-nav-Partial entfernt. - Voll CI-konform: Archiv und Library teilen jetzt dasselbe Gerüst. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+26
-36
@@ -1,41 +1,31 @@
|
||||
{{ define "main" }}
|
||||
<header class="section-header">
|
||||
<h1 class="section-title">{{ .Title }}</h1>
|
||||
</header>
|
||||
{{ .Content }}
|
||||
|
||||
<div class="wiki">
|
||||
<aside class="wiki-side">{{ partial "library-nav.html" . }}</aside>
|
||||
{{ $pages := where site.RegularPages "Section" "library" }}
|
||||
{{ $groups := dict }}
|
||||
{{ range $pages }}
|
||||
{{ $g := .Params.group | default "Allgemein" }}
|
||||
{{ $existing := index $groups $g | default slice }}
|
||||
{{ $groups = merge $groups (dict $g ($existing | append .)) }}
|
||||
{{ end }}
|
||||
|
||||
<div class="wiki-page">
|
||||
<div class="single-content">{{ .Content }}</div>
|
||||
|
||||
{{ $pages := where site.RegularPages "Section" "library" }}
|
||||
{{ $groups := dict }}
|
||||
{{ range $pages }}
|
||||
{{ $g := .Params.group | default "Allgemein" }}
|
||||
{{ $existing := index $groups $g | default slice }}
|
||||
{{ $groups = merge $groups (dict $g ($existing | append .)) }}
|
||||
{{ if $pages }}
|
||||
<section class="atlas">
|
||||
{{ range $g, $ps := $groups }}
|
||||
<article class="atlas-section">
|
||||
<h2>{{ $g }}</h2>
|
||||
<ul class="atlas-list">
|
||||
{{ range sort $ps "Title" }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
{{ with .Params.summary }}<span class="list-meta text-muted"> — {{ . }}</span>{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ if $pages }}
|
||||
<div class="wiki-index">
|
||||
{{ range $g, $ps := $groups }}
|
||||
<section class="wiki-group">
|
||||
<h2>{{ $g }}</h2>
|
||||
<ul>
|
||||
{{ range sort $ps "Title" }}
|
||||
<li>
|
||||
<a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a>
|
||||
{{ with .Params.summary }}<span class="text-muted"> — {{ . }}</span>{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ else }}
|
||||
<p class="text-muted"><em>Noch keine Einträge — der erste entsteht im Redaktions-Editor.</em></p>
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{{ else }}
|
||||
<p class="text-muted"><em>Noch keine Einträge — der erste entsteht im Redaktions-Editor.</em></p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
+30
-28
@@ -1,33 +1,35 @@
|
||||
{{ define "main" }}
|
||||
<header class="section-header">
|
||||
<p class="section-rubric">{{ with .Params.group }}{{ . }}{{ else }}Library{{ end }}</p>
|
||||
<h1 class="section-title">{{ .Title }}</h1>
|
||||
{{ with .Params.summary }}<p class="section-description">{{ . }}</p>{{ end }}
|
||||
</header>
|
||||
<article class="single">
|
||||
<header class="single-header">
|
||||
<h1>{{ .Title }}</h1>
|
||||
{{ with .Params.summary }}<p class="single-summary">{{ . }}</p>{{ end }}
|
||||
</header>
|
||||
|
||||
<div class="wiki">
|
||||
<aside class="wiki-side">{{ partial "library-nav.html" . }}</aside>
|
||||
{{ $hasToC := .Params.toc | default false }}
|
||||
{{ $headers := findRE "<h[2-6]" .Content }}
|
||||
{{ if and $hasToC (ge (len $headers) 2) }}
|
||||
<nav class="toc">
|
||||
<strong>Inhalt</strong>
|
||||
<div class="toc-content">{{ .TableOfContents }}</div>
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
||||
<div class="wiki-page">
|
||||
{{ $hasToC := .Params.toc | default false }}
|
||||
{{ $headers := findRE "<h[2-6]" .Content }}
|
||||
{{ if and $hasToC (ge (len $headers) 2) }}
|
||||
<nav class="toc">
|
||||
<strong>Inhalt</strong>
|
||||
<div class="toc-content">{{ .TableOfContents }}</div>
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
||||
<div class="single-content wiki-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
|
||||
<div class="wiki-foot">
|
||||
{{ if .Lastmod }}<span>Zuletzt bearbeitet am {{ .Lastmod.Format "02.01.2006" }}</span>{{ end }}
|
||||
{{ with .File }}
|
||||
<a href="{{ site.Params.repoURL }}/_edit/branch/main/content/{{ .Path }}" rel="nofollow">bearbeiten ↗</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
<div class="single-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/* Fuss: Gruppe + weitere Einträge derselben Gruppe + bearbeiten. */}}
|
||||
{{ $g := .Params.group | default "Allgemein" }}
|
||||
{{ $siblings := where (where site.RegularPages "Section" "library") "Params.group" (.Params.group) }}
|
||||
<div class="entry-foot">
|
||||
<span class="entry-more">
|
||||
<strong>{{ $g }}</strong>
|
||||
{{ $others := slice }}
|
||||
{{ range $siblings }}{{ if ne .RelPermalink $.RelPermalink }}{{ $others = $others | append . }}{{ end }}{{ end }}
|
||||
{{ with $others }} · {{ range $i, $p := . }}{{ if $i }} · {{ end }}<a href="{{ $p.RelPermalink }}">{{ $p.LinkTitle }}</a>{{ end }}{{ end }}
|
||||
</span>
|
||||
{{ if .Lastmod }}<span>Zuletzt bearbeitet am {{ .Lastmod.Format "02.01.2006" }}</span>{{ end }}
|
||||
{{ with .File }}<a href="{{ site.Params.repoURL }}/_edit/branch/main/content/{{ .Path }}" rel="nofollow">bearbeiten ↗</a>{{ end }}
|
||||
</div>
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user