| … | … | @@ -166,18 +166,41 @@ body{font:16px/1.6 system-ui,-apple-system,'Segoe UI',sans-serif;max-width:38rem |
| 166 | 166 | |
| 167 | 167 | /* Navigation reads as one row of peers, not eight loose links. No underline until you reach for it, |
| 168 | 168 | and the page you are on is marked — otherwise the nav tells you nothing about where you are. */ |
| 169 | | /* ⚠ Eight items on one line at this width: the gap shrinks rather than letting "sign out" orphan |
| 170 | | itself on a second row, which reads as a mistake. */ |
| 171 | | /* ⚠ Nine items on one line. It has wrapped twice now as pages were added, and one orphaned link on |
| 172 | | a second row reads as a mistake rather than as a second row. */ |
| 173 | | /* ⚠ Ten items. It has wrapped three times as pages were added, each time leaving one orphan on a |
| 174 | | second row, which reads as a mistake rather than as a second row. */ |
| 169 | /* ⛔ THE ROW WAS FIXED THREE TIMES BY SHRINKING THE GAP, and wrapped again at eleven items. |
| 170 | "Eight items on one line at this width" became nine, then ten, each time leaving one orphaned |
| 171 | link on a second row. A row that must fit N items breaks every time N grows, so the fourth fix is |
| 172 | not a smaller gap: it is a layout that has no N. Beside the column the nav stacks, and stacking |
| 173 | cannot wrap however many pages are added. |
| 174 | |
| 175 | ⚠ The ROW IS STILL THE DEFAULT. A phone has no gutter to put a sidebar in, so the row is what |
| 176 | works everywhere and the sidebar is what a wide viewport earns. */ |
| 175 | 177 | nav{display:flex;flex-wrap:wrap;gap:.55rem;border-bottom:1px solid var(--line); |
| 176 | 178 | padding-bottom:var(--s2);margin-bottom:var(--s3);font-size:13.5px} |
| 177 | 179 | nav a{margin:0;text-decoration:none;color:var(--dim)} |
| 178 | 180 | nav a:hover{color:var(--fg);text-decoration:underline} |
| 179 | 181 | nav a[aria-current]{color:var(--fg);font-weight:600} |
| 180 | 182 | |
| 183 | /* ⛔ Beside the column, not above it. |
| 184 | The reading column stays 38rem — the measured match for Bluesky's and Mastodon's 600px — and the |
| 185 | nav takes 11rem of the gutter that was empty either side of it. It aligns to the start so a short |
| 186 | nav does not stretch down a long page, and sticks so it is still there after you scroll, which is |
| 187 | the behaviour both references have and a top row cannot. |
| 188 | |
| 189 | ⛔ NO BACKTICKS IN THIS BLOCK. It lives in a JS template literal, so one backtick in a comment |
| 190 | ends the string and the module stops parsing. Third time in this file; a test asserts it, but a |
| 191 | parse error beats the test to it — the suite cannot import what will not parse. |
| 192 | |
| 193 | ⚠ 62rem, because that is where 11rem + 38rem + the gap first fits without squeezing the column. */ |
| 194 | @media (min-width:62rem){ |
| 195 | body{max-width:52rem;display:grid;grid-template-columns:11rem minmax(0,38rem); |
| 196 | gap:var(--s4);align-items:start} |
| 197 | nav{flex-direction:column;align-items:stretch;gap:.1rem;border-bottom:0;padding-bottom:0; |
| 198 | margin-bottom:0;position:sticky;top:var(--s3);font-size:14.5px} |
| 199 | nav a{padding:.3rem .6rem;border-radius:999px} |
| 200 | nav a:hover{background:var(--bg-soft);text-decoration:none;color:var(--fg)} |
| 201 | nav a[aria-current]{background:var(--bg-soft)} |
| 202 | } |
| 203 | |
| 181 | 204 | /* ⛔ The post is a GRID: a fixed avatar gutter and one content column, so every line of a post |
| 182 | 205 | shares a left edge and the identity never shifts the text. */ |
| 183 | 206 | /* Measured against mastodon/mastodon components.scss, which is the same structure: |
| … | … | @@ -509,7 +532,7 @@ export function layout (title, body) { |
| 509 | 532 | return '<!doctype html><html lang="en"><head><meta charset="utf-8">' + |
| 510 | 533 | '<meta name="viewport" content="width=device-width,initial-scale=1">' + |
| 511 | 534 | '<title>' + esc(title) + '</title><style>' + CSS + '</style></head><body>' + |
| 512 | | NAV(title) + body + '</body></html>' |
| 535 | NAV(title) + '<main>' + body + '</main></body></html>' |
| 513 | 536 | } |
| 514 | 537 | |
| 515 | 538 | /** |