diff --git a/site/astro.config.mjs b/site/astro.config.mjs index 336d7934..be12b238 100644 --- a/site/astro.config.mjs +++ b/site/astro.config.mjs @@ -82,6 +82,7 @@ export default defineConfig({ // scripts/css-regions.mjs and css-shadowing.mjs hold this shape. customCss: [ './src/styles/tokens.css', + './src/styles/nav-spacing.css', './src/styles/docs/theme.css', './src/styles/docs/base.css', './src/styles/docs/shell.css', diff --git a/site/src/components/Compare.astro b/site/src/components/Compare.astro new file mode 100644 index 00000000..d20b30b9 --- /dev/null +++ b/site/src/components/Compare.astro @@ -0,0 +1,155 @@ +--- +import { + compareColumns, + compareCopy, + compareNoteHtml, + compareRows, +} from '../data/site-content/compare'; + +const highlightIndex = compareColumns.findIndex((c) => c.highlight); +--- + +
+
+

{compareCopy.heading}

+ {/* Optional: netscli's table stands on its heading, and a lead that only + listed what was compared and which versions was filler. */} + {compareCopy.leadHtml &&

} + + +

+ + + + + {compareColumns.map((c, i) => ( + + ))} + + + + {compareRows.map((row) => ( + + + {row.cells.map((cell, i) => ( + + ))} + + ))} + +
Feature{c.name}
{row.feature} + {cell === '—' ? ( + <> + + Not offered + + ) : ( + cell + )} +
+
+ + {compareNoteHtml &&

} +

+
+ + diff --git a/site/src/components/Install.astro b/site/src/components/Install.astro index ada24c19..a22aa88b 100644 --- a/site/src/components/Install.astro +++ b/site/src/components/Install.astro @@ -48,13 +48,21 @@ const groups = [ return (

{title}

-
+
{recommended.label}
{recommended.command ? (
{recommended.command}
) : ( - - Download {recommended.label} + /* A button, not a command chip. It was drawn in the + `.cmd big` box the other tabs use for their + recommended command, so it read as a command that + said "Download Debian / Ubuntu" -- the label above + it, repeated, in a box made for copying. The label + names the package type; the button just says + Download, like the AppImage row's, and is styled like + it (not green: see `a.install-download` below). */ + + Download → )} {recommended.hint &&

{recommended.hint}

} @@ -217,6 +225,16 @@ html[data-theme='light'] #install .reco{ box-shadow:var(--ui-lift-sm); } .reco-meta{font-size:.85rem;font-weight:500;color:var(--ui-text);margin-bottom:8px} +/* A recommended download (Linux's .deb) lays out like the download rows + under it: label left, button on the right edge. Stacked, the button sat + under the label on the left while the AppImage button below it sat on the + right, so the two buttons in one group pointed in different directions. + 16px sides match `.alt`, so labels and buttons line up down the group. */ +.reco-download{ + display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between; + gap:8px 16px;padding-inline:16px; +} +.reco-download .reco-meta{margin-bottom:0} .cmd.big{font-size:1.05rem;padding-right:74px} /* The container is the divider: the rows sit on it with a 1px gap, so its background shows through as the hairline between them. Chip tokens, so the @@ -267,8 +285,8 @@ html[data-theme='light'] #install .reco{ * * This was accent text on an accent tint inside an accent border -- the * loudest thing in the section, on the row that is the *least* recommended - * route: a direct download is unsigned, unverified and unmanaged, while the - * package-manager rows above it check a hash. The green was pointing at the + * route: a direct download is unmanaged and nothing checks it on the way + * in, while the package-manager rows above it check a hash. The green was pointing at the * wrong option. It reads as one route among several now, and keeps the * accent for hover and focus so it is still obviously a control. */ a.install-download{ diff --git a/site/src/components/Nav.astro b/site/src/components/Nav.astro index 3d5ec590..b071876d 100644 --- a/site/src/components/Nav.astro +++ b/site/src/components/Nav.astro @@ -206,7 +206,7 @@ html[data-theme='light'] nav[data-site-nav]::after{ border-color:rgba(var(--ui-accent-rgb),.35); outline:none; } -.nlinks{display:flex;gap:20px;font-size:.8125rem;flex-wrap:wrap;justify-content:flex-end} +.nlinks{display:flex;gap:var(--ui-nav-link-gap);font-size:var(--ui-nav-font-size);flex-wrap:wrap;justify-content:flex-end} .nlinks a{ color:var(--ui-text-muted);text-decoration:none; display:inline-flex;align-items:center; @@ -235,12 +235,12 @@ html[data-theme='light'] nav[data-site-nav]::after{ starlight/Header.astro, where the docs page shows it. */ .nlinks a.nav-group-start{ position:relative; - margin-inline-start:32px; + margin-inline-start:var(--ui-nav-group-gap); } .nlinks a.nav-group-start::before{ content:""; position:absolute; - inset-inline-start:-16px; + inset-inline-start:calc((var(--ui-nav-group-gap) + var(--ui-nav-link-gap) + 1px) / -2); top:50%; width:1px; height:18px; diff --git a/site/src/components/starlight/CopyPage.astro b/site/src/components/starlight/CopyPage.astro new file mode 100644 index 00000000..1c3dc64b --- /dev/null +++ b/site/src/components/starlight/CopyPage.astro @@ -0,0 +1,120 @@ +--- +/** + * The "Copy page" button: copies this page's markdown source to the + * clipboard. Rendered twice on a docs page -- above the content on wide + * screens (MarkdownContent.astro), and at the end of the collapsed "On this + * page" bar on narrow ones (PageSidebar.astro), where it stays in reach as the + * page scrolls. CSS shows one or the other; the script wires every copy. + */ +const { entry } = Astro.locals.starlightRoute; +// 'docs/cli' -> 'cli'. The section index arrives as the bare id 'docs', +// which the strip does not match -- see the same mapping in +// src/pages/docs/[...slug].md.ts, which serves these files. +const slug = entry.id === 'docs' ? 'index' : entry.id.replace(/^docs\//, ''); +const markdownHref = `/docs/${slug}.md`; +--- + + + + + + diff --git a/site/src/components/starlight/Footer.astro b/site/src/components/starlight/Footer.astro index 98b2a4dd..662a8350 100644 --- a/site/src/components/starlight/Footer.astro +++ b/site/src/components/starlight/Footer.astro @@ -4,7 +4,7 @@ import LastUpdated from 'virtual:starlight/components/LastUpdated'; import Pagination from 'virtual:starlight/components/Pagination'; import { site } from '../../data/site'; -const { meta, hero, builtWith } = site; +const { meta } = site; const year = new Date().getFullYear(); --- @@ -19,35 +19,19 @@ const year = new Date().getFullYear(); */} - {/* Below the Previous/Next cards, not above them. These are a footnote - about the page you just read; the pagination is where you go next, and - it should not be pushed down the screen by metadata. */} -
- - -
- -