Unify Further Reading into one styled box (CF-3115)
All checks were successful
Deploy Internet for Kids / Build & Push (push) Successful in 12s
Deploy Internet for Kids / Deploy (push) Successful in 4s
Deploy Internet for Kids / Health Check (push) Successful in 1s
Deploy Internet for Kids / Smoke Tests (push) Successful in 2s
Deploy Internet for Kids / IndexNow Ping (push) Successful in 7s
Deploy Internet for Kids / Promote to Latest (push) Successful in 1s
Deploy Internet for Kids / Rollback (push) Has been skipped
Deploy Internet for Kids / Audit (push) Successful in 1s

- Template renders one Further Reading aside (essential-reading style)
  with author-curated list + auto-appended layers-of-protection pillar
- Removed separate Essential reading aside
- Migrated 10 articles' ## Further Reading sections into frontmatter
  further_reading: translationKey arrays
- Added further_reading i18n key in en/de/fr

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-04-14 10:58:20 +03:00
parent 63c3f9d452
commit ffa398ddca
14 changed files with 75 additions and 75 deletions

View File

@@ -36,23 +36,40 @@
{{ .Content }}
</div>
{{/* Essential reading: link to the layered-protection pillar on every article except itself */}}
{{ if ne .Params.translationKey "layers-of-protection" }}
{{ $lang := .Page.Language.Lang }}
{{ $layers := where (where .Site.AllPages "Params.translationKey" "layers-of-protection") "Lang" $lang }}
{{ with index $layers 0 }}
<aside style="margin-top:3rem;padding:1.5rem 1.75rem;border-left:3px solid var(--ifk-accent);background:#f8fafc;border-radius:4px;font-family:system-ui,-apple-system,sans-serif">
<div style="font-size:0.75rem;text-transform:uppercase;letter-spacing:0.08em;color:#6b7280;font-weight:600;margin-bottom:0.5rem">
{{ if eq $lang "de" }}Weiterführend
{{ else if eq $lang "fr" }}Lecture essentielle
{{ else }}Essential reading{{ end }}
</div>
<a href="{{ .Permalink }}" style="font-family:var(--ifk-font);font-size:1.15rem;color:var(--ifk-text);text-decoration:none;font-weight:600;line-height:1.3">
{{ .Title }} &rarr;
</a>
</aside>
{{/* Further Reading: unified box with author-curated list + pillar link (layers-of-protection) auto-appended if not self and not already listed */}}
{{ $lang := .Page.Language.Lang }}
{{ $self := .Params.translationKey }}
{{ $keys := slice }}
{{ with .Params.further_reading }}
{{ range . }}
{{ $keys = $keys | append . }}
{{ end }}
{{ end }}
{{ if and (ne $self "layers-of-protection") (not (in $keys "layers-of-protection")) }}
{{ $keys = $keys | append "layers-of-protection" }}
{{ end }}
{{ if gt (len $keys) 0 }}
<aside style="margin-top:3rem;padding:1.5rem 1.75rem;border-left:3px solid var(--ifk-accent);background:#f8fafc;border-radius:4px;font-family:system-ui,-apple-system,sans-serif">
<div style="font-size:0.75rem;text-transform:uppercase;letter-spacing:0.08em;color:#6b7280;font-weight:600;margin-bottom:0.75rem">
{{ i18n "further_reading" | default "Further Reading" }}
</div>
<ul style="list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:0.6rem">
{{ range $keys }}
{{ $key := . }}
{{ if ne $key $self }}
{{ $match := where (where $.Site.AllPages "Params.translationKey" $key) "Lang" $lang }}
{{ with index $match 0 }}
<li>
<a href="{{ .Permalink }}" style="font-family:var(--ifk-font);font-size:1.1rem;color:var(--ifk-text);text-decoration:none;font-weight:600;line-height:1.35">
{{ .Title }} &rarr;
</a>
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
</aside>
{{ end }}
{{ if or .NextInSection .PrevInSection }}
<nav style="margin-top:3rem;padding-top:2rem;border-top:1px solid #e5e7eb;display:flex;justify-content:space-between;gap:1rem">