Commit 4f0fa08
authored
feat(site): add quick links to the header nav (#214)
The header carried Home, Managed, Compare and Docs. It now carries
Home, Quick start, Pricing, Compare and Docs.
"Quick start" is the destination that had no way in: the install section
lives on the landing page and nothing outside that page pointed at it.
It links to /#quick-start rather than #quick-start, because the section
exists on one page only and the link has to work from /compare/ and
/managed/ too. On the landing page the browser treats it as a
same-document hash and just scrolls.
"Pricing" replaces "Managed" rather than joining it. Two entries
pointing at one page is a worse header than a slightly generic label,
and pricing is what a visitor scans for.
No menu button, and no second script. The nav already wraps, which the
handover's warning about a third link overflowing by 33px no longer
describes -- .site-nav has flex-wrap and the header grows a row rather
than the page scrolling sideways. Measured across 320px to 1024px, all
five links plus the star badge and the theme toggle sit inside the
content box at every width, with 40px of slack at the narrowest. The
cost is one extra header row at 640px, where the header goes from 57px
to 83px. A hamburger is worth revisiting if the nav stops fitting, and
it does not.
Also fixes a latent bug this makes prominent. The header is sticky and
nothing reserved room for it, so a hash link scrolled its target to y=0
-- exactly where the header already is -- and the quick-start heading
landed underneath it. That was already true of the hero's "Get started"
button; a permanent nav link on every page makes it the main way in, so
it is fixed here. section[id] now carries scroll-margin-top: 8.5rem
while the nav is wrapped, 5rem once it fits one line. The mobile value
is the larger of the two, because the header is taller when wrapped,
which is the opposite of the usual direction.
docs/SITE.md records the nav decision and the anchor offset. It also
softens the note added with the Jamie change: which competitors the page
shows is the site owner's call, and what the document keeps is the
reasoning to weigh rather than a rule about it.
Verified: the quick-start section clears the sticky header by 22px at
360px, 53px at 640px and 23px at 1280px, navigating both from another
page and within the landing page. No horizontal overflow across 4 pages
x 2 widths x 4 theme combinations, no nav item outside the header's
content box at 320px, 360px or 390px, skim layer holds at 456 words, and
the contrast gate, docs validator, 1333 backend tests, scripts/check.py
and git diff --check all pass.1 parent e72079a commit 4f0fa08
3 files changed
Lines changed: 43 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
95 | 110 | | |
96 | 111 | | |
97 | 112 | | |
| |||
220 | 235 | | |
221 | 236 | | |
222 | 237 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
228 | 244 | | |
229 | 245 | | |
230 | 246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
17 | 22 | | |
18 | 23 | | |
19 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
263 | 279 | | |
264 | 280 | | |
265 | 281 | | |
| |||
0 commit comments