diff --git a/apps/web/src/components/landing/SiteHeader.astro b/apps/web/src/components/landing/SiteHeader.astro index 7be07a4..47456fe 100644 --- a/apps/web/src/components/landing/SiteHeader.astro +++ b/apps/web/src/components/landing/SiteHeader.astro @@ -23,14 +23,14 @@ const links = [ npm -
- +
+ GitHub - + @@ -159,14 +159,51 @@ const links = [ display: none; } - .site-header__gh { - display: flex; - gap: 0.5rem; + /* One pill, two halves: GitHub on white, npm on black. */ + .site-header__pill { + display: inline-flex; + align-items: stretch; + min-height: 2.5rem; + border: 1px solid var(--ink); + border-radius: 999px; + overflow: hidden; + font-size: 0.9375rem; + font-weight: 500; } - .site-header__gh .btn { - min-height: 2.5rem; + .site-header__pill-link { + display: inline-flex; + align-items: center; + gap: 0.5rem; padding: 0 1.1rem; + transition: + background 150ms ease, + color 150ms ease; + } + + .site-header__pill-link--light { + padding-right: 1rem; + background: var(--surface); + color: var(--ink); + } + + .site-header__pill-link--light:hover { + background: var(--wash); + } + + .site-header__pill-link--dark { + padding-left: 1rem; + background: var(--ink); + color: #fff; + } + + .site-header__pill-link--dark:hover { + background: var(--night-2); + } + + /* The pill clips overflow, so keep the focus ring inside it. */ + .site-header__pill-link:focus-visible { + outline-offset: -4px; } .site-header__toggle { @@ -175,7 +212,7 @@ const links = [ /* Narrow screens: the pill becomes a panel under the bar. */ @media (max-width: 58rem) { - .site-header__gh { + .site-header__pill { display: none; }