mirror of
https://github.com/andwati/andwati.com.git
synced 2026-11-26 02:18:46 +00:00
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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user