diff --git a/hugo-site/content/nix/_index.md b/hugo-site/content/nix/index.md similarity index 100% rename from hugo-site/content/nix/_index.md rename to hugo-site/content/nix/index.md diff --git a/hugo-site/themes/freenet/assets/css/base.css b/hugo-site/themes/freenet/assets/css/base.css index f5c391b4..853e35f9 100644 --- a/hugo-site/themes/freenet/assets/css/base.css +++ b/hugo-site/themes/freenet/assets/css/base.css @@ -361,6 +361,14 @@ pre code { max-width: 1344px; } +/* ...but cap the intro as a whole, not just its paragraphs. Capping only the + paragraphs left code blocks, tables, tabs and alerts running the full shell + width beside them, so the prose looked hard-wrapped in a narrow strip. The + card grid below keeps the full width. */ +.container.is-section-page .page-intro { + max-width: var(--measure); +} + .page-list.is-grid { display: grid; gap: 1.5rem; @@ -401,6 +409,9 @@ pre code { @media screen and (min-width: 1024px) { .container.is-prose .content > table, .container.is-prose .content > pre, + /* Hugo wraps every highlighted fence in
, so the + bare `> pre` above never matched a fenced code block. */ + .container.is-prose .content > .highlight, .container.is-prose .content > figure { margin-inline: calc((var(--measure-content) - var(--breakout)) / 2); width: var(--breakout); diff --git a/hugo-site/themes/freenet/layouts/_default/list.html b/hugo-site/themes/freenet/layouts/_default/list.html index e8756f75..251bb10e 100644 --- a/hugo-site/themes/freenet/layouts/_default/list.html +++ b/hugo-site/themes/freenet/layouts/_default/list.html @@ -1,10 +1,15 @@ {{ define "main" }} -
+ {{/* The wide shell exists for the child-page card grid. A section with no + child pages (try, uninstall, ...) is just an article, and in the wide + shell its capped paragraphs sit beside full-width code blocks and + alerts, which reads as hard-wrapped text. */}} +

{{ .Title }}

{{ if .IsSection }}
{{ .Content }}
+ {{ if .Pages }}
{{ range .Pages }}
@@ -25,6 +30,7 @@

{{ end }}
+ {{ end }} {{ else }} {{ if eq .Section "news" }} {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }}