Repository navigation
Commit c35f772
site: category grouping, chip counts and wayfinding (batch L)
Navigation QoL. The catalog was one flat list of 298 rows with no way to
tell where you were in it.
Fixes a real defect first: `.topnav a:nth-child(-n + 3) { display: none }`
hid Catalog, Starters and Guides below 640px, so the mobile primary nav
contained only "GitHub". The links now shrink to fit instead; all four are
visible at 375px with no horizontal overflow.
Added:
Category grouping Headings with counts between rows, prerendered by
build.mjs and reproduced identically on hydrate.
Chip counts Faceted: each chip shows how many entries that
category yields under the *other* active filters, so
the numbers move as you filter rather than reading 0
for every category except the selected one.
Scroll position The chip for the section you are scrolled into gets a
quiet marker plus aria-current.
Back to top Appears past 600px, 44px target, respects
prefers-reduced-motion, returns focus to the search box.
Keyboard "/" focuses search, Escape clears it. Both suppressed
while typing in a field or with the dialog open.
Grouping is conditional on purpose: default sort, no category filter.
Sorting by verified date or license inside category buckets would hide the
ordering the reader just asked for, so those render flat. Chips stay pure
filters and the scroll marker is visually distinct from the active-filter
state, because one control carrying two meanings is how a filter row stops
being readable.
Without JavaScript the chips cannot filter, so the prerender emits them as
jump links to the group headings and app.js swaps in real buttons on
hydrate. The no-JS page gains navigation it did not have.
Anchored targets used to land underneath the sticky filter bar, which the
chip links and #entry- permalinks made worse. The bar's height varies with
wrapping, so app.js measures it into --sticky-h and CSS scroll-margin-top
uses it, with a fallback for the no-JS page.
Verified in a browser at 1200px and 375px, both colour schemes: grouping and
counts correct and responsive to other filters, grouping falls back on sort
and category change, scroll-spy tracks the right section, anchors clear the
sticky bar, "/" and Escape behave and do not hijack typing, all four nav
links visible on mobile, no horizontal overflow, every control at least
44px, WCAG AA on all new text in light (worst 5.29) and dark (worst 7.52),
no console errors.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wc67NX9MM964uaVGn4bpZJ1 parent 9239988 commit c35f772
4 files changed
Lines changed: 323 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
257 | 307 | | |
258 | 308 | | |
259 | 309 | | |
| |||
406 | 456 | | |
407 | 457 | | |
408 | 458 | | |
409 | | - | |
410 | | - | |
411 | | - | |
| 459 | + | |
| 460 | + | |
412 | 461 | | |
413 | 462 | | |
414 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
195 | 220 | | |
196 | 221 | | |
197 | 222 | | |
| |||
204 | 229 | | |
205 | 230 | | |
206 | 231 | | |
207 | | - | |
| 232 | + | |
208 | 233 | | |
209 | 234 | | |
210 | 235 | | |
| |||
216 | 241 | | |
217 | 242 | | |
218 | 243 | | |
| 244 | + | |
219 | 245 | | |
220 | | - | |
| 246 | + | |
| 247 | + | |
221 | 248 | | |
222 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
223 | 253 | | |
224 | 254 | | |
225 | 255 | | |
| |||
272 | 302 | | |
273 | 303 | | |
274 | 304 | | |
| 305 | + | |
275 | 306 | | |
276 | 307 | | |
277 | 308 | | |
278 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
279 | 382 | | |
280 | 383 | | |
281 | 384 | | |
| |||
451 | 554 | | |
452 | 555 | | |
453 | 556 | | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
454 | 590 | | |
455 | 591 | | |
456 | 592 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | | - | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
171 | 176 | | |
172 | 177 | | |
173 | 178 | | |
| |||
0 commit comments