Commit d56a9d4
authored
Make navigation always sticky, remove headroom.js (#1356)
The nav was using headroom.js to hide on scroll-down and reappear on scroll-up. We're switching to a permanently-pinned nav
The "scrolled past top" state (used for a subtle drop-shadow under
the nav) is now detected with a 1px sentinel element + IntersectionObserver instead of headroom's scroll listener (same visual, no library).
Also:
- Add `scroll-padding-block-start` so in-page anchor links account
for the sticky nav.
- Disable the shadow transition under `prefers-reduced-motion`.
- Remove now-dead `body:has(.fl-landing-get) .headroom-unpinned` override.
- Drop headroom.js dependency.1 parent c523dc3 commit d56a9d4
6 files changed
Lines changed: 53 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
31 | 44 | | |
32 | 45 | | |
33 | 46 | | |
| |||
380 | 393 | | |
381 | 394 | | |
382 | 395 | | |
383 | | - | |
| 396 | + | |
384 | 397 | | |
385 | 398 | | |
386 | | - | |
387 | | - | |
388 | | - | |
| 399 | + | |
389 | 400 | | |
390 | 401 | | |
391 | 402 | | |
392 | | - | |
393 | | - | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
394 | 407 | | |
395 | 408 | | |
396 | | - | |
| 409 | + | |
397 | 410 | | |
398 | 411 | | |
399 | 412 | | |
400 | 413 | | |
401 | 414 | | |
402 | 415 | | |
403 | | - | |
| 416 | + | |
404 | 417 | | |
405 | 418 | | |
406 | 419 | | |
407 | 420 | | |
408 | 421 | | |
409 | 422 | | |
410 | 423 | | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | 424 | | |
416 | 425 | | |
417 | 426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
30 | 43 | | |
31 | 44 | | |
32 | 45 | | |
| |||
364 | 377 | | |
365 | 378 | | |
366 | 379 | | |
367 | | - | |
| 380 | + | |
368 | 381 | | |
369 | 382 | | |
370 | 383 | | |
371 | | - | |
| 384 | + | |
372 | 385 | | |
373 | 386 | | |
374 | | - | |
375 | | - | |
376 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
377 | 391 | | |
378 | 392 | | |
379 | | - | |
| 393 | + | |
380 | 394 | | |
381 | 395 | | |
382 | 396 | | |
383 | | - | |
| 397 | + | |
384 | 398 | | |
385 | 399 | | |
386 | 400 | | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | 401 | | |
393 | 402 | | |
394 | 403 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | 210 | | |
216 | 211 | | |
217 | 212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
0 commit comments