Skip to content

Commit 4f0fa08

Browse files
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

File tree

docs/SITE.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,21 @@ Locked by decision, rendered and chosen from variants, and not to be re-litigate
9292
app never disagree about what the brand colour is. The glow derives from orange-600
9393
rather than the button's own orange-700, because a halo the same darkness as its fill
9494
reads as a smudge.
95+
- **The nav carries the two destinations a visitor looks for by name**: Home, Quick start,
96+
Pricing, Compare, Docs. "Quick start" jumps to the landing page's install section, which
97+
had no way to reach it from another page; "Pricing" is what the third page is called
98+
everywhere else on the web, and it replaced "Managed" rather than joining it, because two
99+
entries pointing at one page is a worse header than a slightly generic label. The link is
100+
`/#quick-start` rather than `#quick-start`: the section exists on one page only.
101+
There is no menu button and no second script. The nav already wraps — measured, not
102+
assumed, it holds 5 links plus the star badge and the toggle inside the content box at
103+
320px, with the header growing a row instead of the page scrolling sideways. A hamburger
104+
is worth revisiting only if the nav stops fitting.
105+
- **Every in-page anchor reserves the sticky header's height.** `section[id]` carries
106+
`scroll-margin-top`, 8.5rem while the nav is wrapped and 5rem once it fits one line. The
107+
browser scrolls a hash target to y=0, which is exactly where a sticky header already is, so
108+
without this the quick-start heading lands underneath it. The mobile value is the larger of
109+
the two, which is the opposite of the usual direction and the reason it is written out.
95110
- **The header is sticky**, with a solid fill rather than a blurred scrim. Glass is out by
96111
the flat canon, and `backdrop-filter` over text this dense costs a repaint per scroll
97112
frame for an effect the design does not want.
@@ -220,11 +235,12 @@ cloud, no self-hosting to concede against — and Jamie is the opposite on all t
220235
makes it the harder comparison and the more useful one. Jamie sits second, directly after
221236
Nojoin, because column order decides which competitor actually gets read.
222237

223-
**Dropping a competitor is not a licence to pick easy ones.** The set has to stay honest, and
224-
the test is whether the table still contains rows a competitor wins. Jamie takes an outright
225-
yes on no-bot capture and on remembering speakers, and a partial on assistant write access —
226-
the row Nojoin leads with. If a future edit leaves Nojoin sweeping every row, the problem is
227-
the competitor set, not the product.
238+
**Which competitors appear is the site owner's call.** What this document records is the
239+
reasoning to weigh, not a rule: a set worth publishing is one where the table still contains
240+
rows a competitor wins, because the concessions are what make the structural gaps believable.
241+
As it stands Jamie takes an outright yes on no-bot capture and on remembering speakers, and a
242+
partial on assistant write access — the row Nojoin leads with. A table Nojoin swept would be
243+
worth a second look for that reason alone.
228244

229245
The comparison page holds itself to the standard it would want applied to it:
230246

site/src/components/Header.astro

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ const stars = await getStarCount();
1313
</a>
1414
<nav class="site-nav" aria-label="Site">
1515
<a href="/">Home</a>
16-
<a href="/managed/">Managed</a>
16+
{/* Absolute with the hash, not a bare "#quick-start": the section only
17+
exists on the landing page, so from /compare/ or /managed/ this has
18+
to navigate there first. On the landing page itself the browser
19+
treats it as a same-document hash and just scrolls. */}
20+
<a href="/#quick-start">Quick start</a>
21+
<a href="/managed/">Pricing</a>
1722
<a href="/compare/">Compare</a>
1823
<a href="https://github.com/Valtora/Nojoin/blob/main/docs/README.md">Docs</a>
1924
<a class="star-badge" href="https://github.com/Valtora/Nojoin">

site/src/styles/site.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,22 @@ button:focus-visible {
260260
border-bottom: 1px solid var(--surface-divider);
261261
}
262262

263+
/* Because that header is sticky, a hash link lands its target underneath it:
264+
the browser scrolls the element to y=0, where the header already is. Every
265+
in-page anchor therefore reserves the header's height plus a little air.
266+
The two values track the header's own breakpoint -- it is 114px tall while
267+
the nav is wrapped and 57px once it fits on one line -- and the mobile value
268+
is the larger one, which is the opposite of the usual direction. */
269+
section[id] {
270+
scroll-margin-top: 8.5rem;
271+
}
272+
273+
@media (min-width: 48rem) {
274+
section[id] {
275+
scroll-margin-top: 5rem;
276+
}
277+
}
278+
263279
/* Wraps rather than overflowing: the theme toggle pushed the nav past a 360px
264280
screen, and a header that grows a second line is better than a page that
265281
scrolls sideways. */

0 commit comments

Comments
 (0)