Add sticky sidebar TOC and widen the page for large screens

Writings detail pages now show the table of contents as a sticky
sidebar once there's room (>=74rem viewport), sharing its markup with
the existing inline TOC via a new TocList.astro so neither copy drifts.
Below that breakpoint it falls back to the original inline list.

Bumped .container--wide 64rem -> 76rem (home, bookshelf, and now
writings detail) so big monitors use more of the screen. The prose
column itself stays capped at 42rem for readability; the extra room is
what makes space for the TOC gutter. Verified at 390/900/1180/1920px.
This commit is contained in:
2026-09-01 09:27:10 +03:00
parent 27e53993d6
commit 0644dcf253
4 changed files with 164 additions and 64 deletions
+35 -1
View File
@@ -152,7 +152,41 @@ pre {
}
.container--wide {
max-width: 64rem;
max-width: 76rem;
}
.toc {
font-family: var(--font-mono);
font-size: var(--font-size-sm);
margin-bottom: var(--space-5);
}
.toc p.meta {
margin-bottom: var(--space-2);
}
.toc ul {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: var(--space-2);
}
.toc a {
text-decoration: none;
color: var(--text-muted);
}
.toc a:hover {
color: var(--accent);
}
.toc-sidebar {
padding-top: var(--space-1);
border-left: 1px solid var(--border);
padding-left: var(--space-4);
}
.eyebrow {