From 1aecb31152f6ddc248bb64ba8efe5838e49ba0d6 Mon Sep 17 00:00:00 2001 From: callumalpass Date: Tue, 1 Sep 2026 21:26:30 +1000 Subject: [PATCH 1/2] Draft minimalist site aesthetic --- public/mdbase-murmuration.js | 79 +- public/mdbase-theme.css | 100 +-- public/theme-bootstrap.js | 13 +- src/components/SiteFooter.astro | 31 +- src/components/SiteHeader.astro | 66 +- src/components/ThemeControlScript.astro | 68 +- src/layouts/BaseLayout.astro | 2 +- src/layouts/HomeLayout.astro | 3 +- src/pages/apps/index.astro | 141 +--- src/pages/beta/index.astro | 230 ++---- src/pages/connect/index.astro | 713 ++---------------- src/pages/index.astro | 140 ++-- src/styles/apps.css | 206 +---- src/styles/global.css | 953 +++++------------------- src/styles/home.css | 341 +++------ src/styles/shell.css | 390 ++-------- 16 files changed, 668 insertions(+), 2808 deletions(-) diff --git a/public/mdbase-murmuration.js b/public/mdbase-murmuration.js index c3a0deb..dd991f9 100644 --- a/public/mdbase-murmuration.js +++ b/public/mdbase-murmuration.js @@ -800,7 +800,7 @@ particle.vx += accelerationX * step; particle.vy += accelerationY * step; const speed = Math.hypot(particle.vx, particle.vy); - const maximum = 2.5 + index % 5 * 0.08; + const maximum = 1.7 + index % 5 * 0.06; if (speed > maximum) { particle.vx = particle.vx / speed * maximum; particle.vy = particle.vy / speed * maximum; @@ -854,9 +854,9 @@ context.save(); context.strokeStyle = palette.muted; - context.globalAlpha = 0.88; + context.globalAlpha = 0.52; context.lineWidth = 1; - context.setLineDash(edge.dashed ? [4, 5] : []); + context.setLineDash(edge.dashed ? [3, 5] : []); context.beginPath(); context.moveTo(points[0].x, points[0].y); points.slice(1).forEach((point) => context.lineTo(point.x, point.y)); @@ -867,16 +867,16 @@ const previousPoint = points[points.length - 2]; const angle = Math.atan2(finalPoint.y - previousPoint.y, finalPoint.x - previousPoint.x); context.fillStyle = palette.muted; - context.globalAlpha = 0.95; + context.globalAlpha = 0.62; context.beginPath(); context.moveTo(finalPoint.x, finalPoint.y); context.lineTo( - finalPoint.x - Math.cos(angle - 0.48) * 6, - finalPoint.y - Math.sin(angle - 0.48) * 6 + finalPoint.x - Math.cos(angle - 0.48) * 5, + finalPoint.y - Math.sin(angle - 0.48) * 5 ); context.lineTo( - finalPoint.x - Math.cos(angle + 0.48) * 6, - finalPoint.y - Math.sin(angle + 0.48) * 6 + finalPoint.x - Math.cos(angle + 0.48) * 5, + finalPoint.y - Math.sin(angle + 0.48) * 5 ); context.closePath(); context.fill(); @@ -906,26 +906,15 @@ function drawNodeSurface(node, compact) { const { x, y, w, h } = node.box; context.save(); - - if (node.kind === "boundary") { - context.fillStyle = palette.surface; - context.strokeStyle = palette.line; - context.setLineDash([5, 5]); - } else if (node.kind === "authority") { - context.fillStyle = palette.surfaceSubtle; - context.strokeStyle = palette.accent; - context.setLineDash([]); - } else { - context.fillStyle = - node.kind === "service" ? palette.surfaceSubtle : palette.surface; - context.strokeStyle = - node.kind === "replica" ? palette.muted : palette.line; - context.setLineDash(node.kind === "replica" ? [4, 4] : []); - } - - context.lineWidth = node.kind === "authority" ? 1.25 : 1; + context.fillStyle = palette.surface; + context.strokeStyle = node.kind === "authority" ? palette.muted : palette.lineSoft; + context.globalAlpha = node.kind === "authority" ? 0.78 : 0.64; + context.lineWidth = 1; + context.setLineDash( + node.kind === "boundary" || node.kind === "replica" ? [3, 5] : [] + ); context.beginPath(); - context.roundRect(x, y, w, h, compact ? 3 : 5); + context.rect(x, y, w, h); context.fill(); context.stroke(); context.setLineDash([]); @@ -933,31 +922,23 @@ } function drawNodeLabel(node, compact) { - const { x, y, h } = node.box; + const { x, y } = node.box; context.save(); const labelX = x + (compact ? 7 : 10); - const labelY = y + (compact ? 12 : 15); + const labelY = y + (compact ? 14 : 16); context.textAlign = "left"; - context.fillStyle = - node.kind === "authority" ? palette.accent : palette.ink; - context.font = - `600 ${compact ? 8.5 : 10}px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`; + context.fillStyle = palette.ink; + context.globalAlpha = 0.78; + context.font = "bold 11px serif"; context.fillText(node.label, labelX, labelY); - - if (node.detail && h > (compact ? 42 : 52)) { - context.fillStyle = palette.muted; - context.font = - `${compact ? 7.5 : 8.5}px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`; - context.fillText(node.detail, labelX, labelY + (compact ? 10 : 12)); - } context.restore(); } function drawNote(note, compact) { context.save(); context.fillStyle = palette.muted; - context.font = - `600 ${compact ? 9 : 10}px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace`; + context.globalAlpha = 0.68; + context.font = "11px serif"; context.textAlign = "center"; context.fillText(note.text, note.x, note.y); context.restore(); @@ -986,22 +967,25 @@ } function drawParticle(particle, compact) { - const baseSize = compact ? 2.5 : 3.25; + const baseSize = compact ? 1.8 : 2.25; const size = particle.role === "packet" - ? baseSize * 1.5 + ? baseSize * 1.35 : baseSize * particle.scale; const x = Math.round(particle.x - size / 2); const y = Math.round(particle.y - size / 2); + context.save(); + context.globalAlpha = particle.role === "packet" ? 0.82 : 0.62; if (particle.role === "replica") { context.strokeStyle = palette.replica; - context.lineWidth = 0.9; - context.strokeRect(x, y, Math.max(1.75, size), Math.max(1.75, size)); + context.lineWidth = 0.8; + context.strokeRect(x, y, Math.max(1.5, size), Math.max(1.5, size)); } else { context.fillStyle = particleFill(particle); - context.fillRect(x, y, Math.max(1.75, size), Math.max(1.75, size)); + context.fillRect(x, y, Math.max(1.5, size), Math.max(1.5, size)); } + context.restore(); } function draw(now) { @@ -1021,7 +1005,6 @@ if (activeScene !== "intro") { context.save(); context.globalAlpha = diagramAlpha; - diagram.edges.forEach((edge) => drawEdgeLabel(edge, compact)); diagram.nodes.forEach((node) => drawNodeLabel(node, compact)); diagram.notes.forEach((note) => drawNote(note, compact)); context.restore(); diff --git a/public/mdbase-theme.css b/public/mdbase-theme.css index b70e4ad..a12de00 100644 --- a/public/mdbase-theme.css +++ b/public/mdbase-theme.css @@ -1,25 +1,25 @@ :root { color-scheme: light; - color: var(--ink); - background: var(--paper); + color: var(--color-text); + background: var(--color-canvas); font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif; font-synthesis: none; - --color-canvas: oklch(99.5% 0.002 255); - --color-surface: oklch(99.5% 0.002 255); - --color-surface-subtle: oklch(97.5% 0.004 255); - --color-selected: oklch(96.4% 0.016 238); - --color-text: oklch(21% 0.018 255); - --color-text-soft: oklch(39% 0.016 255); - --color-text-muted: oklch(54% 0.014 255); - --color-text-faint: oklch(70% 0.009 255); - --color-border: oklch(92% 0.006 255); - --color-border-strong: oklch(82% 0.008 255); - --color-accent: oklch(45% 0.105 238); - --color-accent-strong: oklch(35% 0.09 238); - --color-success: oklch(43% 0.09 153); - --color-warning: oklch(60% 0.09 75); - --color-danger: oklch(50% 0.11 28); - --color-scrim: oklch(20% 0.006 250 / 0.22); + --color-canvas: #faf9f6; + --color-surface: #faf9f6; + --color-surface-subtle: #f5f4f0; + --color-selected: #f1f0ec; + --color-text: #171717; + --color-text-soft: rgb(23 23 23 / 74%); + --color-text-muted: rgb(23 23 23 / 54%); + --color-text-faint: rgb(23 23 23 / 30%); + --color-border: rgb(23 23 23 / 18%); + --color-border-strong: rgb(23 23 23 / 42%); + --color-accent: #171717; + --color-accent-strong: #171717; + --color-success: #171717; + --color-warning: #171717; + --color-danger: #171717; + --color-scrim: rgb(23 23 23 / 22%); --paper: var(--color-surface); --hover: var(--color-surface-subtle); --selected: var(--color-selected); @@ -41,42 +41,42 @@ :root[data-theme="dark"] { color-scheme: dark; - --color-canvas: oklch(17.5% 0.012 255); - --color-surface: oklch(19.5% 0.012 255); - --color-surface-subtle: oklch(23.5% 0.014 255); - --color-selected: oklch(27% 0.035 238); - --color-text: oklch(92% 0.008 255); - --color-text-soft: oklch(80% 0.01 255); - --color-text-muted: oklch(68% 0.012 255); - --color-text-faint: oklch(56% 0.011 255); - --color-border: oklch(29% 0.012 255); - --color-border-strong: oklch(40% 0.014 255); - --color-accent: oklch(73% 0.105 238); - --color-accent-strong: oklch(79% 0.085 238); - --color-success: oklch(72% 0.09 153); - --color-warning: oklch(78% 0.09 75); - --color-danger: oklch(72% 0.115 28); - --color-scrim: oklch(5% 0.006 250 / 0.62); + --color-canvas: #121212; + --color-surface: #121212; + --color-surface-subtle: #181818; + --color-selected: #1b1b1b; + --color-text: #f0f0ed; + --color-text-soft: rgb(240 240 237 / 78%); + --color-text-muted: rgb(240 240 237 / 56%); + --color-text-faint: rgb(240 240 237 / 30%); + --color-border: rgb(240 240 237 / 22%); + --color-border-strong: rgb(240 240 237 / 48%); + --color-accent: #f0f0ed; + --color-accent-strong: #f0f0ed; + --color-success: #f0f0ed; + --color-warning: #f0f0ed; + --color-danger: #f0f0ed; + --color-scrim: rgb(0 0 0 / 62%); } @media (prefers-color-scheme: dark) { :root:not([data-theme]) { color-scheme: dark; - --color-canvas: oklch(17.5% 0.012 255); - --color-surface: oklch(19.5% 0.012 255); - --color-surface-subtle: oklch(23.5% 0.014 255); - --color-selected: oklch(27% 0.035 238); - --color-text: oklch(92% 0.008 255); - --color-text-soft: oklch(80% 0.01 255); - --color-text-muted: oklch(68% 0.012 255); - --color-text-faint: oklch(56% 0.011 255); - --color-border: oklch(29% 0.012 255); - --color-border-strong: oklch(40% 0.014 255); - --color-accent: oklch(73% 0.105 238); - --color-accent-strong: oklch(79% 0.085 238); - --color-success: oklch(72% 0.09 153); - --color-warning: oklch(78% 0.09 75); - --color-danger: oklch(72% 0.115 28); - --color-scrim: oklch(5% 0.006 250 / 0.62); + --color-canvas: #121212; + --color-surface: #121212; + --color-surface-subtle: #181818; + --color-selected: #1b1b1b; + --color-text: #f0f0ed; + --color-text-soft: rgb(240 240 237 / 78%); + --color-text-muted: rgb(240 240 237 / 56%); + --color-text-faint: rgb(240 240 237 / 30%); + --color-border: rgb(240 240 237 / 22%); + --color-border-strong: rgb(240 240 237 / 48%); + --color-accent: #f0f0ed; + --color-accent-strong: #f0f0ed; + --color-success: #f0f0ed; + --color-warning: #f0f0ed; + --color-danger: #f0f0ed; + --color-scrim: rgb(0 0 0 / 62%); } } diff --git a/public/theme-bootstrap.js b/public/theme-bootstrap.js index 777c4cd..69558c7 100644 --- a/public/theme-bootstrap.js +++ b/public/theme-bootstrap.js @@ -1,10 +1,15 @@ try { const theme = /^\/authorize\/[0-9a-f-]+$/i.test(location.pathname) - ? "system" + ? null : localStorage.getItem("mdbase:theme"); - if (theme === "light" || theme === "dark") document.documentElement.dataset.theme = theme; - const dark = theme === "dark" || (theme !== "light" && matchMedia("(prefers-color-scheme: dark)").matches); - document.querySelector('meta[name="theme-color"]')?.setAttribute("content", dark ? "#1c1e24" : "#fcfcfd"); + if (theme === "light" || theme === "dark") { + document.documentElement.dataset.theme = theme; + } + const dark = theme === "dark" + || (theme !== "light" && matchMedia("(prefers-color-scheme: dark)").matches); + document + .querySelector('meta[name="theme-color"]') + ?.setAttribute("content", dark ? "#121212" : "#faf9f6"); } catch { // The system preference remains available when local storage is unavailable. } diff --git a/src/components/SiteFooter.astro b/src/components/SiteFooter.astro index f202430..6a49ef8 100644 --- a/src/components/SiteFooter.astro +++ b/src/components/SiteFooter.astro @@ -1,35 +1,12 @@ diff --git a/src/components/SiteHeader.astro b/src/components/SiteHeader.astro index 2ad33b1..04ff595 100644 --- a/src/components/SiteHeader.astro +++ b/src/components/SiteHeader.astro @@ -1,66 +1,30 @@ --- -import BrandMark from "./BrandMark.astro"; - interface Props { current?: "home" | "apps" | "downloads" | "connect" | "sdk" | "runtime" | "spec"; } const { current } = Astro.props; const links = [ - { href: "/", label: "Overview", key: "home" }, + { href: "/", label: "Home", key: "home" }, + { href: "/apps/", label: "Apps", key: "apps" }, { href: "/connect/", label: "Connect", key: "connect" }, - { href: "/apps/", label: "Applications", key: "apps" }, - { href: "/downloads/", label: "Download", key: "downloads" }, - { href: "/sdk/", label: "Developers", key: "sdk" }, - { href: "/spec/", label: "Specification", key: "spec" } + { href: "/sdk/", label: "Documentation/SDK", key: "sdk" }, + { href: "/runtime/", label: "Runtime", key: "runtime" } ] as const; --- diff --git a/src/components/ThemeControlScript.astro b/src/components/ThemeControlScript.astro index cd985ad..0127716 100644 --- a/src/components/ThemeControlScript.astro +++ b/src/components/ThemeControlScript.astro @@ -2,65 +2,55 @@ (() => { const root = document.documentElement; const media = matchMedia("(prefers-color-scheme: dark)"); - const options = document.querySelectorAll("[data-theme-option]"); - const menus = document.querySelectorAll("[data-theme-menu]"); + const controls = document.querySelectorAll(".theme-toggle"); - const currentPreference = () => { + const savedTheme = () => { try { - const stored = localStorage.getItem("mdbase:theme"); - return stored === "light" || stored === "dark" ? stored : "system"; + const saved = localStorage.getItem("mdbase:theme"); + return saved === "light" || saved === "dark" ? saved : null; } catch { - return "system"; + return null; } }; - const apply = (preference, persist = false) => { - if (preference === "system") delete root.dataset.theme; - else root.dataset.theme = preference; + const currentTheme = () => + root.dataset.theme || (media.matches ? "dark" : "light"); + const updateControls = () => { + controls.forEach((control) => { + const next = currentTheme() === "dark" ? "Light" : "Dark"; + control.textContent = next; + control.setAttribute("aria-label", `Use ${next.toLowerCase()} mode`); + control.hidden = false; + }); + }; + + const apply = (theme, persist = false) => { + if (theme) root.dataset.theme = theme; + else delete root.dataset.theme; if (persist) { try { - if (preference === "system") localStorage.removeItem("mdbase:theme"); - else localStorage.setItem("mdbase:theme", preference); + localStorage.setItem("mdbase:theme", theme); } catch { - // The selected theme still applies for this page. + // The choice still applies for this page. } } - - const dark = preference === "dark" - || (preference === "system" && media.matches); + const dark = currentTheme() === "dark"; document .querySelector('meta[name="theme-color"]') - ?.setAttribute("content", dark ? "#1c1e24" : "#fcfcfd"); - options.forEach((option) => { - option.setAttribute( - "aria-pressed", - String(option.dataset.themeOption === preference) - ); - }); + ?.setAttribute("content", dark ? "#121212" : "#faf9f6"); + updateControls(); dispatchEvent(new CustomEvent("mdbase:themechange")); }; - const preference = currentPreference(); - apply(preference); - options.forEach((option) => { - option.addEventListener("click", () => { - apply(option.dataset.themeOption, true); - option.closest("[data-theme-menu]")?.removeAttribute("open"); + apply(savedTheme()); + controls.forEach((control) => { + control.addEventListener("click", () => { + apply(currentTheme() === "dark" ? "light" : "dark", true); }); }); media.addEventListener("change", () => { - if (currentPreference() === "system") apply("system"); - }); - document.addEventListener("click", (event) => { - menus.forEach((menu) => { - if (!menu.contains(event.target)) menu.removeAttribute("open"); - }); - }); - document.addEventListener("keydown", (event) => { - if (event.key === "Escape") { - menus.forEach((menu) => menu.removeAttribute("open")); - } + if (!savedTheme()) apply(null); }); })(); diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index 37fdfb9..b91352c 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -32,7 +32,7 @@ const fullTitle = title === "mdbase" ? title : `${title} | mdbase`; - + diff --git a/src/layouts/HomeLayout.astro b/src/layouts/HomeLayout.astro index 5f1ced8..a6c5489 100644 --- a/src/layouts/HomeLayout.astro +++ b/src/layouts/HomeLayout.astro @@ -29,8 +29,7 @@ const canonical = new URL(Astro.url.pathname, Astro.site); - - + diff --git a/src/pages/apps/index.astro b/src/pages/apps/index.astro index 9180dfd..fbb6d39 100644 --- a/src/pages/apps/index.astro +++ b/src/pages/apps/index.astro @@ -14,8 +14,7 @@ type CatalogueEntry = { const applications: CatalogueEntry[] = [ { name: "TaskNotes", - description: - "Task manager with lists, boards, calendars, recurrence, reminders, attachments, and time tracking.", + description: "Task manager with lists, boards, calendars, recurrence, reminders, attachments, and time tracking.", status: "Public beta", runsOn: "Web, iOS, Android", collections: "Hosted or connected computer", @@ -27,45 +26,31 @@ const applications: CatalogueEntry[] = [ }, { name: "mdbase Editor", - description: - "General collection editor for Markdown records, frontmatter, links, backlinks, and type definitions.", + description: "General collection editor for Markdown records, frontmatter, links, backlinks, and type definitions.", status: "Public beta", runsOn: "Web", collections: "Hosted or connected computer", links: [ { label: "Open Editor", href: "https://editor.mdbase.dev/" }, - { - label: "Source", - href: "https://github.com/mdbase-dev/mdbase-connect/tree/main/apps/editor" - } + { label: "Source", href: "https://github.com/mdbase-dev/mdbase-connect/tree/main/apps/editor" } ] - } -]; - -const collectionTools: CatalogueEntry[] = [ + }, { name: "mdbase for Obsidian", - description: - "Obsidian plugin for collection setup, type editing, v0.2 migration, validation, and hosted collection mirrors.", + description: "Obsidian plugin for collection setup, type editing, migration, validation, and hosted collection mirrors.", status: "Development build", runsOn: "Obsidian desktop and mobile", collections: "Local; hosted mirror", - links: [ - { label: "Source", href: "https://github.com/callumalpass/mdbase-obsidian" } - ] + links: [{ label: "Source", href: "https://github.com/callumalpass/mdbase-obsidian" }] }, { name: "mdbase MCP", - description: - "Remote MCP endpoint for reading and changing approved collections from compatible AI clients.", + description: "Remote MCP endpoint for reading and changing approved collections from compatible AI clients.", status: "Public beta", runsOn: "OAuth-capable MCP clients", collections: "Hosted or connected computer", links: [ - { - label: "Setup and tools", - href: "https://github.com/mdbase-dev/mdbase-connect/blob/main/docs/mcp-gateway.md" - }, + { label: "Setup and tools", href: "https://github.com/mdbase-dev/mdbase-connect/blob/main/docs/mcp-gateway.md" }, { label: "Endpoint", href: "https://mcp.mdbase.dev/mcp" } ] } @@ -77,43 +62,21 @@ const collectionTools: CatalogueEntry[] = [ description="Applications and collection tools that work with mdbase collections." current="apps" > -
-
-
-

Applications

-

Applications for mdbase collections

-
-
-
-
Collection
-
The Markdown records and type definitions remain the shared data.
-
-
-
Access
-
Connect grants each application access to one selected collection.
-
-
-
Status
-
Public beta and development builds are identified below.
-
-
-
+
+

Applications

+

+ An application uses the records and type definitions in a collection + rather than moving the data into its own private format. Several + applications can present different views of the same files. +

-
-
-
-

Applications

-
-
- +
{ applications.map((app) => (
-
-

{app.name}

-
+

{app.name}

{app.description}

@@ -121,66 +84,7 @@ const collectionTools: CatalogueEntry[] = [
-
-
Status
-
- - {app.status} - -
-
-
Runs on
{app.runsOn}
-
Collections
{app.collections}
-
-
- )) - } -
-
- -
-
-
-

Work with a collection

-

Collection tools

-
-

- These tools connect mdbase collections to an existing workspace or client. -

-
- -
- { - collectionTools.map((app) => ( -
-
-

{app.name}

-
-
-

{app.description}

-
- {app.links.map((link) => {link.label})} -
-
-
-
-
Status
-
- - {app.status} - -
-
+
Status
{app.status}
Runs on
{app.runsOn}
Collections
{app.collections}
@@ -191,10 +95,7 @@ const collectionTools: CatalogueEntry[] = [
-
-

Developers

-

Build an application

-
+

Building an application

The Connect SDK handles authorization, collection selection, operations, @@ -202,8 +103,8 @@ const collectionTools: CatalogueEntry[] = [ permissions.

diff --git a/src/pages/beta/index.astro b/src/pages/beta/index.astro index 0b7b4b1..eaba5d4 100644 --- a/src/pages/beta/index.astro +++ b/src/pages/beta/index.astro @@ -7,48 +7,40 @@ import BaseLayout from "../../layouts/BaseLayout.astro"; description="Create an mdbase Connect account with a verified email address and start using local or hosted Markdown collections." current="connect" > -
-
-

mdbase Connect · open beta

-

Public signup is open.

-

- Create an account with your email address and a password. Connect will - prepare a small hosted Markdown collection so you can open the editor - and start exploring. -

-
+
+

Connect open beta

+

+ Public signup is open. Create an account with your email address and a + password. Connect will prepare a small hosted Markdown collection so you + can open the editor and start exploring. +

+

+ A one-time verification link is sent before Connect asks for your name, + password, and agreement to the service terms. Verification links expire + after one hour. +

+

+ Create a Connect account + {" · "}Sign in +

+
-
-

Create an account

-

Start with a verified email.

+
+

What to expect

+
+ Pre-release software

- We will send a one-time verification link before asking for your name, - password, and agreement to the service terms. Verification links expire - after one hour. + Connect has no availability guarantee during the open beta. Keep + independent backups of important collections.

-
-
- -
-

What to expect.

-
-
-
Open beta
-
- Connect is pre-release software with no availability guarantee. Keep - independent backups of important collections. -
-
+
Hosted allowance
Open-beta accounts include 1 GiB of hosted storage and up to three - hosted collections in total. The starter collection uses one of - those three slots. Local collections do not use this allowance. + hosted collections. The starter collection uses one of those slots. + Local collections do not use this allowance.
@@ -61,164 +53,26 @@ import BaseLayout from "../../layouts/BaseLayout.astro";
Existing invitations
- One-time invitation links already delivered remain valid until the - expiry shown in the invitation email. + Invitation links already delivered remain valid until the expiry + shown in the invitation email.
-
-
-

Before you start.

-

- Read how local and hosted collections differ, including which - components can read record contents. The privacy policy and service - terms apply when you create an account. -

- -
-
-

Build or work locally.

-

- The mdbase specification and local tools remain open source and do not - require a Connect account. -

- -
+
+

Before you start

+

+ Read how local and hosted collections differ, + including which components can read record contents. The + privacy policy and service terms + apply when you create an account. +

+

+ The mdbase specification and local tools remain open + source and do not require a Connect account. You can also + download Connect or + try the SDK locally. +

- - - diff --git a/src/pages/connect/index.astro b/src/pages/connect/index.astro index 90658eb..1c89568 100644 --- a/src/pages/connect/index.astro +++ b/src/pages/connect/index.astro @@ -7,672 +7,55 @@ import BaseLayout from "../../layouts/BaseLayout.astro"; description="Choose which apps can use a local folder or hosted mdbase collection, review exact permissions, and revoke access at any time." current="connect" > -
-
-

mdbase Connect

-

Choose which apps can use your Markdown.

-

- When an app asks to use a collection, Connect shows whether it wants - to view, change, or delete records. You choose the collection and can - change or revoke access at any time. -

- -
- -
-
Example access request
-
-
-
-

Access request

-

Project app

-
- Waiting for you -
- -
-
- Collection - Choose where Project app can work. -
-
- Projects - On this computer -
-
- -
-
- Permissions - Open the details to narrow access. -
-
    -
  • - - View and find records -
  • -
  • - - Create and edit records -
  • -
  • - - Delete records -
  • -
-
- -
-

- Project app will use Projects until you revoke access. -

- -
-
-
-
- -
-
-

How it works

-

Start in the app.

-

- Connect keeps the request open while you sign in, choose a collection, - and decide what the app may do. -

-
- -
    -
  1. - 01 -
    -

    An app asks for access

    -

    - The request names the app and the actions it needs. The app cannot - use a collection before you make a decision. -

    -
    -
  2. -
  3. - 02 -
    -

    You choose the collection and permissions

    -

    - Use a folder on this computer or a hosted collection. Remove any - requested permissions you do not want to grant. -

    -
    -
  4. -
  5. - 03 -
    -

    Connect returns you to the app

    -

    - The approved access stays attached to that app and collection. You - can narrow, pause, or revoke it later. -

    -
    -
  6. -
-
- -
-
-

Where your collection lives

-

Keep it on your computer or host it online.

-

- Apps use the same approval flow in both cases. The location of the - collection determines which component can open the records and execute - approved operations. -

-
- -
-
-
-

Local folder

-

On this computer

-
-
- Where Markdown lives -

- In an ordinary folder you choose. The files remain available to - your text editor and other local tools. -

-
-
- Who can read records -

- The local connector and apps using an active grant. The Connect - control plane cannot read local operation payloads or results. -

-
-
- -
-
-

Hosted collection

-

Available online

-
-
- Where Markdown lives -

- In encrypted provider storage, with an optional local Markdown - mirror for offline work. -

-
-
- Who can read records -

- The hosted provider decrypts records to execute approved - operations and acts as a trusted data processor. -

-
-
-
- -
- Permissions can change later. -

- Narrow an app to fewer actions, pause access temporarily, or revoke the - connection. The collection remains usable after an app is removed. -

-
+
+

Connect

+

+ mdbase Connect allows an application to work with one local or hosted + collection. The application describes the kinds of records it understands + and the operations it needs. You choose the collection and review the + request before access is granted. +

+

+ A grant belongs to a particular application and collection. It might + allow the application to view, find, create, and edit records while + leaving deletion unavailable. The authority responsible for the + collection checks that grant whenever an operation is performed. +

+

+ For a local collection, an open-source connector runs on your computer + and performs approved operations against the folder. The Connect control + plane coordinates authorization and routing but does not receive the + operation payloads or results. +

+

+ For a hosted collection, the provider keeps the authoritative copy online + and performs the same operations there. A local Markdown mirror can be + retained for offline work. +

+

+ Access can be narrowed, paused, or revoked later. This changes what the + application may do; it does not alter ownership of the collection or + prevent other tools from using it. +

+

+ Join the open beta or + sign in. +

-
-
-
-

Open beta

-

Create a Connect account.

-

- Public email-and-password signup is open. Verify your email, choose a - password, and start with a small private hosted collection. -

-
- -
- - +
+

Trust boundary

+

+ Connect does not make every component equally trusted. A local connector + can read the local folder. A hosted provider can decrypt hosted records in + order to process them. Applications receive only the operations in their + active grants. The control plane can identify accounts, applications, + collections, and grants, but cannot read local collection contents. +

+

+ The security documentation describes these + boundaries and their limitations in detail. Developers can continue with + the Connect application guide. +

- - diff --git a/src/pages/index.astro b/src/pages/index.astro index b8a2005..f4a8d83 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -6,140 +6,114 @@ import HomeLayout from "../layouts/HomeLayout.astro"; title="mdbase" description="Use the same Markdown files in different apps, keep the main copy where you choose, and approve access explicitly." > - -
-

mdbase specification v0.3 · open source

-

Use the same Markdown files in different apps.

-

- An mdbase is a folder of ordinary Markdown files that more than one - app can understand. You can open the files yourself, keep them where - you choose, and decide which apps may use them. +

What is mdbase?

+

+ An mdbase is a folder of Markdown files with enough shared structure + for applications to understand them. The files remain readable in a + text editor and can be moved, copied, versioned, or changed with + ordinary tools. +

+

+ The specification defines the common format. + Libraries provide validation and queries. Connect + lets an application request access to a particular collection.

-
-
-
Specification
-
Open rules for typed, queryable Markdown collections
-
-
-
Libraries and CLI
-
Open tools that work directly with local collections
-
-
-
Connect
-
App permissions, routing, and optional managed hosting
-
-
-
Runtime
-
Optional durable workflows, timers, and recovery
-
-
-
-

Here is one small mdbase.

-

- This one contains project records, type definitions, and a small - configuration file. A project app, a report, and a text editor can - all use the same files. +

A folder is the database.

+

+ This collection contains project records and the definitions that + describe them. A project application and a text editor can work with + the same files.

-
projects/
-├── mdbase.yaml
-├── _types/
+        
projects/
+├── mdbase.yaml
+├── _types/
 │   ├── project.md
 │   └── person.md
-├── projects/
+├── projects/
 │   └── website-redesign.md
-└── people/
+└── people/
     └── sam.md
-

The files stay readable.

-

- Each record is still a normal Markdown document. A short block at the - top gives apps shared facts such as its title, status, and owner. +

The records are ordinary Markdown.

+

+ Frontmatter holds fields that applications can validate and query. + The body remains prose.

-
---
+        
---
 type: project
 title: Website redesign
 status: active
 owner: "[[people/sam.md]]"
----
+---
 
 The new site should make mdbase
 easier to understand.
-

- The type definition stored beside the records explains what those - fields mean. Queries, links, validation, and safe updates follow the - same open specification in every conforming tool. +

+ A type definition stored in the collection explains what these fields + mean. Conforming tools use the same rules for links, queries, + validation, and updates.

-

Keep it on your computer or host it online.

-

- For a local mdbase, the folder on your computer is the main copy. For - a hosted mdbase, mdbase keeps the main copy available online. +

A collection can be local or hosted.

+

+ A local collection is an ordinary folder on your computer. The + open-source libraries and command-line tools can use it without an + account.

-

- The open specification and local tools need no account. Connect is - the optional service for approving apps, reaching a local collection - remotely, or keeping the authoritative copy online. +

+ A hosted collection keeps its main copy online. It can still have a + local Markdown mirror for offline work.

-

You choose what each app can do.

-

- An app asks for one collection and a specific set of actions. You - review the request before it can read or change anything. +

Applications ask for access.

+

+ Connect shows which collection an application wants to use and which + operations it needs. You might allow an application to find, create, + and edit project records while leaving deletion blocked.

-
-
App
Project app
-
Collection
Projects · on this computer
-
Allow
View, find, create, and edit records
-
Keep blocked
Delete records
-
-

- The local connector enforces grants for local folders. The hosted - provider executes approved operations for hosted collections. - {" "}See the complete trust boundary. +

+ The collection authority checks the grant whenever the application + performs an operation.

-

Access stays under your control.

-

- Pause or remove an app's access at any time. The main copy keeps every - change in order while approved apps can keep working copies for - offline use. +

The collection does not belong to the application.

+

+ Access can be narrowed, paused, or revoked. Removing an application + does not remove the collection, and the files remain usable with + other conforming tools. +

+

+ See the current applications, read the + developer documentation, or learn about the + optional runtime profile.

-
- diff --git a/src/styles/apps.css b/src/styles/apps.css index 1b05d50..ec9b8c0 100644 --- a/src/styles/apps.css +++ b/src/styles/apps.css @@ -1,189 +1,17 @@ -.apps-hero__summary { - display: grid; - border-top: 1px solid var(--line-strong); -} - -.apps-hero__summary > div { - display: grid; - padding-block: 0.7rem; - grid-template-columns: 7rem minmax(0, 1fr); - gap: 1rem; - border-bottom: 1px solid var(--line); -} - -.apps-hero__summary dt, -.app-meta dt, -.catalogue-label { - color: var(--ink-muted); - font: 500 0.62rem/1.45 var(--mono); -} - -.apps-hero__summary dd { - color: var(--ink-soft); - font-size: 0.82rem; -} - -.catalogue-section { - width: min(100% - 2rem, var(--page)); - margin-inline: auto; - padding-block: clamp(3.5rem, 6vw, 5.5rem); - border-bottom: 1px solid var(--line); -} - -.catalogue-section__header { - display: grid; - align-items: end; - grid-template-columns: minmax(12rem, 0.34fr) minmax(0, 1fr); - gap: 1.5rem; -} - -.catalogue-section__header h2 { - font-size: clamp(1.45rem, 2.2vw, 1.9rem); -} - -.catalogue-section__header p { - max-width: 56ch; - color: var(--ink-soft); - font-size: 0.88rem; -} - -.app-list { - margin-top: 2rem; - border-top: 1px solid var(--line-strong); -} - -.app-entry { - display: grid; - max-width: none; - padding-block: 1.5rem; - grid-template-columns: minmax(12rem, 0.34fr) minmax(17rem, 0.78fr) minmax( - 15rem, - 0.62fr - ); - gap: 1.5rem; - border-bottom: 1px solid var(--line); -} - -.app-entry__identity { - min-width: 0; -} - -.app-entry h3 { - max-width: none; - font-size: 1rem; -} - -.app-entry__description p { - color: var(--ink-soft); - font-size: 0.88rem; -} - -.app-entry__links { - display: flex; - margin-top: 0.8rem; - flex-wrap: wrap; - gap: 0.4rem 1rem; -} - -.app-entry__links a { - font-size: 0.78rem; - font-weight: 700; -} - -.app-meta { - display: grid; - align-content: start; - border-top: 1px solid var(--line); -} - -.app-meta > div { - display: grid; - padding-block: 0.45rem; - grid-template-columns: 5.25rem minmax(0, 1fr); - gap: 0.75rem; - border-bottom: 1px solid var(--line); -} - -.app-meta dd { - color: var(--ink-soft); - font-size: 0.75rem; -} - -.catalogue-status { - display: inline-flex; - align-items: center; - gap: 0.4rem; -} - -.catalogue-status::before { - width: 0.38rem; - height: 0.38rem; - flex: 0 0 auto; - content: ""; - background: var(--signal); - border-radius: 50%; -} - -.catalogue-status--development::before { - background: var(--warning); -} - -.build-section { - display: grid; - width: min(100% - 2rem, var(--page)); - margin-inline: auto; - padding-block: clamp(3.5rem, 6vw, 5.5rem); - align-items: start; - grid-template-columns: minmax(12rem, 0.34fr) minmax(0, 1fr); - gap: 1.5rem; -} - -.build-section h2 { - font-size: clamp(1.45rem, 2.2vw, 1.9rem); -} - -.build-section__body p { - color: var(--ink-soft); - font-size: 0.9rem; -} - -.build-section__body .button-row { - margin-top: 1.2rem; -} - -@media (max-width: 68rem) { - .app-entry { - grid-template-columns: minmax(11rem, 0.38fr) minmax(0, 1fr); - } - - .app-meta { - grid-column: 2; - } -} - -@media (max-width: 48rem) { - .catalogue-section__header, - .app-entry, - .build-section { - grid-template-columns: 1fr; - } - - .catalogue-section__header { - align-items: start; - } - - .app-meta { - grid-column: auto; - } -} - -@media (max-width: 42rem) { - .catalogue-section, - .build-section { - width: min(100% - 1.25rem, var(--page)); - } - - .apps-hero__summary > div { - grid-template-columns: 5.5rem minmax(0, 1fr); - } -} +.apps-intro { margin-bottom: 3.75rem; } +.apps-intro p { margin-top: 0.8rem; color: var(--ink-soft); } +.catalogue-section__header { display: block; margin-bottom: 1.5rem; } +.catalogue-section__header p { margin-top: 0.5rem; color: var(--ink-soft); } +.app-list { margin: 0; } +.app-entry { max-width: var(--reading); margin-bottom: 1.75rem; } +.app-entry h3 { margin-bottom: 0.25rem; } +.app-entry__description p { color: var(--ink-soft); } +.app-entry__links { display: flex; margin-top: 0.35rem; flex-wrap: wrap; gap: 0.25rem 1rem; } +.app-meta { display: grid; margin-top: 0.6rem; } +.app-meta > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; } +.app-meta dt { color: var(--ink-muted); font: 400 0.68rem/1.55 var(--mono); } +.app-meta dd { color: var(--ink-soft); font-size: 0.82rem; } +.catalogue-label { color: var(--ink-muted); font: 400 0.68rem/1.4 var(--mono); } +.build-section { display: block; } +.build-section__body p { margin-top: 0.5rem; color: var(--ink-soft); } +.build-section__body .button-row { margin-top: 0.8rem; } diff --git a/src/styles/global.css b/src/styles/global.css index 0b9470d..e15bd0a 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -1,7 +1,6 @@ :root { --canvas: var(--color-canvas); --surface: var(--color-surface-subtle); - --surface-strong: color-mix(in oklch, var(--color-surface-subtle) 72%, var(--color-border)); --code: var(--color-surface-subtle); --code-ink: var(--color-text); --ink: var(--color-text); @@ -11,15 +10,14 @@ --line-strong: var(--color-border-strong); --blue: var(--color-accent); --blue-strong: var(--color-accent-strong); - --blue-field: color-mix(in oklch, var(--color-surface) 86%, var(--color-accent)); --signal: var(--color-success); --warning: var(--color-warning); --danger: var(--color-danger); --on-blue: var(--color-surface); --scrim: var(--color-scrim); - --page: 78rem; - --reading: 72ch; - --radius: 4px; + --page: 47.5rem; + --reading: 41rem; + --radius: 0; } *, @@ -28,14 +26,11 @@ box-sizing: border-box; } -* { - margin: 0; -} +* { margin: 0; } html { min-width: 320px; scroll-behavior: smooth; - scroll-padding-top: calc(var(--header) + 1.5rem); color: var(--ink); background: var(--canvas); text-rendering: optimizeLegibility; @@ -48,100 +43,46 @@ body { color: var(--ink); background: var(--canvas); font-family: var(--sans); - font-size: 0.9375rem; - line-height: 1.58; + font-size: 1rem; + line-height: 1.55; } .site-body > main { - min-height: calc(100vh - 12rem); - padding-top: var(--header); + width: min(calc(100% - 3rem), var(--reading)); + min-height: calc(100vh - 14rem); + margin: 4rem 0 0 var(--site-left); } -::selection { - color: var(--on-blue); - background: var(--blue); -} +::selection { color: var(--canvas); background: var(--ink); } a { - color: var(--blue-strong); + color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 0.2em; } -a:hover { - color: var(--blue); -} +a:hover { color: var(--ink-soft); } -button, -select, -input, -textarea { - color: inherit; - font: inherit; -} +button, select, input, textarea { color: inherit; font: inherit; } +button, select { cursor: pointer; } +img, svg { display: block; max-width: 100%; } -button, -select { - cursor: pointer; -} - -img, -svg { - display: block; - max-width: 100%; -} - -h1, -h2, -h3, -h4 { - max-width: 24ch; +h1, h2, h3, h4 { + max-width: 34ch; color: var(--ink); - font-weight: 700; - line-height: 1.08; - letter-spacing: -0.02em; - text-wrap: balance; -} - -h1 { - font-size: clamp(2.25rem, 4vw, 3.5rem); -} - -h2 { - font-size: clamp(1.6rem, 2.6vw, 2.2rem); -} - -h3 { - font-size: 1.15rem; -} - -h4 { font-size: 1rem; + font-weight: 700; + line-height: 1.35; + letter-spacing: 0; + text-wrap: pretty; } -p, -li { - max-width: var(--reading); -} - -code, -pre, -.mono { - font-family: var(--mono); -} - -code { - font-size: 0.86em; -} - -:focus-visible { - outline: 2px solid var(--blue); - outline-offset: 3px; -} +p, li { max-width: var(--reading); } +code, pre, .mono { font-family: var(--mono); } +code { font-size: 0.86em; } -main[tabindex="-1"]:focus { - outline: none; -} +:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; } +main[tabindex="-1"]:focus { outline: none; } .sr-only { position: absolute; @@ -158,745 +99,233 @@ main[tabindex="-1"]:focus { .skip-link { position: fixed; z-index: 100; - top: 0.6rem; - left: 0.6rem; - padding: 0.5rem 0.7rem; + top: 0.5rem; + left: 0.5rem; + padding: 0.4rem; color: var(--canvas); background: var(--ink); - border-radius: var(--radius); - transform: translateY(-180%); -} - -.skip-link:focus { - transform: translateY(0); -} - -.page-shell { - width: min(100% - 2rem, var(--page)); - margin-inline: auto; -} - -.eyebrow { - color: var(--ink-muted); - font: 500 0.68rem/1.3 var(--mono); -} - -.eyebrow i { - display: none; + transform: translateY(-200%); } +.skip-link:focus { transform: none; } -.button-row { - display: flex; - flex-wrap: wrap; - gap: 0.65rem; -} - -.button { - display: inline-flex; - min-height: 2.75rem; - padding: 0.4rem 0.8rem; - align-items: center; - justify-content: center; - color: var(--ink); - background: var(--canvas); - border: 1px solid var(--line); - border-radius: var(--radius); - font: 600 0.75rem/1.2 var(--sans); - text-decoration: none; - transition: - color 160ms var(--ease), - border-color 160ms var(--ease), - background-color 160ms var(--ease); -} - -.button:hover, -.button--primary:hover { - color: var(--blue-strong); - background: var(--canvas); - border-color: var(--line-strong); -} +.page-shell { width: 100%; } +.eyebrow { margin-bottom: 1rem; color: var(--ink-muted); font: 400 0.72rem/1.4 var(--mono); } +.eyebrow i { display: none; } +.button-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; } +.button, .button--primary { + display: inline; + min-height: 0; + padding: 0; color: var(--ink); - background: var(--canvas); - border-color: var(--line-strong); + background: transparent; + border: 0; + border-radius: 0; + font: inherit; + font-weight: 400; + text-decoration: underline; + text-underline-offset: 0.2em; } +.button:hover, .button--primary:hover { color: var(--ink-soft); background: transparent; } .page-hero { - padding-block: clamp(3.25rem, 6vw, 5rem); - border-bottom: 1px solid var(--line); + padding: 0 0 3.5rem; + border: 0; } - .page-hero__inner { - display: grid; - width: min(100% - 2rem, var(--page)); - margin-inline: auto; - grid-template-columns: minmax(0, 0.9fr) minmax(19rem, 0.72fr); - gap: clamp(2rem, 6vw, 6rem); - align-items: end; -} - -.page-hero h1 { - max-width: 16ch; - margin-top: 1rem; - font-size: clamp(2.35rem, 4.5vw, 3.8rem); -} - -.page-hero__aside { - padding-top: 1rem; - border-top: 1px solid var(--line-strong); -} - -.page-hero__aside p { - color: var(--ink-soft); - font-size: 0.95rem; -} - -.page-hero__aside .button-row { - margin-top: 1.25rem; -} - -.content-section { - width: min(100% - 2rem, var(--page)); - margin-inline: auto; - padding-block: clamp(3.5rem, 6vw, 5.5rem); - border-bottom: 1px solid var(--line); -} - -.content-section > p { - margin-top: 1rem; - color: var(--ink-soft); - font-size: 0.95rem; + display: block; + width: auto; + margin: 0; } +.page-hero h1 { margin-bottom: 1.25rem; } +.page-hero__aside { padding: 0; border: 0; } +.page-hero__aside p { color: var(--ink-soft); } +.page-hero__aside .button-row { margin-top: 1.25rem; } -.steps { - margin-top: 2.5rem; - counter-reset: steps; +.content-section, +.catalogue-section, +.build-section { + width: auto; + margin: 0; + padding: 0; + border: 0; } +.content-section + .content-section, +.catalogue-section + .catalogue-section, +.build-section { margin-top: 3.75rem; } +.content-section > p { margin-top: 0.8rem; color: var(--ink-soft); } +.steps { margin-top: 1.5rem; counter-reset: steps; } .step { display: grid; - padding-block: 1.25rem; - border-top: 1px solid var(--line); - grid-template-columns: 2.5rem minmax(0, 1fr); - gap: 1rem; - counter-increment: steps; -} - -.step::before { - color: var(--ink-muted); - font: 500 0.65rem/1.4 var(--mono); - content: counter(steps, decimal-leading-zero); -} - -.step h3 { - font-size: 1rem; -} - -.step p { - margin-top: 0.45rem; - color: var(--ink-soft); -} - -.plain-sequence, -.glossary-list { - margin-top: 2rem; - border-top: 1px solid var(--line-strong); -} - -.plain-sequence { padding: 0; - list-style: none; - counter-reset: plain-sequence; + margin-bottom: 1.35rem; + border: 0; + grid-template-columns: 2rem minmax(0, 1fr); + gap: 0.75rem; + counter-increment: steps; } +.step::before { color: var(--ink-muted); font: 400 0.65rem/1.6 var(--mono); content: counter(steps, decimal-leading-zero); } +.step h3 { font-size: 1rem; } +.step p { margin-top: 0.25rem; color: var(--ink-soft); } -.plain-sequence li, -.glossary-list > div { +.plain-sequence, .glossary-list { margin-top: 1.5rem; } +.plain-sequence { padding: 0; list-style: none; counter-reset: plain-sequence; } +.plain-sequence li, .glossary-list > div { display: grid; max-width: none; - padding: 1rem 0; - grid-template-columns: minmax(11rem, 0.35fr) minmax(0, 1fr); + padding: 0; + margin-bottom: 1rem; + grid-template-columns: minmax(9rem, 0.35fr) minmax(0, 1fr); gap: 1rem; - border-bottom: 1px solid var(--line); -} - -.plain-sequence li { - grid-template-columns: 2.25rem minmax(11rem, 0.35fr) minmax(0, 1fr); - counter-increment: plain-sequence; -} - -.plain-sequence li::before { - color: var(--ink-muted); - font: 500 0.62rem/1.5 var(--mono); - content: counter(plain-sequence, decimal-leading-zero); -} - -.plain-sequence strong, -.glossary-list dt { - color: var(--ink); - font-size: 0.86rem; - font-weight: 700; -} - -.plain-sequence span, -.glossary-list dd { - color: var(--ink-soft); - font-size: 0.84rem; + border: 0; } +.plain-sequence li { grid-template-columns: 2rem minmax(9rem, 0.35fr) minmax(0, 1fr); counter-increment: plain-sequence; } +.plain-sequence li::before { color: var(--ink-muted); font: 400 0.62rem/1.5 var(--mono); content: counter(plain-sequence, decimal-leading-zero); } +.plain-sequence span, .glossary-list dd { color: var(--ink-soft); } -.trust-table, -.profile-table, -.api-table { +.trust-table, .profile-table, .api-table { width: 100%; - margin-top: 2rem; + margin-top: 1.5rem; border-collapse: collapse; font-size: 0.82rem; } - -.trust-table th, -.trust-table td, -.profile-table th, -.profile-table td, -.api-table th, -.api-table td { - padding: 0.72rem 0.65rem; +.trust-table th, .trust-table td, +.profile-table th, .profile-table td, +.api-table th, .api-table td { + padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; } +.trust-table th, .profile-table th, .api-table th { color: var(--ink-muted); font: 400 0.68rem/1.4 var(--mono); } -.trust-table th, -.profile-table th, -.api-table th { - color: var(--ink-muted); - font: 500 0.62rem/1.4 var(--mono); -} - -.trust-table td:first-child, -.profile-table td:first-child, -.api-table td:first-child { - font-weight: 700; -} - -.status { - display: inline-flex; - align-items: center; - gap: 0.4rem; - color: var(--ink-soft); - font-size: 0.78rem; -} - -.status::before { - width: 0.4rem; - height: 0.4rem; - content: ""; - background: var(--signal); - border-radius: 50%; -} - -.status--draft::before { - background: var(--warning); -} - -.status--none::before { - background: var(--ink-muted); -} +.status { color: var(--ink-soft); font-size: 0.82rem; } +.status::before { display: none; } -.code-block { +.code-block, pre:not(.file-tree):not(.record-example) { margin-block: 1.25rem; - overflow: hidden; - background: var(--code); - border: 1px solid var(--line); - border-radius: var(--radius); + overflow: auto; + color: var(--code-ink); + background: var(--canvas); + border: 1px solid var(--ink); + border-radius: 0; } - .code-block figcaption { display: flex; - min-height: 2.75rem; + min-height: 2.4rem; padding: 0 0.75rem; align-items: center; justify-content: space-between; color: var(--ink-muted); border-bottom: 1px solid var(--line); - font: 500 0.62rem/1 var(--mono); -} - -.code-block button { - min-width: 2.75rem; - min-height: 2.75rem; - padding: 0.25rem 0.4rem; - color: inherit; - background: transparent; - border: 0; - font-size: inherit; -} - -.code-block pre { - max-width: 100%; - padding: 1rem; - overflow: auto; - color: var(--code-ink); - font-size: 0.76rem; - line-height: 1.58; - tab-size: 2; -} - -.code-block code { - font-size: inherit; + font: 400 0.65rem/1 var(--mono); } +.code-block button { min-height: 2.4rem; padding: 0 0.4rem; color: inherit; background: transparent; border: 0; } +.code-block pre, pre:not(.file-tree):not(.record-example) { max-width: 100%; padding: 1rem; font-size: 0.76rem; line-height: 1.58; tab-size: 2; } +.code-block pre { margin: 0; border: 0; } +.code-block code { font-size: inherit; } .callout { margin-block: 1.5rem; - padding: 0.9rem 1rem; - background: var(--surface); - border: 1px solid var(--line); - border-radius: var(--radius); -} - -.callout strong { - display: block; - margin-bottom: 0.3rem; - font-size: 0.88rem; -} - -.callout p { - color: var(--ink-soft); - font-size: 0.84rem; -} - -.callout--success { - background: color-mix(in oklch, var(--surface) 88%, var(--signal)); - border-color: color-mix(in oklch, var(--line) 72%, var(--signal)); -} - -.start-options { - display: grid; - margin-top: 1.25rem; - border-top: 1px solid var(--line-strong); - grid-template-columns: repeat(3, minmax(0, 1fr)); -} - -.start-options > div { - padding: 1rem 1.25rem 1.1rem 0; - border-bottom: 1px solid var(--line); -} - -.start-options > div + div { - padding-right: 0; - padding-left: 1.25rem; - border-left: 1px solid var(--line); -} - -.start-options strong { - font-size: 0.9rem; -} - -.start-options p { - margin-top: 0.4rem; - color: var(--ink-soft); - font-size: 0.82rem; -} - -.start-options a { - display: inline-block; - margin-top: 0.75rem; - font-size: 0.78rem; - font-weight: 700; -} - -.download-summary { - display: flex; - margin-top: 1rem; - flex-wrap: wrap; - gap: 0.45rem 1.25rem; - color: var(--ink-muted); - font: 500 0.64rem/1.5 var(--mono); -} - -.download-summary strong { - color: var(--ink); - font-weight: 500; -} - -.download-list { - margin-top: 2rem; - border-top: 1px solid var(--line-strong); -} - -.download-option { - display: grid; - max-width: none; - padding: 1.2rem 0; - align-items: start; - grid-template-columns: minmax(9rem, 0.28fr) minmax(0, 1fr) auto; - gap: 1rem; - border-bottom: 1px solid var(--line); -} - -.download-option h3 { - font-size: 0.95rem; -} - -.download-option__detail p { - color: var(--ink-soft); - font-size: 0.84rem; -} - -.download-option__detail code { - display: block; - margin-top: 0.3rem; - color: var(--ink-muted); - font-size: 0.68rem; -} - -.download-option__actions { - display: flex; - flex-wrap: wrap; - justify-content: flex-end; - gap: 0.5rem; -} - -.download-note { - margin-top: 1.25rem; - color: var(--ink-muted); - font-size: 0.78rem; -} - -.download-release-actions { - margin-top: 1.25rem; -} - -@media (max-width: 48rem) { - .download-option { - grid-template-columns: 1fr; - } - - .download-option__actions { - justify-content: flex-start; - } -} + padding: 0 0 0 1rem; + background: transparent !important; + border: 0; + border-left: 1px solid var(--ink); + border-radius: 0; +} +.callout strong { display: block; margin-bottom: 0.3rem; } +.callout p { color: var(--ink-soft); } + +.start-options { display: block; margin-top: 1.25rem; border: 0; } +.start-options > div, +.start-options > div + div { padding: 0; margin-bottom: 1.35rem; border: 0; } +.start-options p { margin-top: 0.3rem; color: var(--ink-soft); } +.start-options a { display: inline-block; margin-top: 0.4rem; } + +.download-summary { display: flex; margin-top: 1rem; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--ink-muted); font: 400 0.68rem/1.5 var(--mono); } +.download-list { margin-top: 1.5rem; } +.download-option { display: grid; max-width: none; padding: 0; margin-bottom: 1.5rem; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 1rem; border: 0; } +.download-option__detail p { color: var(--ink-soft); } +.download-option__detail code { display: block; margin-top: 0.2rem; color: var(--ink-muted); } +.download-option__actions { display: flex; justify-content: flex-end; } +.download-note, .download-release-actions { margin-top: 1.25rem; } .docs-shell { display: grid; - width: min(100% - 2rem, 96rem); - margin-inline: auto; - grid-template-columns: 14rem minmax(0, var(--reading)) minmax(9rem, 1fr); + width: min(calc(100vw - var(--site-left) - 1.5rem), 67.5rem); + grid-template-columns: 11.25rem minmax(0, 41rem) minmax(8rem, 1fr); gap: clamp(2rem, 4vw, 4rem); } - -.docs-nav, -.docs-toc { - position: sticky; - top: calc(var(--header) + 1.25rem); - align-self: start; - max-height: calc(100vh - var(--header) - 2.5rem); - margin-top: 1.75rem; - overflow: auto; -} - -.docs-nav summary { - padding-bottom: 0.6rem; - color: var(--ink); - font: 500 0.68rem/1.3 var(--mono); - list-style: none; -} - -.docs-nav summary::-webkit-details-marker { - display: none; -} - -.docs-nav nav, -.docs-toc nav { - display: grid; -} - -.docs-nav__group { - display: grid; -} - -.docs-nav__group + .docs-nav__group { - margin-top: 1rem; - padding-top: 0.85rem; - border-top: 1px solid var(--line); -} - -.docs-nav__group > strong { - margin-bottom: 0.25rem; - color: var(--ink-muted); - font: 500 0.56rem/1.3 var(--mono); -} - -.docs-nav nav a { - padding: 0.36rem 0; - color: var(--ink-soft); - font-size: 0.78rem; - line-height: 1.35; - text-decoration: none; -} - -.docs-nav nav a:hover { - color: var(--ink); -} - -.docs-nav nav a[aria-current="page"] { - color: var(--blue-strong); - font-weight: 700; - text-decoration: underline; - text-decoration-color: var(--line-strong); - text-underline-offset: 0.2rem; -} - -.docs-nav__meta { - display: flex; - margin-top: 1.25rem; - padding-top: 0.7rem; - justify-content: space-between; - color: var(--ink-muted); - border-top: 1px solid var(--line); - font: 500 0.56rem/1.4 var(--mono); -} - -.docs-article { - min-width: 0; - padding-block: 2.75rem; -} - -.docs-title { - margin-bottom: 2rem; - padding-bottom: 1.5rem; - border-bottom: 1px solid var(--line); -} - -.docs-title > p { - color: var(--ink-muted); - font: 500 0.64rem/1.3 var(--mono); -} - -.docs-title h1 { - max-width: 18ch; - margin-top: 0.55rem; - font-size: clamp(2.1rem, 4vw, 3.2rem); -} - -.docs-title > span { - display: block; - max-width: 60ch; - margin-top: 0.9rem; - color: var(--ink-soft); - font-size: 0.92rem; -} - -.docs-article h2 { - margin-top: 2.8rem; - padding-top: 1rem; - border-top: 1px solid var(--line); - font-size: 1.42rem; -} - -.docs-article h3 { - margin-top: 1.9rem; - font-size: 1.05rem; -} - -.docs-article > p, -.docs-article > ul, -.docs-article > ol { - margin-top: 0.85rem; -} - -.docs-article > p, -.docs-article li { - color: var(--ink-soft); -} - -.docs-article ul, -.docs-article ol { - padding-left: 1.25rem; -} - -.docs-article li + li { - margin-top: 0.35rem; -} - -.docs-article :not(pre) > code { - padding: 0.05rem 0.22rem; - color: var(--ink); - background: var(--surface); - border: 1px solid var(--line); - border-radius: var(--radius); -} - -.docs-toc { - padding-top: 0.1rem; -} - -.docs-toc > strong { - color: var(--ink-muted); - font: 500 0.6rem/1.3 var(--mono); -} - -.docs-toc nav { - margin-top: 0.5rem; -} - -.docs-toc a { - padding-block: 0.23rem; - color: var(--ink-muted); - font-size: 0.72rem; - line-height: 1.35; - text-decoration: none; -} - -.docs-edit { - margin-top: 4rem; - padding-top: 0.8rem; - border-top: 1px solid var(--line); -} - -.docs-edit a { - color: var(--ink-muted); - font-size: 0.75rem; -} - -.legal { - width: min(100% - 2rem, var(--reading)); - margin-inline: auto; - padding-block: clamp(3rem, 6vw, 5rem); -} - -.legal header { - margin-bottom: 2.5rem; -} - -.legal header p, -.legal > p, -.legal li { - color: var(--ink-soft); -} - -.legal header p { - margin-top: 0.75rem; - font-size: 0.95rem; -} - -.legal h1 { - font-size: clamp(2.35rem, 4vw, 3.4rem); -} - -.legal h2 { - margin-top: 2.5rem; - padding-top: 0.9rem; - border-top: 1px solid var(--line); - font-size: 1.4rem; -} - -.legal p, -.legal ul, -.legal ol { - margin-top: 0.8rem; -} - -.legal ul, -.legal ol { - padding-left: 1.2rem; -} - -@media (max-width: 76rem) { - .docs-shell { - grid-template-columns: 13rem minmax(0, 1fr); - } - - .docs-toc { - display: none; - } -} +.docs-nav, .docs-toc { position: sticky; top: 2rem; align-self: start; max-height: calc(100vh - 4rem); overflow: auto; } +.docs-nav { padding-left: 1rem; border-left: 1px solid var(--ink); } +.docs-nav summary { padding-bottom: 0.65rem; color: var(--ink); font-weight: 700; list-style: none; } +.docs-nav summary::-webkit-details-marker { display: none; } +.docs-nav nav, .docs-toc nav, .docs-nav__group { display: grid; } +.docs-nav__group + .docs-nav__group { margin-top: 1rem; padding: 0; border: 0; } +.docs-nav__group > strong { margin-bottom: 0.2rem; color: var(--ink-muted); font: 400 0.65rem/1.4 var(--mono); } +.docs-nav nav a { padding: 0.2rem 0; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.4; } +.docs-nav nav a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: none; } +.docs-nav__meta { display: flex; margin-top: 1rem; padding-top: 0.6rem; justify-content: space-between; color: var(--ink-muted); border-top: 1px solid var(--line); font: 400 0.62rem/1.4 var(--mono); } +.docs-article { min-width: 0; } +.docs-title { margin-bottom: 2rem; } +.docs-title > p { color: var(--ink-muted); } +.docs-title h1 { margin-top: 0.4rem; } +.docs-title > span { display: block; margin-top: 0.6rem; color: var(--ink-soft); } +.docs-article h2 { margin-top: 2.75rem; padding: 0; border: 0; } +.docs-article h3 { margin-top: 1.75rem; } +.docs-article > p, .docs-article > ul, .docs-article > ol { margin-top: 0.8rem; } +.docs-article > p, .docs-article li { color: var(--ink-soft); } +.docs-article ul, .docs-article ol { padding-left: 1.2rem; } +.docs-article li + li { margin-top: 0.3rem; } +.docs-article :not(pre) > code { padding: 0; color: var(--ink); background: transparent; border: 0; } +.docs-toc { padding-left: 1rem; border-left: 1px solid var(--ink); } +.docs-toc > strong { color: var(--ink); } +.docs-toc nav { margin-top: 0.5rem; } +.docs-toc a { padding-block: 0.15rem; color: var(--ink-muted); font-size: 0.78rem; } +.docs-edit { margin-top: 4rem; padding-top: 0.7rem; border-top: 1px solid var(--line); } +.docs-edit a { color: var(--ink-muted); } + +.legal { width: auto; margin: 0; padding: 0; } +.legal header { margin-bottom: 2.5rem; } +.legal header p, .legal > p, .legal li { color: var(--ink-soft); } +.legal h2 { margin-top: 2.5rem; padding: 0; border: 0; } +.legal p, .legal ul { margin-top: 0.8rem; } +.legal ul { padding-left: 1.2rem; } + +/* Flatten legacy promotional surfaces while preserving their content. */ +.pack-card, .connect-example, .connect-request, .collection-mode, .beta-intake { + background: transparent !important; + border-radius: 0 !important; + box-shadow: none !important; +} +.pack-card__meta > span, .catalogue-status { background: transparent !important; border: 0 !important; border-radius: 0 !important; } +.pack-card__caution { background: transparent !important; } +.catalogue-status::before { display: none !important; } @media (max-width: 60rem) { - .page-hero__inner { - grid-template-columns: 1fr; - } - - .docs-shell { - display: block; - width: min(100% - 2rem, var(--reading)); - } - - .docs-nav { - position: static; - max-height: none; - padding: 0.75rem; - background: var(--surface); - border: 1px solid var(--line); - border-radius: var(--radius); - } - - .docs-nav details:not([open]) nav { - display: none; - } - - .docs-nav summary { - display: flex; - min-height: 2.75rem; - padding: 0.15rem 0.4rem; - align-items: center; - cursor: pointer; - } - - .docs-article { - padding-top: 2rem; - } - - .start-options { - grid-template-columns: 1fr; - } - - .start-options > div, - .start-options > div + div { - padding: 1rem 0; - border-left: 0; - } + .docs-shell { display: block; width: min(calc(100vw - var(--site-left) - 1rem), var(--reading)); } + .docs-nav { position: static; max-height: none; margin-bottom: 3rem; padding: 0 0 0 1rem; background: transparent; border: 0; border-left: 1px solid var(--ink); } + .docs-nav details:not([open]) nav { display: none; } + .docs-nav summary { cursor: pointer; } + .docs-article { padding: 0; } + .docs-toc { display: none; } } @media (max-width: 42rem) { - body { - font-size: 1rem; - } - - .page-shell, - .page-hero__inner, - .content-section { - width: min(100% - 1.25rem, var(--page)); - } - - .trust-table, - .profile-table, - .api-table { - display: block; - overflow-x: auto; - } - - .plain-sequence li, - .glossary-list > div { - grid-template-columns: 2rem minmax(0, 1fr); - } - - .plain-sequence span { - grid-column: 2; - } - - .glossary-list dd { - grid-column: 1 / -1; - } + .site-body > main { width: calc(100% - 2rem); } + .trust-table, .profile-table, .api-table { display: block; overflow-x: auto; } + .download-option { grid-template-columns: 1fr; } + .download-option__actions { justify-content: flex-start; } + .plain-sequence li, .glossary-list > div { grid-template-columns: 2rem minmax(0, 1fr); } + .plain-sequence span { grid-column: 2; } + .glossary-list dd { grid-column: 1 / -1; } } @media (prefers-reduced-motion: reduce) { - html { - scroll-behavior: auto; - } - - *, - *::before, - *::after { + html { scroll-behavior: auto; } + *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; diff --git a/src/styles/home.css b/src/styles/home.css index 793d24f..c7bd874 100644 --- a/src/styles/home.css +++ b/src/styles/home.css @@ -1,278 +1,107 @@ -:root { - color-scheme: light; - --paper: var(--color-canvas); - --paper-soft: var(--color-surface-subtle); - --ink: var(--color-text); - --ink-soft: var(--color-text-soft); - --muted: color-mix( - in oklch, - var(--color-text-muted) 82%, - var(--color-text-soft) - ); - --line: color-mix( - in oklch, - var(--color-border) 82%, - var(--color-border-strong) - ); - --line-strong: var(--color-border-strong); - --accent: var(--color-accent); - --accent-soft: color-mix(in oklch, var(--color-surface) 86%, var(--color-accent)); -} - -:root[data-theme="dark"] { - color-scheme: dark; -} - -@media (prefers-color-scheme: dark) { - :root:not([data-theme]) { - color-scheme: dark; - } -} - -.home-body::before { - display: none; -} - .home-body { - overflow-x: visible; + overflow-x: hidden; + color: var(--color-text); + background: var(--color-canvas); } -.home-body > main { - z-index: 2; - min-height: 100vh; - padding-top: 0; -} - -.home-body > .site-footer { - margin-top: 0; -} +.home-body::before { display: none; } +.home-body > main { position: relative; z-index: 1; min-height: 100vh; } +.home-body > .site-footer { margin-top: 0; } .home-skip-link { position: fixed; z-index: 100; - top: 10px; - left: 10px; - padding: 8px 10px; - color: var(--paper); - font-size: 12px; - font-weight: 650; - text-decoration: none; - background: var(--accent); - border-radius: var(--radius); - transform: translateY(-160%); -} - -.home-skip-link:focus { - transform: translateY(0); -} - -.home-body .scroll-progress { - z-index: 101; - top: calc(var(--header) - 1px); -} - -.home-body .button { - border-color: color-mix(in oklch, var(--accent) 45%, var(--line)); -} - -.home-body .button:hover { - background: color-mix(in oklch, var(--paper) 91%, var(--accent)); - border-color: var(--accent); + top: 0.5rem; + left: 0.5rem; + padding: 0.4rem; + color: var(--color-canvas); + background: var(--color-text); + transform: translateY(-200%); } +.home-skip-link:focus { transform: none; } -.home-body .chapter__inner { - opacity: 1; - transform: translateY(12px); +#diagram { + position: fixed; + z-index: 0; + inset: 0; + display: block; + width: 100%; + height: 100%; + pointer-events: none; } -.home-body .chapter__status { - margin: 0 0 1rem; - color: var(--muted); - font: 500 0.625rem/1.4 var(--mono); - letter-spacing: 0.01em; +.chapter { + display: flex; + min-height: 112vh; + padding: 9rem 1.5rem 12vh var(--site-left); + align-items: center; + scroll-margin-top: 7rem; } +.chapter:first-child { min-height: 126vh; } +.chapter:last-child { min-height: 120vh; } -.home-body .chapter.is-active .chapter__inner { - transform: translateY(0); +.chapter__inner { + width: min(38.75rem, 43vw); + opacity: 0.18; + transform: translateY(1.1rem); + transition: opacity 400ms ease, transform 500ms ease; } +.chapter.is-active .chapter__inner { opacity: 1; transform: none; } .home-body h1, .home-body h2 { - line-height: 0.98; - letter-spacing: -0.035em; -} - -.home-body .chapter__actions--intro { - margin-top: 1.5rem; -} - -.home-body .chapter__actions { - flex-wrap: wrap; -} - -.product-map, -.grant-summary { - width: min(33.75rem, 100%); + max-width: none; + margin: 0 0 1.5rem; + font-size: 1rem; + line-height: 1.35; + letter-spacing: 0; +} +.home-body p { margin: 0 0 1.2rem; } +.chapter__lead, .chapter__body { color: var(--color-text); } + +.file-tree, +.record-example { + width: min(31rem, 100%); + margin: 1.75rem 0; + padding: 1rem; + overflow-x: auto; + color: var(--color-text); + background: var(--color-canvas); + border: 1px solid var(--color-text); + border-radius: 0; + font: 400 0.76rem/1.55 var(--mono); +} +.file-tree span, .record-example span, .file-tree strong { color: inherit; font-weight: inherit; } + +.chapter__actions { + display: flex; margin-top: 1.75rem; - border-top: 1px solid var(--line-strong); -} - -.product-map > div, -.grant-summary > div { - display: grid; - padding-block: 0.7rem; - border-bottom: 1px solid var(--line); - grid-template-columns: minmax(7.75rem, 0.72fr) minmax(0, 1.5fr); - gap: 1rem; -} - -.product-map > div { - transition: - background-color 140ms ease-out, - border-color 140ms ease-out; -} - -.product-map dt, -.grant-summary dt { - color: var(--muted); - font: 500 0.625rem/1.45 var(--mono); -} - -.product-map dt a { - color: var(--ink); - font-weight: 600; - text-underline-offset: 0.24rem; -} - -.product-map dd, -.grant-summary dd { - margin: 0; - color: var(--ink-soft); - font-size: 0.75rem; - line-height: 1.5; -} - -.product-map [data-product="connect"] :is(a, dd) { - transition: color 140ms ease-out; -} - -.chapter__inner:has(.chapter__actions--intro .button:focus-visible) - .product-map - [data-product="connect"] { - background: color-mix(in oklch, var(--accent) 12%, transparent); - border-bottom-color: color-mix(in oklch, var(--accent) 48%, var(--line)); -} - -.chapter__inner:has(.chapter__actions--intro .button:focus-visible) - .product-map - [data-product="connect"] - :is(a, dd) { - color: var(--accent); -} - -@media (hover: hover) and (pointer: fine) { - .chapter__inner:has(.chapter__actions--intro .button:hover) - .product-map - [data-product="connect"] { - background: color-mix(in oklch, var(--accent) 12%, transparent); - border-bottom-color: color-mix(in oklch, var(--accent) 48%, var(--line)); - } - - .chapter__inner:has(.chapter__actions--intro .button:hover) - .product-map - [data-product="connect"] - :is(a, dd) { - color: var(--accent); + padding: 0; + flex-direction: column; + align-items: flex-start; + gap: 0.55rem; +} +.home-body .button, .home-body .text-link { + color: var(--color-text); + background: transparent; + border: 0; + font: inherit; + font-weight: 400; + text-decoration: underline; + text-underline-offset: 0.2em; +} + +@media (max-width: 51.25rem) { + .chapter, + .chapter:first-child, + .chapter:last-child { + min-height: 142vh; + padding: 54vh 1rem 14vh; + align-items: flex-start; } + .chapter__inner { width: 100%; } } -.grant-summary dd { - color: var(--ink); - font-weight: 600; -} - -.home-body .chapter__body a { - color: var(--ink-soft); - text-underline-offset: 0.22rem; -} - -@media (max-width: 820px) { - .home-body .chapter { - min-height: 128vh; - padding-bottom: 12vh; - } - - .home-body .chapter:first-child, - .home-body .chapter:last-child { - min-height: 136vh; - } - - .home-body .chapter__inner, - .home-body .chapter.is-active .chapter__inner { - position: relative; - z-index: 1; - isolation: isolate; - opacity: 1; - transform: none; - } - - .home-body .chapter__inner::before { - position: absolute; - z-index: -1; - top: -20vh; - bottom: -12vh; - left: 50%; - width: 100vw; - content: ""; - pointer-events: none; - background: linear-gradient( - 180deg, - transparent 0%, - color-mix(in oklch, var(--paper) 44%, transparent) 6vh, - color-mix(in oklch, var(--paper) 96%, transparent) 16vh, - var(--paper) 20vh - ); - transform: translateX(-50%); - } - - .home-body h1 { - font-size: clamp(2.75rem, 13.5vw, 4rem); - } - - .home-body h2 { - font-size: clamp(2.4rem, 11.5vw, 3.5rem); - } - - .home-body .chapter__lead { - font-size: 1rem; - line-height: 1.65; - } - - .home-body .chapter__body { - font-size: 0.875rem; - line-height: 1.72; - } - - .home-body .steps strong { - font-size: 0.8125rem; - line-height: 1.5; - } - - .product-map > div, - .grant-summary > div { - grid-template-columns: minmax(6.75rem, 0.62fr) minmax(0, 1.38fr); - } -} - -@media (max-width: 480px) { - .home-body .file-tree, - .home-body .record-example { - font-size: 0.6875rem; - } - - .product-map > div, - .grant-summary > div { - grid-template-columns: 1fr; - gap: 0.25rem; - } +@media (prefers-reduced-motion: reduce) { + .chapter__inner { transform: none; transition: none; } } diff --git a/src/styles/shell.css b/src/styles/shell.css index 9ee4e0b..cb53a37 100644 --- a/src/styles/shell.css +++ b/src/styles/shell.css @@ -1,383 +1,127 @@ :root { --sans: "Atkinson Hyperlegible", "Segoe UI", sans-serif; --mono: "Azeret Mono", "SFMono-Regular", "Cascadia Code", monospace; - --header: 4rem; - --site-width: 78rem; + --site-left: clamp(1.5rem, 8vw, 7.5rem); + --shell-width: 47.5rem; } -.site-header, -.spec-header { - position: fixed; - z-index: 100; - top: 0; - right: 0; - left: 0; - height: var(--header); - padding: 0; +.site-header { + position: relative; + z-index: 20; + width: min(calc(100% - 3rem), var(--shell-width)); + margin-left: var(--site-left); + padding-top: 1.35rem; color: var(--color-text); - background: var(--color-surface); - border-bottom: 1px solid var(--color-border); + background: var(--color-canvas); } -.spec-header { - display: flex; - padding-inline: clamp(1rem, 3vw, 2.25rem); - align-items: center; - justify-content: space-between; - gap: 1.5rem; +.home-body > .site-header { + position: fixed; + top: 0; + left: 0; + margin-left: var(--site-left); + background: color-mix(in srgb, var(--color-canvas) 92%, transparent); } .site-header__inner { - display: flex; width: 100%; - height: 100%; - padding-inline: clamp(1rem, 3vw, 2.25rem); - align-items: center; - justify-content: space-between; - gap: 1.5rem; } -.site-brand, -.spec-brand { - display: flex; - min-width: 0; - align-items: center; - gap: 0.75rem; -} - -.wordmark, -.landing-logo { - display: inline-flex; - flex: 0 0 auto; - align-items: center; - gap: 0.5rem; +.wordmark { + display: inline-block; + margin-bottom: 1rem; color: var(--color-text); - font: 600 0.8125rem/1 var(--mono); - letter-spacing: -0.01em; - text-decoration: none; -} - -.brand-mark, -.mdbase-mark { - display: block; - width: 1.25rem; - height: 1.25rem; - overflow: visible; -} - -.brand-mark--compact { - width: 1.25rem; - height: 1.25rem; -} - -.brand-mark__ink, -.mdbase-mark-ink { - fill: var(--color-text); -} - -.brand-mark__accent, -.mdbase-mark-accent { - fill: var(--color-accent); -} - -.desktop-nav, -.landing-nav { - display: flex; - height: 100%; - align-items: stretch; - gap: 0; -} - -.desktop-nav a, -.landing-nav a { - position: relative; - display: flex; - padding: 0 0.75rem; - align-items: center; - color: var(--color-text-muted); - font: 400 0.75rem/1 var(--sans); + font-weight: 700; text-decoration: none; } -.desktop-nav a::after, -.landing-nav a::after { - position: absolute; - right: 0.75rem; - bottom: -1px; - left: 0.75rem; - height: 2px; - content: ""; - background: transparent; -} - -.desktop-nav a:hover, -.desktop-nav a[aria-current="page"], -.landing-nav a:hover, -.landing-nav a[aria-current="page"], -.landing-nav a.nav-active { - color: var(--color-text); -} - -.desktop-nav a[aria-current="page"]::after, -.landing-nav a[aria-current="page"]::after, -.landing-nav a.nav-active::after { - background: var(--color-accent); -} - -.header-actions, -.spec-header-actions { +.site-nav { display: flex; - height: 100%; - margin-left: auto; + padding: 0.55rem 0; align-items: center; - gap: 0.35rem; -} - -.theme-menu { - position: relative; - flex: 0 0 auto; + flex-wrap: wrap; + gap: 0.25rem 1.25rem; + border-top: 1px solid var(--color-text); + border-bottom: 1px solid var(--color-text); } -.theme-menu > summary { - display: grid; - width: 2.75rem; - height: 2.75rem; +.site-nav a, +.theme-toggle { padding: 0; - place-items: center; - color: var(--color-text-faint); - background: transparent; - border: 0; - border-radius: var(--radius); - list-style: none; - cursor: pointer; -} - -.theme-menu > summary::-webkit-details-marker { - display: none; -} - -.theme-menu > summary:hover, -.theme-menu[open] > summary { color: var(--color-text); - background: var(--color-surface-subtle); -} - -.theme-menu > summary:focus-visible { - outline: 2px solid var(--color-accent); - outline-offset: 2px; -} - -.theme-menu__icon { - display: block; - width: 0.875rem; - height: 0.875rem; -} - -.theme-menu__icon circle { - fill: none; - stroke: currentColor; - stroke-width: 1.25; -} - -.theme-menu__icon path { - fill: currentColor; -} - -.theme-menu__options { - position: absolute; - z-index: 110; - top: calc(100% + 0.4rem); - right: 0; - display: grid; - width: 7.5rem; - padding: 0.3rem; - background: var(--color-surface); - border: 1px solid var(--color-border-strong); - border-radius: var(--radius); -} - -.theme-menu__options button { - display: grid; - width: 100%; - min-height: 2.75rem; - padding: 0 0.5rem; - align-items: center; - grid-template-columns: 1fr auto; - color: var(--color-text-soft); background: transparent; border: 0; - border-radius: var(--radius); - font: 400 0.66rem/1 var(--mono); - text-align: left; - cursor: pointer; -} - -.theme-menu__options button::after { - width: 0.3rem; - height: 0.3rem; - content: ""; - background: var(--color-accent); - border-radius: 50%; - opacity: 0; -} - -.theme-menu__options button:hover { - color: var(--color-text); - background: var(--color-surface-subtle); -} - -.theme-menu__options button[aria-pressed="true"] { - color: var(--color-text); -} - -.theme-menu__options button[aria-pressed="true"]::after { - opacity: 1; -} - -.theme-menu__options button:focus-visible { - outline: 2px solid var(--color-accent); - outline-offset: -2px; -} - -.mobile-nav { - position: relative; - display: none; -} - -.mobile-nav summary { - display: flex; - min-height: 2.75rem; - padding: 0.35rem 0.25rem; - align-items: center; - color: var(--color-text-soft); - font-size: 0.78rem; - list-style: none; - cursor: pointer; -} - -.mobile-nav summary::-webkit-details-marker { - display: none; -} - -.mobile-nav nav { - position: absolute; - top: 2.15rem; - right: 0; - width: min(18rem, calc(100vw - 2rem)); - padding: 0.5rem; - background: var(--color-surface); - border: 1px solid var(--color-border-strong); + font: inherit; + text-underline-offset: 0.2em; } -.mobile-nav nav a { - display: block; - padding: 0.7rem; - color: var(--color-text); - font-size: 0.82rem; +.site-nav a[aria-current="page"] { + font-weight: 700; text-decoration: none; } -.mobile-nav nav a[aria-current="page"] { - color: var(--color-accent-strong); +.theme-toggle { + margin-left: auto; + text-decoration: underline; + cursor: pointer; } .site-footer { position: relative; - z-index: 2; - display: block; - min-height: 0; - margin-top: 5rem; - padding: 0; - color: var(--color-text-muted); - background: var(--color-surface); - border-top: 1px solid var(--color-border); - font: inherit; + z-index: 3; + width: min(calc(100% - 3rem), var(--shell-width)); + margin: 5rem 0 0 var(--site-left); + padding: 0.7rem 0 3rem; + color: var(--color-text); + background: var(--color-canvas); + border-top: 1px solid var(--color-text); } .site-footer__inner { - display: grid; - width: min(100% - 2rem, var(--site-width)); - min-height: 8rem; - margin-inline: auto; - padding-block: 2rem; - align-items: start; - grid-template-columns: minmax(14rem, 0.72fr) minmax(0, 1.28fr); - gap: 2rem; + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 1.5rem; } .site-footer strong { - color: var(--color-text); - font: 600 0.75rem/1 var(--mono); + font-weight: 700; } .site-footer p { - margin: 0.3rem 0 0; - color: var(--color-text-muted); - font-size: 0.78rem; -} - -.site-footer .site-footer__nav { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 1.5rem; -} - -.site-footer__nav > div { - display: grid; - align-content: start; - gap: 0.5rem; -} - -.site-footer__nav > div > strong { - margin-bottom: 0.15rem; - color: var(--color-text-muted); - font-size: 0.625rem; -} - -.site-footer nav a { + margin: 0; color: var(--color-text-soft); - font-size: 0.75rem; - text-decoration: none; } -.site-footer nav a:hover { - color: var(--color-text); - text-decoration: underline; - text-underline-offset: 0.3rem; +.site-footer__nav { + display: flex; + justify-content: flex-end; + flex-wrap: wrap; + gap: 0.25rem 1.1rem; } -@media (max-width: 60rem) { - .desktop-nav, - .landing-nav { - display: none; - } - - .mobile-nav { - display: block; - } +.site-footer a { + color: var(--color-text); } -@media (max-width: 42rem) { - .site-header__inner { - padding-inline: 0.625rem; - } - - .site-footer__inner { - width: min(100% - 1.25rem, var(--site-width)); +@media (max-width: 50rem) { + :root { + --site-left: 1rem; } - .site-footer__inner { - grid-template-columns: 1fr; - gap: 1.5rem; + .site-header, + .home-body > .site-header, + .site-footer { + width: calc(100% - 2rem); } - .site-footer .site-footer__nav { - grid-template-columns: repeat(2, minmax(0, 1fr)); + .site-nav { + gap: 0.2rem 0.85rem; } } -@media (max-width: 30rem) { - .site-footer .site-footer__nav { - grid-template-columns: 1fr; +@media (max-width: 35rem) { + .site-footer__identity p { + display: none; } } From 851e907b54f6b2a2a41c6712575dcaef9d68435e Mon Sep 17 00:00:00 2001 From: callumalpass Date: Thu, 3 Sep 2026 17:11:25 +1000 Subject: [PATCH 2/2] Refine site and automate Connect downloads --- .github/workflows/ci.yml | 13 +- .github/workflows/deploy.yml | 3 + .github/workflows/update-connect-release.yml | 150 +++++ README.md | 19 + package.json | 4 +- public/mdbase-murmuration.js | 4 +- public/mdbase-shell.css | 547 +++++++++--------- public/mdbase-theme.css | 12 +- public/theme-bootstrap.js | 2 +- scripts/check-connect-release-order.mjs | 30 + scripts/check-connect-release.mjs | 97 +++- scripts/connect-release-record.mjs | 167 ++++++ scripts/connect-release-record.test.mjs | 132 +++++ scripts/import-spec.mjs | 18 + scripts/update-connect-release.mjs | 162 ++++++ scripts/verify-npm-release.mjs | 26 + src/components/DocsLayout.astro | 2 +- src/components/SiteFooter.astro | 23 +- src/components/SiteHeader.astro | 12 +- src/components/ThemeControlScript.astro | 7 +- src/data/connect-release.json | 90 ++- src/layouts/BaseLayout.astro | 8 +- src/layouts/HomeLayout.astro | 3 +- src/pages/apps/index.astro | 28 +- src/pages/beta/index.astro | 32 +- src/pages/connect/index.astro | 63 +- src/pages/contracts/index.astro | 34 +- src/pages/downloads/index.astro | 51 +- .../index.astro | 2 +- src/pages/index.astro | 68 ++- src/pages/runtime/index.astro | 42 +- src/pages/sdk/authorization/index.astro | 2 +- src/pages/sdk/index.astro | 14 +- src/pages/sdk/manifest/index.astro | 2 +- src/styles/apps.css | 4 +- src/styles/global.css | 44 +- src/styles/home.css | 24 +- src/styles/shell.css | 127 +++- 38 files changed, 1497 insertions(+), 571 deletions(-) create mode 100644 .github/workflows/update-connect-release.yml create mode 100644 scripts/check-connect-release-order.mjs create mode 100644 scripts/connect-release-record.mjs create mode 100644 scripts/connect-release-record.test.mjs create mode 100644 scripts/update-connect-release.mjs create mode 100644 scripts/verify-npm-release.mjs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb8ee8a..f397fd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,9 @@ jobs: node-version: 22 cache: pnpm + - name: Install cosign + uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2 + - name: Install website dependencies run: pnpm install --frozen-lockfile @@ -92,8 +95,16 @@ jobs: MDBASE_RS_DIR: .sources/mdbase-rs MDBASE_TS_DIR: .sources/mdbase + - name: Reject stale Connect release updates + if: github.event_name == 'pull_request' + env: + BASE_SHA: ${{ github.event.pull_request.base.sha }} + run: | + git fetch --no-tags --depth=1 origin "$BASE_SHA" + pnpm check:release-order "$BASE_SHA" + - name: Type and content checks - run: pnpm test:deploy:dev && pnpm check:release && pnpm check + run: pnpm test:deploy:dev && pnpm test:release-update && pnpm check:release && pnpm check env: GH_TOKEN: ${{ github.token }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index bb486bb..c9c0383 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -79,6 +79,9 @@ jobs: node-version: 22 cache: pnpm + - name: Install cosign + uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2 + - name: Install website dependencies run: pnpm install --frozen-lockfile diff --git a/.github/workflows/update-connect-release.yml b/.github/workflows/update-connect-release.yml new file mode 100644 index 0000000..16940ce --- /dev/null +++ b/.github/workflows/update-connect-release.yml @@ -0,0 +1,150 @@ +name: Update Connect release + +on: + repository_dispatch: + types: [connect-client-release-published] + workflow_dispatch: + inputs: + tag: + description: Published mdbase Connect release tag + required: true + type: string + +permissions: + contents: read + +concurrency: + group: connect-release-update + cancel-in-progress: false + +jobs: + update: + name: Verify release and open pull request + runs-on: ubuntu-24.04 + steps: + - name: Select release tag + id: release + env: + DISPATCH_TAG: ${{ github.event.client_payload.tag }} + MANUAL_TAG: ${{ inputs.tag }} + run: | + tag="${DISPATCH_TAG:-$MANUAL_TAG}" + if [[ ! "$tag" =~ ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$ ]]; then + echo "Invalid Connect release tag." >&2 + exit 1 + fi + echo "tag=$tag" >> "$GITHUB_OUTPUT" + echo "branch=automation/connect-release-$tag" >> "$GITHUB_OUTPUT" + + - name: Check out website + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: main + persist-credentials: false + + - name: Read specification source identity + id: specification + run: | + echo "repository=$(jq -r '.specification.repository' site-sources.json)" >> "$GITHUB_OUTPUT" + echo "ref=$(jq -r '.specification.ref' site-sources.json)" >> "$GITHUB_OUTPUT" + + - name: Check out specification + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: ${{ steps.specification.outputs.repository }} + ref: ${{ steps.specification.outputs.ref }} + path: .sources/mdbase-spec + persist-credentials: false + + - uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 + with: + version: 10 + + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version: 22 + cache: pnpm + + - name: Install cosign + uses: sigstore/cosign-installer@6f9f17788090df1f26f669e9d70d6ae9567deba6 # v4.1.2 + + - name: Install website dependencies + run: pnpm install --frozen-lockfile + + - name: Build specification artifact + working-directory: .sources/mdbase-spec/site + run: npm ci && npm run build + + - name: Verify public evidence and generate release record + env: + GH_TOKEN: ${{ github.token }} + MDBASE_RELEASE_NPM_ATTEMPTS: "15" + MDBASE_RELEASE_NPM_DELAY_MS: "60000" + run: node scripts/update-connect-release.mjs '${{ steps.release.outputs.tag }}' + + - name: Validate generated website + env: + GH_TOKEN: ${{ github.token }} + MDBASE_SPEC_DIR: .sources/mdbase-spec + run: pnpm test + + - name: Require a release-only change + id: changes + run: | + mapfile -t changed < <(git diff --name-only) + if [ "${#changed[@]}" -eq 0 ]; then + echo "present=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + printf '%s\n' "${changed[@]}" | sort > "$RUNNER_TEMP/changed" + printf '%s\n' site-sources.json src/data/connect-release.json | sort > "$RUNNER_TEMP/expected" + diff -u "$RUNNER_TEMP/expected" "$RUNNER_TEMP/changed" + echo "present=true" >> "$GITHUB_OUTPUT" + + - name: Create website automation token + if: steps.changes.outputs.present == 'true' + id: app-token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + with: + app-id: ${{ vars.RELEASE_AUTOMATION_APP_ID }} + private-key: ${{ secrets.RELEASE_AUTOMATION_APP_PRIVATE_KEY }} + owner: mdbase-dev + repositories: mdbase.dev + permission-contents: write + permission-pull-requests: write + + - name: Open release update pull request + if: steps.changes.outputs.present == 'true' + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + BRANCH: ${{ steps.release.outputs.branch }} + TAG: ${{ steps.release.outputs.tag }} + run: | + existing="$(gh pr list --repo "$GITHUB_REPOSITORY" --state all --head "$BRANCH" --json url,state --jq '.[0] // empty')" + if [ -n "$existing" ]; then + state="$(jq -r .state <<<"$existing")" + url="$(jq -r .url <<<"$existing")" + if [ "$state" = "OPEN" ] || [ "$state" = "MERGED" ]; then + echo "Release update already represented by $url" + exit 0 + fi + echo "The deterministic release PR was closed without merging: $url" >&2 + exit 1 + fi + if git ls-remote --exit-code --heads origin "$BRANCH" >/dev/null 2>&1; then + echo "Remote branch $BRANCH exists without a pull request; refusing to overwrite it." >&2 + exit 1 + fi + git switch -c "$BRANCH" + git config user.name "mdbase release automation[bot]" + git config user.email "mdbase-release-automation[bot]@users.noreply.github.com" + git add site-sources.json src/data/connect-release.json + git commit -m "Update Connect downloads to $TAG" + git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" + git push --set-upstream origin "$BRANCH" + gh pr create \ + --repo "$GITHUB_REPOSITORY" \ + --base main \ + --head "$BRANCH" \ + --title "Update Connect downloads to $TAG" \ + --body "Updates the Downloads release record from the published, Sigstore-verified mdbase Connect channel for [$TAG](https://github.com/mdbase-dev/mdbase-connect/releases/tag/$TAG).\n\nThe website release checks and full test suite passed before this PR was opened." diff --git a/README.md b/README.md index 1e3503e..439528a 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,9 @@ Override their paths with `MDBASE_SPEC_DIR`, `MDBASE_CONNECT_DIR`, ## Production build +Release checks require `gh` authentication and `cosign`; CI installs the pinned +Cosign version used by the Connect release workflow. + ```sh pnpm sync:sources pnpm check @@ -36,6 +39,22 @@ remain traceable to the release artifacts they document. The first-party contract catalog is built from the commit pinned in `site-sources.json`, then published as static files under `/contracts/`. +## Connect release updates + +A published Connect desktop release dispatches its immutable tag to +`.github/workflows/update-connect-release.yml`. The workflow verifies the +GitHub release, Sigstore-signed channel manifest, tag commit, matching npm SDK, +and release assets; regenerates `src/data/connect-release.json` and the Connect +pin in `site-sources.json`; runs the complete website test suite; and opens a +normal pull request. It never deploys or pushes `main` directly. The same +workflow can be run manually with a tag to recover from a delayed npm +publication or failed dispatch. + +The workflow uses a GitHub App configured as `RELEASE_AUTOMATION_APP_ID` and +`RELEASE_AUTOMATION_APP_PRIVATE_KEY`. Its installation on this repository needs +only `contents: write` and `pull requests: write`. The App token ensures the +resulting pull request triggers the ordinary protected `Site checks` workflow. + ## Development deployment ```sh diff --git a/package.json b/package.json index 108e4f8..f825227 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,10 @@ "import:spec": "node scripts/import-spec.mjs", "check:links": "node scripts/check-links.mjs", "check:release": "node scripts/check-connect-release.mjs", + "check:release-order": "node scripts/check-connect-release-order.mjs", "test:deploy:dev": "node --test scripts/deploy-pages-dev.test.mjs", - "test": "pnpm test:deploy:dev && pnpm check:release && pnpm check && pnpm build && pnpm import:spec && pnpm check:links" + "test:release-update": "node --test scripts/connect-release-record.test.mjs", + "test": "pnpm test:deploy:dev && pnpm test:release-update && pnpm check:release && pnpm check && pnpm build && pnpm import:spec && pnpm check:links" }, "dependencies": { "@astrojs/sitemap": "^3.7.3", diff --git a/public/mdbase-murmuration.js b/public/mdbase-murmuration.js index dd991f9..ba07068 100644 --- a/public/mdbase-murmuration.js +++ b/public/mdbase-murmuration.js @@ -929,7 +929,7 @@ context.textAlign = "left"; context.fillStyle = palette.ink; context.globalAlpha = 0.78; - context.font = "bold 11px serif"; + context.font = '17px "Atkinson Hyperlegible", sans-serif'; context.fillText(node.label, labelX, labelY); context.restore(); } @@ -938,7 +938,7 @@ context.save(); context.fillStyle = palette.muted; context.globalAlpha = 0.68; - context.font = "11px serif"; + context.font = '17px "Atkinson Hyperlegible", sans-serif'; context.textAlign = "center"; context.fillText(note.text, note.x, note.y); context.restore(); diff --git a/public/mdbase-shell.css b/public/mdbase-shell.css index 9ee4e0b..c5071ab 100644 --- a/public/mdbase-shell.css +++ b/public/mdbase-shell.css @@ -1,383 +1,396 @@ :root { --sans: "Atkinson Hyperlegible", "Segoe UI", sans-serif; --mono: "Azeret Mono", "SFMono-Regular", "Cascadia Code", monospace; - --header: 4rem; - --site-width: 78rem; + --site-left: clamp(24px, 8vw, 120px); + --shell-width: 1080px; } -.site-header, -.spec-header { - position: fixed; - z-index: 100; - top: 0; - right: 0; - left: 0; - height: var(--header); - padding: 0; - color: var(--color-text); - background: var(--color-surface); - border-bottom: 1px solid var(--color-border); +body { + margin: 0; + font-family: var(--sans); + font-size: 1rem; + line-height: 1.5; } .spec-header { - display: flex; - padding-inline: clamp(1rem, 3vw, 2.25rem); - align-items: center; - justify-content: space-between; - gap: 1.5rem; -} - -.site-header__inner { - display: flex; - width: 100%; - height: 100%; - padding-inline: clamp(1rem, 3vw, 2.25rem); - align-items: center; - justify-content: space-between; - gap: 1.5rem; + position: relative; + z-index: 100; + top: auto; + right: auto; + left: auto; + display: block; + width: min(calc(100% - 48px), var(--shell-width)); + height: auto; + margin-left: var(--site-left); + padding: 22px 0 0; + color: var(--color-text); + background: var(--color-canvas); + border: 0; } -.site-brand, .spec-brand { - display: flex; - min-width: 0; - align-items: center; - gap: 0.75rem; + min-height: 0; + margin-bottom: 18px; + gap: 8px; } -.wordmark, .landing-logo { - display: inline-flex; - flex: 0 0 auto; - align-items: center; - gap: 0.5rem; + gap: 0; color: var(--color-text); - font: 600 0.8125rem/1 var(--mono); - letter-spacing: -0.01em; - text-decoration: none; -} - -.brand-mark, -.mdbase-mark { - display: block; - width: 1.25rem; - height: 1.25rem; - overflow: visible; + font: 400 1rem/1.5 var(--sans); + letter-spacing: 0; } -.brand-mark--compact { - width: 1.25rem; - height: 1.25rem; +.landing-logo .mdbase-mark { + display: none; } -.brand-mark__ink, -.mdbase-mark-ink { - fill: var(--color-text); +.spec-version { + color: var(--color-text-muted); + font: 400 1rem/1.5 var(--sans); } -.brand-mark__accent, -.mdbase-mark-accent { - fill: var(--color-accent); +.spec-header-actions { + display: flex; + width: 100%; + height: auto; + min-height: 0; + margin: 0; + padding: 10px 0; + align-items: center; + gap: 22px; + border-top: 1px solid var(--color-text); + border-bottom: 1px solid var(--color-text); } -.desktop-nav, .landing-nav { display: flex; - height: 100%; - align-items: stretch; - gap: 0; + height: auto; + flex-wrap: wrap; + align-items: center; + gap: 6px 22px; } -.desktop-nav a, .landing-nav a { - position: relative; - display: flex; - padding: 0 0.75rem; - align-items: center; - color: var(--color-text-muted); - font: 400 0.75rem/1 var(--sans); - text-decoration: none; + display: inline; + min-height: 0; + padding: 0; + color: var(--color-text); + font: 400 1rem/1.5 var(--sans); + text-decoration: underline; + text-underline-offset: 0.2em; } -.desktop-nav a::after, .landing-nav a::after { - position: absolute; - right: 0.75rem; - bottom: -1px; - left: 0.75rem; - height: 2px; - content: ""; - background: transparent; -} - -.desktop-nav a:hover, -.desktop-nav a[aria-current="page"], -.landing-nav a:hover, -.landing-nav a[aria-current="page"], -.landing-nav a.nav-active { - color: var(--color-text); + display: none; } -.desktop-nav a[aria-current="page"]::after, -.landing-nav a[aria-current="page"]::after, -.landing-nav a.nav-active::after { - background: var(--color-accent); +.landing-nav a:hover { + color: var(--color-text-soft); } -.header-actions, -.spec-header-actions { - display: flex; - height: 100%; - margin-left: auto; - align-items: center; - gap: 0.35rem; +.landing-nav a.nav-active { + color: var(--color-text); + font-weight: 400; + text-decoration: none; } .theme-menu { - position: relative; - flex: 0 0 auto; + margin-left: auto; } .theme-menu > summary { - display: grid; - width: 2.75rem; - height: 2.75rem; - padding: 0; - place-items: center; - color: var(--color-text-faint); - background: transparent; - border: 0; - border-radius: var(--radius); - list-style: none; - cursor: pointer; -} - -.theme-menu > summary::-webkit-details-marker { - display: none; + width: auto; + height: auto; + min-height: 0; + color: var(--color-text); + border-radius: 0; } .theme-menu > summary:hover, .theme-menu[open] > summary { - color: var(--color-text); - background: var(--color-surface-subtle); -} - -.theme-menu > summary:focus-visible { - outline: 2px solid var(--color-accent); - outline-offset: 2px; -} - -.theme-menu__icon { - display: block; - width: 0.875rem; - height: 0.875rem; -} - -.theme-menu__icon circle { - fill: none; - stroke: currentColor; - stroke-width: 1.25; -} - -.theme-menu__icon path { - fill: currentColor; + color: var(--color-text-soft); + background: transparent; } .theme-menu__options { - position: absolute; - z-index: 110; - top: calc(100% + 0.4rem); - right: 0; - display: grid; - width: 7.5rem; - padding: 0.3rem; - background: var(--color-surface); - border: 1px solid var(--color-border-strong); - border-radius: var(--radius); + border-radius: 0; + background: var(--color-canvas); } .theme-menu__options button { + min-height: 2rem; + border-radius: 0; + font: 400 1rem/1.5 var(--sans); +} + +.spec-layout { display: grid; - width: 100%; - min-height: 2.75rem; - padding: 0 0.5rem; - align-items: center; - grid-template-columns: 1fr auto; - color: var(--color-text-soft); + width: min(calc(100vw - var(--site-left) - 24px), var(--shell-width)); + min-height: 0; + margin: 64px 0 0 var(--site-left); + padding: 0; + grid-template-columns: 180px minmax(0, 660px) minmax(0, 1fr); + gap: 32px; +} + +.spec-sidebar { + position: sticky; + z-index: 20; + inset: auto; + top: 32px; + width: auto; + max-height: calc(100vh - 64px); + align-self: start; + overflow-y: auto; + padding: 0 0 0 16px; background: transparent; border: 0; - border-radius: var(--radius); - font: 400 0.66rem/1 var(--mono); - text-align: left; - cursor: pointer; -} - -.theme-menu__options button::after { - width: 0.3rem; - height: 0.3rem; - content: ""; - background: var(--color-accent); - border-radius: 50%; - opacity: 0; + border-left: 1px solid var(--color-text); } -.theme-menu__options button:hover { - color: var(--color-text); - background: var(--color-surface-subtle); +.sidebar-group { + margin: 0; } -.theme-menu__options button[aria-pressed="true"] { +.sidebar-group-label { + margin: 0 0 10px; + padding: 0; color: var(--color-text); + font: 400 1rem/1.5 var(--sans); } -.theme-menu__options button[aria-pressed="true"]::after { - opacity: 1; -} - -.theme-menu__options button:focus-visible { - outline: 2px solid var(--color-accent); - outline-offset: -2px; +.sidebar-link { + display: grid; + min-height: 0; + padding: 3px 0; + grid-template-columns: minmax(0, 1fr); + color: var(--color-text-soft); + border-radius: 0; + font: 400 1rem/1.4 var(--sans); + text-decoration: none; } -.mobile-nav { - position: relative; +.sidebar-link .num { display: none; } -.mobile-nav summary { - display: flex; - min-height: 2.75rem; - padding: 0.35rem 0.25rem; - align-items: center; - color: var(--color-text-soft); - font-size: 0.78rem; - list-style: none; - cursor: pointer; +.sidebar-link:hover, +.sidebar-link.active { + color: var(--color-text); + background: transparent; + font-weight: 400; + text-decoration: none; } -.mobile-nav summary::-webkit-details-marker { - display: none; +.spec-content { + width: auto; + min-width: 0; + padding: 0 0 96px; + grid-column: 2; + justify-self: stretch; } -.mobile-nav nav { - position: absolute; - top: 2.15rem; - right: 0; - width: min(18rem, calc(100vw - 2rem)); - padding: 0.5rem; - background: var(--color-surface); - border: 1px solid var(--color-border-strong); +.spec-section { + margin-bottom: 64px; } -.mobile-nav nav a { - display: block; - padding: 0.7rem; +.spec-section > h1:first-child, +.spec-section h1, +.spec-section h2, +.spec-section h3, +.spec-section h4, +.spec-section h5, +.spec-section h6, +.spec-content strong { color: var(--color-text); - font-size: 0.82rem; - text-decoration: none; + font-family: var(--sans); + font-size: 1rem; + font-weight: 400; + line-height: 1.35; + letter-spacing: 0; + text-wrap: pretty; } -.mobile-nav nav a[aria-current="page"] { - color: var(--color-accent-strong); +.spec-section > h1:first-child { + margin: 0 0 24px; + padding: 0; + border: 0; } -.site-footer { - position: relative; - z-index: 2; - display: block; - min-height: 0; - margin-top: 5rem; - padding: 0; - color: var(--color-text-muted); - background: var(--color-surface); +.spec-section h2 { + margin: 40px 0 16px; + padding-top: 16px; border-top: 1px solid var(--color-border); - font: inherit; } -.site-footer__inner { - display: grid; - width: min(100% - 2rem, var(--site-width)); - min-height: 8rem; - margin-inline: auto; - padding-block: 2rem; - align-items: start; - grid-template-columns: minmax(14rem, 0.72fr) minmax(0, 1.28fr); - gap: 2rem; +.spec-section h3, +.spec-section h4, +.spec-section h5, +.spec-section h6 { + margin: 28px 0 12px; } -.site-footer strong { +.spec-content p, +.spec-content li { + max-width: 660px; +} + +.spec-content a { color: var(--color-text); - font: 600 0.75rem/1 var(--mono); + text-decoration-color: currentColor; } -.site-footer p { - margin: 0.3rem 0 0; - color: var(--color-text-muted); - font-size: 0.78rem; +.spec-content a:hover { + color: var(--color-text-soft); } -.site-footer .site-footer__nav { - display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); - gap: 1.5rem; +.spec-content code { + color: var(--color-text); + border-radius: 0; } -.site-footer__nav > div { - display: grid; - align-content: start; - gap: 0.5rem; +.spec-content pre, +.spec-content blockquote, +.spec-content table { + border-radius: 0; + box-shadow: none; } -.site-footer__nav > div > strong { - margin-bottom: 0.15rem; - color: var(--color-text-muted); - font-size: 0.625rem; +.spec-content pre, +.spec-content blockquote { + background: var(--color-canvas); + border: 1px solid var(--color-text); } -.site-footer nav a { - color: var(--color-text-soft); - font-size: 0.75rem; - text-decoration: none; +.anchor { + color: var(--color-text-muted); + font-weight: 400; } -.site-footer nav a:hover { +.sidebar-toggle { + min-height: 0; + padding: 0; color: var(--color-text); + background: transparent; + border: 0; + border-radius: 0; + font: 400 1rem/1.5 var(--sans); text-decoration: underline; - text-underline-offset: 0.3rem; -} + text-underline-offset: 0.2em; +} + +@media (max-width: 1024px) { + .spec-header { + display: flex; + width: calc(100% - 32px); + margin-left: 16px; + padding: 16px 0 10px; + align-items: center; + gap: 12px; + border-bottom: 1px solid var(--color-text); + } + + .spec-brand { + display: flex; + flex: 1; + margin: 0; + } + + .sidebar-toggle { + display: inline-flex; + order: 3; + margin-left: auto; + } -@media (max-width: 60rem) { - .desktop-nav, - .landing-nav { + .spec-header .landing-nav { display: none; } - .mobile-nav { + .spec-header-actions { + width: auto; + margin: 0; + padding: 0; + justify-content: flex-end; + border: 0; + } + + .theme-menu { + margin: 0; + } + + .spec-layout { + display: block; + width: calc(100% - 32px); + margin: 48px 0 0 16px; + } + + .spec-sidebar { + position: fixed; + z-index: 120; + inset: 0 auto 0 0; + width: min(320px, calc(100vw - 48px)); + max-height: none; + padding: 24px 18px; + background: var(--color-canvas); + border: 0; + border-right: 1px solid var(--color-text); + transform: translateX(-105%); + } + + .spec-sidebar.open { + transform: translateX(0); + } + + .sidebar-scrim { + inset: 0; + z-index: 110; + } + + .spec-mobile-links { display: block; } + + .spec-content { + width: min(660px, 100%); + padding-bottom: 72px; + } } -@media (max-width: 42rem) { - .site-header__inner { - padding-inline: 0.625rem; +@media (max-width: 560px) { + .spec-version { + display: none; + } + + .spec-header-actions { + gap: 12px; } - .site-footer__inner { - width: min(100% - 1.25rem, var(--site-width)); + .spec-content { + width: 100%; } - .site-footer__inner { - grid-template-columns: 1fr; - gap: 1.5rem; + .spec-section { + margin-bottom: 48px; } - .site-footer .site-footer__nav { - grid-template-columns: repeat(2, minmax(0, 1fr)); + .anchor { + display: none; } } -@media (max-width: 30rem) { - .site-footer .site-footer__nav { - grid-template-columns: 1fr; +@media print { + .spec-header, + .spec-sidebar, + .sidebar-scrim { + display: none !important; + } + + .spec-layout, + .spec-content { + display: block; + width: auto; + margin: 0; + padding: 0; } } diff --git a/public/mdbase-theme.css b/public/mdbase-theme.css index a12de00..cd6b4e7 100644 --- a/public/mdbase-theme.css +++ b/public/mdbase-theme.css @@ -4,10 +4,10 @@ background: var(--color-canvas); font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif; font-synthesis: none; - --color-canvas: #faf9f6; - --color-surface: #faf9f6; - --color-surface-subtle: #f5f4f0; - --color-selected: #f1f0ec; + --color-canvas: #ffffff; + --color-surface: #ffffff; + --color-surface-subtle: #ffffff; + --color-selected: #ffffff; --color-text: #171717; --color-text-soft: rgb(23 23 23 / 74%); --color-text-muted: rgb(23 23 23 / 54%); @@ -39,6 +39,10 @@ --ease: cubic-bezier(0.16, 1, 0.3, 1); } +html { + font-size: 17px; +} + :root[data-theme="dark"] { color-scheme: dark; --color-canvas: #121212; diff --git a/public/theme-bootstrap.js b/public/theme-bootstrap.js index 69558c7..0b3b958 100644 --- a/public/theme-bootstrap.js +++ b/public/theme-bootstrap.js @@ -9,7 +9,7 @@ try { || (theme !== "light" && matchMedia("(prefers-color-scheme: dark)").matches); document .querySelector('meta[name="theme-color"]') - ?.setAttribute("content", dark ? "#121212" : "#faf9f6"); + ?.setAttribute("content", dark ? "#121212" : "#ffffff"); } catch { // The system preference remains available when local storage is unavailable. } diff --git a/scripts/check-connect-release-order.mjs b/scripts/check-connect-release-order.mjs new file mode 100644 index 0000000..9135df5 --- /dev/null +++ b/scripts/check-connect-release-order.mjs @@ -0,0 +1,30 @@ +import assert from "node:assert/strict"; +import { execFileSync } from "node:child_process"; +import { readFile } from "node:fs/promises"; +import { compareSemanticVersions } from "./connect-release-record.mjs"; + +const baseRevision = process.argv[2]; +assert.match(baseRevision, /^[0-9a-f]{40}$/, "a full base revision is required"); +const current = JSON.parse(await readFile(new URL("../src/data/connect-release.json", import.meta.url))); +const base = JSON.parse(execFileSync("git", [ + "show", + `${baseRevision}:src/data/connect-release.json` +], { encoding: "utf8" })); +const comparison = compareSemanticVersions(current.version, base.version); +assert.ok(comparison >= 0, `Connect release ${current.version} would downgrade base release ${base.version}`); +if (comparison === 0) { + assert.deepEqual(releaseIdentity(current), releaseIdentity(base), "an existing Connect release identity cannot be rewritten"); +} +console.log(`Connect release order verified: ${base.version} -> ${current.version}.`); + +function releaseIdentity(record) { + return { + version: record.version, + sdkVersion: record.sdkVersion, + tag: record.tag, + sourceRevision: record.sourceRevision, + releaseUrl: record.releaseUrl, + channelManifestUrl: record.channelManifestUrl, + artifacts: [...record.desktop, ...record.cli].map(({ file, size }) => ({ file, size })) + }; +} diff --git a/scripts/check-connect-release.mjs b/scripts/check-connect-release.mjs index 511a872..2fee8d7 100644 --- a/scripts/check-connect-release.mjs +++ b/scripts/check-connect-release.mjs @@ -1,6 +1,10 @@ import assert from "node:assert/strict"; import { execFileSync } from "node:child_process"; -import { readFile } from "node:fs/promises"; +import { mkdtemp, readFile, rm, writeFile } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { buildConnectReleaseRecord, validateNpmProvenance } from "./connect-release-record.mjs"; +import { verifyNpmPackageSignatures } from "./verify-npm-release.mjs"; const release = JSON.parse(await readFile(new URL("../src/data/connect-release.json", import.meta.url))); const sources = JSON.parse(await readFile(new URL("../site-sources.json", import.meta.url))); @@ -37,16 +41,22 @@ const github = JSON.parse(execFileSync("gh", [ ], { encoding: "utf8" })); assert.ok(github, "selected GitHub release must exist"); assert.equal(github.draft, false, "selected GitHub release must be published"); -const channelAsset = github.assets.find((asset) => asset.name === "mdbase-connect-channel-v1.json"); -assert.ok(channelAsset, "selected signed channel manifest must exist"); -const channel = JSON.parse(execFileSync("gh", [ +const tagRef = JSON.parse(execFileSync("gh", [ "api", - "-H", - "Accept: application/octet-stream", - `repos/mdbase-dev/mdbase-connect/releases/assets/${channelAsset.id}` + `repos/mdbase-dev/mdbase-connect/git/ref/tags/${release.tag}` ], { encoding: "utf8" })); +const tagTarget = tagRef.object.type === "tag" + ? JSON.parse(execFileSync("gh", [ + "api", + `repos/mdbase-dev/mdbase-connect/git/tags/${tagRef.object.sha}` + ], { encoding: "utf8" })).object + : tagRef.object; +assert.equal(tagTarget.type, "commit", "release tag must resolve to a commit"); +assert.equal(tagTarget.sha, release.sourceRevision, "released documentation source differs from the tag"); +const channel = await verifiedChannel(github, release.tag, release.sourceRevision); const sdkResponse = await fetch(`https://registry.npmjs.org/@mdbase-dev%2fconnect/${release.sdkVersion}`, { - headers: { accept: "application/json" } + headers: { accept: "application/json" }, + signal: AbortSignal.timeout(30000) }); assert.equal(sdkResponse.status, 200, "selected SDK package must exist"); assert.equal(channel.version, release.version, "channel manifest version differs from website"); @@ -60,16 +70,63 @@ for (const artifact of artifacts) { const sdk = await sdkResponse.json(); assert.equal(sdk.version, release.sdkVersion, "registry returned a different SDK version"); -const tagRef = JSON.parse(execFileSync("gh", [ - "api", - `repos/mdbase-dev/mdbase-connect/git/ref/tags/${release.tag}` -], { encoding: "utf8" })); -const tagTarget = tagRef.object.type === "tag" - ? JSON.parse(execFileSync("gh", [ - "api", - `repos/mdbase-dev/mdbase-connect/git/tags/${tagRef.object.sha}` - ], { encoding: "utf8" })).object - : tagRef.object; -assert.equal(tagTarget.type, "commit", "release tag must resolve to a commit"); -assert.equal(tagTarget.sha, release.sourceRevision, "released documentation source differs from the tag"); +const npmWork = await mkdtemp(join(tmpdir(), "mdbase-connect-npm-")); +try { + verifyNpmPackageSignatures(release.sdkVersion, npmWork); +} finally { + await rm(npmWork, { recursive: true, force: true }); +} +const npmAttestationsResponse = await fetch(`https://registry.npmjs.org/-/npm/v1/attestations/@mdbase-dev%2fconnect@${release.sdkVersion}`, { + headers: { accept: "application/json" }, + signal: AbortSignal.timeout(30000) +}); +assert.equal(npmAttestationsResponse.status, 200, "npm provenance request failed"); +validateNpmProvenance({ + version: release.sdkVersion, + releaseTag: release.tag, + sourceRevision: release.sourceRevision, + metadata: sdk, + attestations: await npmAttestationsResponse.json() +}); +const canonical = buildConnectReleaseRecord({ + tag: release.tag, + sourceRevision: release.sourceRevision, + release: github, + channel, + npmVersion: sdk.version +}); +assert.deepEqual(release, canonical, "website release record differs from canonical public evidence"); console.log(`Connect release record verified: ${release.version}, ${artifacts.length} artifacts, SDK ${release.sdkVersion}.`); + +async function verifiedChannel(githubRelease, tag, sourceRevision) { + const names = ["mdbase-connect-channel-v1.json", "mdbase-connect-channel-v1.json.sigstore.json"]; + const selected = names.map((name) => { + const matches = githubRelease.assets.filter((asset) => asset.name === name); + assert.equal(matches.length, 1, `selected release must contain exactly one ${name}`); + return matches[0]; + }); + const work = await mkdtemp(join(tmpdir(), "mdbase-connect-channel-")); + const manifestPath = join(work, names[0]); + const bundlePath = join(work, names[1]); + try { + for (const [asset, path] of [[selected[0], manifestPath], [selected[1], bundlePath]]) { + await writeFile(path, execFileSync("gh", [ + "api", + "-H", + "Accept: application/octet-stream", + `repos/mdbase-dev/mdbase-connect/releases/assets/${asset.id}` + ], { encoding: "buffer", maxBuffer: 20 * 1024 * 1024 })); + } + execFileSync("cosign", [ + "verify-blob", + "--bundle", bundlePath, + "--certificate-identity", `https://github.com/mdbase-dev/mdbase-connect/.github/workflows/desktop-release.yml@refs/tags/${tag}`, + "--certificate-oidc-issuer", "https://token.actions.githubusercontent.com", + "--certificate-github-workflow-sha", sourceRevision, + manifestPath + ], { stdio: ["ignore", "ignore", "inherit"] }); + return JSON.parse(await readFile(manifestPath, "utf8")); + } finally { + await rm(work, { recursive: true, force: true }); + } +} diff --git a/scripts/connect-release-record.mjs b/scripts/connect-release-record.mjs new file mode 100644 index 0000000..298d11e --- /dev/null +++ b/scripts/connect-release-record.mjs @@ -0,0 +1,167 @@ +import assert from "node:assert/strict"; + +const CONNECT_REPOSITORY = "mdbase-dev/mdbase-connect"; +const CHANNEL_NAME = "mdbase-connect-channel-v1.json"; + +export function buildConnectReleaseRecord({ tag, sourceRevision, release, channel, npmVersion }) { + const version = versionFromTag(tag); + assert.equal(release.tag_name, tag, "GitHub release tag differs from requested tag"); + assert.equal(release.draft, false, "GitHub release is still a draft"); + assert.equal(release.prerelease, version.includes("-"), "GitHub release type differs from semantic version"); + assert.equal(channel.schema_version, 1, "unsupported channel manifest schema"); + assert.equal(channel.version, version, "channel manifest version differs from tag"); + assert.equal(channel.tag, tag, "channel manifest tag differs from requested tag"); + assert.equal(channel.channel, version.includes("-") ? "beta" : "stable", "channel differs from semantic version"); + assert.equal(channel.release_url, `https://github.com/${CONNECT_REPOSITORY}/releases/tag/${tag}`, "channel release URL differs from tag"); + assert.equal(npmVersion, version, "published SDK version differs from client release"); + assert.match(sourceRevision, /^[0-9a-f]{40}$/, "release source must be a full commit SHA"); + assert.ok(Number.isFinite(Date.parse(release.published_at)), "GitHub release has no publication time"); + + const assets = release.assets ?? []; + const desktop = [ + websiteArtifact(assets, version, "macOS", "Apple Silicon", /^mdbase-connect-.+-macos-arm64(?:-UNSIGNED)?\.dmg$/, macTrust(channel.channel), "Download for Apple Silicon"), + websiteArtifact(assets, version, "macOS", "Intel", /^mdbase-connect-.+-macos-x64(?:-UNSIGNED)?\.dmg$/, macTrust(channel.channel), "Download for Intel"), + websiteArtifact(assets, version, "Windows", "64-bit", /^mdbase-connect-.+-windows-x64(?:-UNSIGNED)?-Setup\.exe$/, "Unsigned beta preview", "Download for Windows"), + websiteArtifact(assets, version, "Linux", "64-bit Debian or Ubuntu", /^mdbase-connect-.+-linux-x64\.deb$/, "DEB package", "Download DEB"), + websiteArtifact(assets, version, "Linux", "64-bit Fedora, RHEL, or compatible", /^mdbase-connect-.+-linux-x64\.rpm$/, "RPM package", "Download RPM") + ]; + const cli = [ + websiteArtifact(assets, version, "macOS", "Apple Silicon", /^mdbase-cli-.+-macos-arm64\.tar\.gz$/, "Beta preview", "Download CLI for Apple Silicon"), + websiteArtifact(assets, version, "macOS", "Intel", /^mdbase-cli-.+-macos-x64\.tar\.gz$/, "Beta preview", "Download CLI for Intel"), + websiteArtifact(assets, version, "Windows", "64-bit", /^mdbase-cli-.+-windows-x64(?:-UNSIGNED)?\.tar\.gz$/, "Unsigned beta preview", "Download CLI for Windows"), + websiteArtifact(assets, version, "Linux", "64-bit", /^mdbase-cli-.+-linux-x64\.tar\.gz$/, "tar.gz", "Download CLI for Linux") + ]; + + const publishedAssets = new Map(assets.map((asset) => [asset.name, asset])); + assert.equal(publishedAssets.size, assets.length, "GitHub release contains duplicate asset names"); + const signedArtifacts = Object.values(channel.targets ?? {}).flatMap((target) => + Array.isArray(target?.artifacts) ? target.artifacts : [] + ); + const channelArtifacts = new Set(signedArtifacts.map((artifact) => artifact?.name)); + assert.ok(channelArtifacts.size > 0, "channel manifest has no client targets"); + assert.equal(channelArtifacts.size, signedArtifacts.length, "channel manifest contains duplicate artifacts"); + for (const artifact of signedArtifacts) { + const published = publishedAssets.get(artifact.name); + assert.ok(published, `${artifact.name} from the signed channel is absent from the GitHub release`); + assert.equal(artifact.size, published.size, `${artifact.name} size differs from the signed channel`); + assert.equal(`sha256:${artifact.sha256}`, published.digest, `${artifact.name} digest differs from the signed channel`); + assert.equal( + artifact.url, + `https://github.com/${CONNECT_REPOSITORY}/releases/download/${tag}/${encodeURIComponent(artifact.name)}`, + `${artifact.name} has a non-canonical channel URL` + ); + } + for (const artifact of desktop.filter(({ platform }) => platform === "Linux" || platform === "Windows")) { + assert.ok(channelArtifacts.has(artifact.file), `${artifact.file} is absent from signed channel targets`); + } + + return { + schemaVersion: 1, + channel: channel.channel, + version, + sdkVersion: version, + tag, + sourceRevision, + publishedAt: release.published_at, + releaseUrl: channel.release_url, + channelManifestUrl: `https://github.com/${CONNECT_REPOSITORY}/releases/download/${tag}/${CHANNEL_NAME}`, + desktop, + cli + }; +} + +export function compareSemanticVersions(left, right) { + const a = parseSemanticVersion(left); + const b = parseSemanticVersion(right); + for (const key of ["major", "minor", "patch"]) { + if (a[key] !== b[key]) return a[key] < b[key] ? -1 : 1; + } + if (a.pre.length === 0 || b.pre.length === 0) { + return a.pre.length === b.pre.length ? 0 : a.pre.length === 0 ? 1 : -1; + } + const length = Math.max(a.pre.length, b.pre.length); + for (let index = 0; index < length; index += 1) { + const x = a.pre[index]; + const y = b.pre[index]; + if (x === undefined || y === undefined) return x === y ? 0 : x === undefined ? -1 : 1; + if (x === y) continue; + const xNumber = /^\d+$/.test(x); + const yNumber = /^\d+$/.test(y); + if (xNumber && yNumber) return Number(x) < Number(y) ? -1 : 1; + if (xNumber !== yNumber) return xNumber ? -1 : 1; + return x < y ? -1 : 1; + } + return 0; +} + +export function validateNpmProvenance({ version, releaseTag, sourceRevision, metadata, attestations }) { + assert.equal(metadata.version, version, "npm registry returned a different SDK version"); + assert.equal(metadata.repository?.url, "git+https://github.com/mdbase-dev/mdbase-connect.git", "npm package has an unexpected source repository"); + assert.ok(metadata.dist?.attestations?.provenance, "npm package has no provenance attestation"); + const statements = (attestations.attestations ?? []) + .filter((entry) => entry.predicateType === "https://slsa.dev/provenance/v1") + .map((entry) => JSON.parse(Buffer.from(entry.bundle.dsseEnvelope.payload, "base64url").toString("utf8"))); + assert.equal(statements.length, 1, "npm package must have exactly one SLSA provenance statement"); + const definition = statements[0].predicate?.buildDefinition; + assert.deepEqual(definition?.externalParameters?.workflow, { + ref: `refs/tags/${releaseTag}`, + repository: "https://github.com/mdbase-dev/mdbase-connect", + path: ".github/workflows/publish-npm.yml" + }, "npm provenance has an unexpected publishing workflow"); + assert.ok( + definition?.resolvedDependencies?.some((dependency) => + dependency.uri === `git+https://github.com/mdbase-dev/mdbase-connect@refs/tags/${releaseTag}` && + dependency.digest?.gitCommit === sourceRevision + ), + "npm provenance is not bound to the released source commit" + ); +} + +export function releaseUpdateDisposition(current, next) { + const comparison = compareSemanticVersions(next.version, current.version); + if (comparison < 0) return "stale"; + if (comparison > 0) return "update"; + return JSON.stringify(current) === JSON.stringify(next) ? "current" : "conflict"; +} + +export function versionFromTag(tag) { + const match = typeof tag === "string" && /^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/.exec(tag); + assert.ok(match, "invalid release tag"); + assert.ok( + !match[4]?.split(".").some((part) => /^\d+$/.test(part) && !/^(0|[1-9]\d*)$/.test(part)), + "invalid release tag" + ); + return tag.slice(1); +} + +function parseSemanticVersion(version) { + versionFromTag(`v${version}`); + const match = /^(\d+)\.(\d+)\.(\d+)(?:-(.+))?$/.exec(version); + return { + major: Number(match[1]), + minor: Number(match[2]), + patch: Number(match[3]), + pre: match[4] ? match[4].split(".") : [] + }; +} + +function websiteArtifact(assets, version, platform, detail, pattern, trust, label) { + const matches = assets.filter((asset) => pattern.test(asset.name) && asset.name.includes(version)); + assert.equal(matches.length, 1, `expected exactly one ${platform} ${detail} release artifact`); + const [{ name: file, size, digest }] = matches; + assert.ok(Number.isSafeInteger(size) && size > 0, `${file} has an invalid size`); + assert.match(digest, /^sha256:[0-9a-f]{64}$/, `${file} has no bounded GitHub digest`); + return { + platform, + detail, + trust: typeof trust === "function" ? trust(file) : trust, + file, + size, + sha256: digest.slice("sha256:".length), + label + }; +} + +function macTrust(channel) { + return channel === "stable" ? "Signed and notarized" : "Beta preview · not notarized"; +} diff --git a/scripts/connect-release-record.test.mjs b/scripts/connect-release-record.test.mjs new file mode 100644 index 0000000..c88cf92 --- /dev/null +++ b/scripts/connect-release-record.test.mjs @@ -0,0 +1,132 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { buildConnectReleaseRecord, compareSemanticVersions, releaseUpdateDisposition, validateNpmProvenance, versionFromTag } from "./connect-release-record.mjs"; + +const tag = "v0.1.0-beta.84"; +const version = tag.slice(1); +const names = [ + `mdbase-connect-${version}-macos-arm64.dmg`, + `mdbase-connect-${version}-macos-x64.dmg`, + `mdbase-connect-${version}-windows-x64-UNSIGNED-Setup.exe`, + `mdbase-connect-${version}-linux-x64.deb`, + `mdbase-connect-${version}-linux-x64.rpm`, + `mdbase-cli-${version}-macos-arm64.tar.gz`, + `mdbase-cli-${version}-macos-x64.tar.gz`, + `mdbase-cli-${version}-windows-x64-UNSIGNED.tar.gz`, + `mdbase-cli-${version}-linux-x64.tar.gz` +]; +const release = { + tag_name: tag, + draft: false, + prerelease: true, + published_at: "2026-08-23T00:00:00Z", + assets: names.map((name, index) => ({ name, size: 1000 + index, digest: `sha256:${String(index + 1).padStart(64, "0")}` })) +}; +const signedArtifact = (name) => ({ + name, + size: release.assets.find((asset) => asset.name === name).size, + sha256: release.assets.find((asset) => asset.name === name).digest.slice("sha256:".length), + url: `https://github.com/mdbase-dev/mdbase-connect/releases/download/${tag}/${encodeURIComponent(name)}` +}); +const channel = { + schema_version: 1, + version, + tag, + channel: "beta", + release_url: `https://github.com/mdbase-dev/mdbase-connect/releases/tag/${tag}`, + targets: { + "linux-x64": { artifacts: [signedArtifact(names[3]), signedArtifact(names[4])] }, + "win32-x64": { artifacts: [signedArtifact(names[2])] } + } +}; + +function build(overrides = {}) { + return buildConnectReleaseRecord({ + tag, + sourceRevision: "a".repeat(40), + release, + channel, + npmVersion: version, + ...overrides + }); +} + +test("derives the website record from verified release evidence", () => { + const record = build(); + assert.equal(record.version, version); + assert.equal(record.channel, "beta"); + assert.equal(record.desktop.length, 5); + assert.equal(record.cli.length, 4); + assert.equal(record.desktop[0].file, names[0]); + assert.equal(record.cli[3].size, 1008); + assert.equal(record.cli[3].sha256, String(9).padStart(64, "0")); + assert.equal(record.channelManifestUrl, `https://github.com/mdbase-dev/mdbase-connect/releases/download/${tag}/mdbase-connect-channel-v1.json`); +}); + +test("rejects inconsistent release evidence and duplicate artifacts", () => { + assert.throws(() => build({ npmVersion: "0.1.0-beta.83" }), /SDK version/); + assert.throws(() => build({ channel: { ...channel, tag: "v0.1.0-beta.83" } }), /manifest tag/); + const wrongDigest = structuredClone(channel); + wrongDigest.targets["linux-x64"].artifacts[0].sha256 = "f".repeat(64); + assert.throws(() => build({ channel: wrongDigest }), /digest differs from the signed channel/); + assert.throws(() => build({ release: { ...release, assets: [...release.assets, release.assets[0]] } }), /exactly one macOS Apple Silicon/); +}); + +test("orders semantic versions including prereleases", () => { + assert.equal(compareSemanticVersions("0.1.0-beta.9", "0.1.0-beta.10"), -1); + assert.equal(compareSemanticVersions("0.1.0", "0.1.0-beta.99"), 1); + assert.equal(compareSemanticVersions("1.0.0", "1.0.0"), 0); + assert.equal(compareSemanticVersions("1.0.0-beta-2", "1.0.0-beta-1"), 1); + assert.throws(() => versionFromTag("latest"), /invalid release tag/); + assert.throws(() => versionFromTag("v1.0.0-beta.01"), /invalid release tag/); +}); + +test("binds npm provenance to the release tag and source commit", () => { + const sourceRevision = "a".repeat(40); + const statement = { + predicate: { + buildDefinition: { + externalParameters: { + workflow: { + ref: `refs/tags/${tag}`, + repository: "https://github.com/mdbase-dev/mdbase-connect", + path: ".github/workflows/publish-npm.yml" + } + }, + resolvedDependencies: [{ + uri: `git+https://github.com/mdbase-dev/mdbase-connect@refs/tags/${tag}`, + digest: { gitCommit: sourceRevision } + }] + } + } + }; + const evidence = { + version, + releaseTag: tag, + sourceRevision, + metadata: { + version, + repository: { url: "git+https://github.com/mdbase-dev/mdbase-connect.git" }, + dist: { attestations: { provenance: {} } } + }, + attestations: { + attestations: [{ + predicateType: "https://slsa.dev/provenance/v1", + bundle: { dsseEnvelope: { payload: Buffer.from(JSON.stringify(statement)).toString("base64url") } } + }] + } + }; + validateNpmProvenance(evidence); + assert.throws( + () => validateNpmProvenance({ ...evidence, sourceRevision: "b".repeat(40) }), + /not bound to the released source commit/ + ); +}); + +test("classifies idempotent, stale, newer, and conflicting updates", () => { + const current = build(); + assert.equal(releaseUpdateDisposition(current, structuredClone(current)), "current"); + assert.equal(releaseUpdateDisposition(current, { ...current, version: "0.1.0-beta.83" }), "stale"); + assert.equal(releaseUpdateDisposition(current, { ...current, version: "0.1.0-beta.85" }), "update"); + assert.equal(releaseUpdateDisposition(current, { ...current, publishedAt: "different" }), "conflict"); +}); diff --git a/scripts/import-spec.mjs b/scripts/import-spec.mjs index f0b7139..a833a34 100644 --- a/scripts/import-spec.mjs +++ b/scripts/import-spec.mjs @@ -55,6 +55,24 @@ function rewrite(html, archive) { .replaceAll('href="mdbase-favicon.svg"', 'href="/spec/mdbase-favicon.svg"') .replaceAll('href="runtime.html"', 'href="/runtime/"') .replaceAll('Implementations', '') + .replace( + /
diff --git a/src/components/ThemeControlScript.astro b/src/components/ThemeControlScript.astro index 0127716..e5b5b15 100644 --- a/src/components/ThemeControlScript.astro +++ b/src/components/ThemeControlScript.astro @@ -19,8 +19,9 @@ const updateControls = () => { controls.forEach((control) => { const next = currentTheme() === "dark" ? "Light" : "Dark"; - control.textContent = next; - control.setAttribute("aria-label", `Use ${next.toLowerCase()} mode`); + const label = `Use ${next.toLowerCase()} mode`; + control.setAttribute("aria-label", label); + control.setAttribute("title", label); control.hidden = false; }); }; @@ -38,7 +39,7 @@ const dark = currentTheme() === "dark"; document .querySelector('meta[name="theme-color"]') - ?.setAttribute("content", dark ? "#121212" : "#faf9f6"); + ?.setAttribute("content", dark ? "#121212" : "#ffffff"); updateControls(); dispatchEvent(new CustomEvent("mdbase:themechange")); }; diff --git a/src/data/connect-release.json b/src/data/connect-release.json index 48142f5..db7f7ea 100644 --- a/src/data/connect-release.json +++ b/src/data/connect-release.json @@ -9,16 +9,88 @@ "releaseUrl": "https://github.com/mdbase-dev/mdbase-connect/releases/tag/v0.1.0-beta.83", "channelManifestUrl": "https://github.com/mdbase-dev/mdbase-connect/releases/download/v0.1.0-beta.83/mdbase-connect-channel-v1.json", "desktop": [ - { "platform": "macOS", "detail": "Apple Silicon", "trust": "Beta preview · not notarized", "file": "mdbase-connect-0.1.0-beta.83-macos-arm64.dmg", "size": 138297866, "label": "Download for Apple Silicon" }, - { "platform": "macOS", "detail": "Intel", "trust": "Beta preview · not notarized", "file": "mdbase-connect-0.1.0-beta.83-macos-x64.dmg", "size": 142932362, "label": "Download for Intel" }, - { "platform": "Windows", "detail": "64-bit", "trust": "Unsigned beta preview", "file": "mdbase-connect-0.1.0-beta.83-windows-x64-UNSIGNED-Setup.exe", "size": 157127168, "label": "Download for Windows" }, - { "platform": "Linux", "detail": "64-bit Debian or Ubuntu", "trust": "DEB package", "file": "mdbase-connect-0.1.0-beta.83-linux-x64.deb", "size": 108358596, "label": "Download DEB" }, - { "platform": "Linux", "detail": "64-bit Fedora, RHEL, or compatible", "trust": "RPM package", "file": "mdbase-connect-0.1.0-beta.83-linux-x64.rpm", "size": 114180081, "label": "Download RPM" } + { + "platform": "macOS", + "detail": "Apple Silicon", + "trust": "Beta preview · not notarized", + "file": "mdbase-connect-0.1.0-beta.83-macos-arm64.dmg", + "size": 138297866, + "sha256": "90899ee63e9bd1515dad92abf89bd602c4edede855ac9052106f1c0a780e5085", + "label": "Download for Apple Silicon" + }, + { + "platform": "macOS", + "detail": "Intel", + "trust": "Beta preview · not notarized", + "file": "mdbase-connect-0.1.0-beta.83-macos-x64.dmg", + "size": 142932362, + "sha256": "6d77a0dfe1e523962a91f3be1da8f561ca6014899a3cfba35c883b6311972939", + "label": "Download for Intel" + }, + { + "platform": "Windows", + "detail": "64-bit", + "trust": "Unsigned beta preview", + "file": "mdbase-connect-0.1.0-beta.83-windows-x64-UNSIGNED-Setup.exe", + "size": 157127168, + "sha256": "1536dfd1317f704d5c0de6ea0550ff75b4886155d1e4dc1e2f4068bac67500c3", + "label": "Download for Windows" + }, + { + "platform": "Linux", + "detail": "64-bit Debian or Ubuntu", + "trust": "DEB package", + "file": "mdbase-connect-0.1.0-beta.83-linux-x64.deb", + "size": 108358596, + "sha256": "93bd6fd08d2155ff803d2116b5f19168f916135131e15e13bc163fd14ae1f11f", + "label": "Download DEB" + }, + { + "platform": "Linux", + "detail": "64-bit Fedora, RHEL, or compatible", + "trust": "RPM package", + "file": "mdbase-connect-0.1.0-beta.83-linux-x64.rpm", + "size": 114180081, + "sha256": "ea7be52483684db0f1d259ecf3e6d64889202a5f5573fae0f1f83517b3472607", + "label": "Download RPM" + } ], "cli": [ - { "platform": "macOS", "detail": "Apple Silicon", "trust": "Beta preview", "file": "mdbase-cli-0.1.0-beta.83-macos-arm64.tar.gz", "size": 14054317, "label": "Download CLI for Apple Silicon" }, - { "platform": "macOS", "detail": "Intel", "trust": "Beta preview", "file": "mdbase-cli-0.1.0-beta.83-macos-x64.tar.gz", "size": 15227170, "label": "Download CLI for Intel" }, - { "platform": "Windows", "detail": "64-bit", "trust": "Unsigned beta preview", "file": "mdbase-cli-0.1.0-beta.83-windows-x64-UNSIGNED.tar.gz", "size": 13608434, "label": "Download CLI for Windows" }, - { "platform": "Linux", "detail": "64-bit", "trust": "tar.gz", "file": "mdbase-cli-0.1.0-beta.83-linux-x64.tar.gz", "size": 15931643, "label": "Download CLI for Linux" } + { + "platform": "macOS", + "detail": "Apple Silicon", + "trust": "Beta preview", + "file": "mdbase-cli-0.1.0-beta.83-macos-arm64.tar.gz", + "size": 14054317, + "sha256": "63c9c0e615a2a40a5991c6f75845fe04a450bc2ba11b456509c4fa4ca42676d4", + "label": "Download CLI for Apple Silicon" + }, + { + "platform": "macOS", + "detail": "Intel", + "trust": "Beta preview", + "file": "mdbase-cli-0.1.0-beta.83-macos-x64.tar.gz", + "size": 15227170, + "sha256": "cf04a20d62aebdd62fd7ce9f4d670381670b01cc205e169426ee97c38e464c43", + "label": "Download CLI for Intel" + }, + { + "platform": "Windows", + "detail": "64-bit", + "trust": "Unsigned beta preview", + "file": "mdbase-cli-0.1.0-beta.83-windows-x64-UNSIGNED.tar.gz", + "size": 13608434, + "sha256": "69df01ff96704b3b1bd8621d9f14f09740a147df3512314b6ef4b971385321c4", + "label": "Download CLI for Windows" + }, + { + "platform": "Linux", + "detail": "64-bit", + "trust": "tar.gz", + "file": "mdbase-cli-0.1.0-beta.83-linux-x64.tar.gz", + "size": 15931643, + "sha256": "e09d0734e7aca523edccd80928e8df1bf897a39d93f0bfc017dc7220b34f580a", + "label": "Download CLI for Linux" + } ] } diff --git a/src/layouts/BaseLayout.astro b/src/layouts/BaseLayout.astro index b91352c..7df5d58 100644 --- a/src/layouts/BaseLayout.astro +++ b/src/layouts/BaseLayout.astro @@ -1,6 +1,5 @@ --- import "@fontsource/atkinson-hyperlegible/400.css"; -import "@fontsource/atkinson-hyperlegible/700.css"; import "@fontsource/azeret-mono/400.css"; import "@fontsource/azeret-mono/500.css"; import "../styles/shell.css"; @@ -14,9 +13,10 @@ interface Props { description: string; current?: "home" | "apps" | "downloads" | "connect" | "sdk" | "runtime" | "spec"; noIndex?: boolean; + wide?: boolean; } -const { title, description, current, noIndex = false } = Astro.props; +const { title, description, current, noIndex = false, wide = false } = Astro.props; const canonical = new URL(Astro.url.pathname, Astro.site); const fullTitle = title === "mdbase" ? title : `${title} | mdbase`; --- @@ -32,7 +32,7 @@ const fullTitle = title === "mdbase" ? title : `${title} | mdbase`; - + @@ -42,7 +42,7 @@ const fullTitle = title === "mdbase" ? title : `${title} | mdbase`; {noIndex && } - +
diff --git a/src/layouts/HomeLayout.astro b/src/layouts/HomeLayout.astro index a6c5489..2ea0d34 100644 --- a/src/layouts/HomeLayout.astro +++ b/src/layouts/HomeLayout.astro @@ -1,6 +1,5 @@ --- import "@fontsource/atkinson-hyperlegible/400.css"; -import "@fontsource/atkinson-hyperlegible/700.css"; import "@fontsource/azeret-mono/400.css"; import "@fontsource/azeret-mono/500.css"; import "../styles/shell.css"; @@ -29,7 +28,7 @@ const canonical = new URL(Astro.url.pathname, Astro.site); - + diff --git a/src/pages/apps/index.astro b/src/pages/apps/index.astro index fbb6d39..476b96f 100644 --- a/src/pages/apps/index.astro +++ b/src/pages/apps/index.astro @@ -17,7 +17,7 @@ const applications: CatalogueEntry[] = [ description: "Task manager with lists, boards, calendars, recurrence, reminders, attachments, and time tracking.", status: "Public beta", runsOn: "Web, iOS, Android", - collections: "Hosted or connected computer", + collections: "Hosted by Connect or local through Connector", links: [ { label: "Open TaskNotes", href: "https://app.tasknotes.dev/" }, { label: "Try the demo", href: "https://app.tasknotes.dev/?demo=30" }, @@ -29,7 +29,7 @@ const applications: CatalogueEntry[] = [ description: "General collection editor for Markdown records, frontmatter, links, backlinks, and type definitions.", status: "Public beta", runsOn: "Web", - collections: "Hosted or connected computer", + collections: "Hosted by Connect or local through Connector", links: [ { label: "Open Editor", href: "https://editor.mdbase.dev/" }, { label: "Source", href: "https://github.com/mdbase-dev/mdbase-connect/tree/main/apps/editor" } @@ -40,7 +40,7 @@ const applications: CatalogueEntry[] = [ description: "Obsidian plugin for collection setup, type editing, migration, validation, and hosted collection mirrors.", status: "Development build", runsOn: "Obsidian desktop and mobile", - collections: "Local; hosted mirror", + collections: "Local folder or Connect-hosted mirror", links: [{ label: "Source", href: "https://github.com/callumalpass/mdbase-obsidian" }] }, { @@ -48,7 +48,7 @@ const applications: CatalogueEntry[] = [ description: "Remote MCP endpoint for reading and changing approved collections from compatible AI clients.", status: "Public beta", runsOn: "OAuth-capable MCP clients", - collections: "Hosted or connected computer", + collections: "Hosted by Connect or local through Connector", links: [ { label: "Setup and tools", href: "https://github.com/mdbase-dev/mdbase-connect/blob/main/docs/mcp-gateway.md" }, { label: "Endpoint", href: "https://mcp.mdbase.dev/mcp" } @@ -62,12 +62,13 @@ const applications: CatalogueEntry[] = [ description="Applications and collection tools that work with mdbase collections." current="apps" > -
-

Applications

+
+

Applications

- An application uses the records and type definitions in a collection - rather than moving the data into its own private format. Several - applications can present different views of the same files. + Applications are the tools used to view and change an mdbase collection. + They access the same Markdown records through mdbase Connect, whether the + collection is hosted by Connect or served from your computer by the + Connector.

@@ -94,13 +95,12 @@ const applications: CatalogueEntry[] = [
-
-

Building an application

+

- The Connect SDK handles authorization, collection selection, operations, - and change feeds. Application manifests declare required contracts and - permissions. + Application developers can use the Connect SDK for authorization, + collection selection, operations, and change feeds. Application + manifests declare required contracts and permissions.

SDK quickstart diff --git a/src/pages/beta/index.astro b/src/pages/beta/index.astro index eaba5d4..9f72bd0 100644 --- a/src/pages/beta/index.astro +++ b/src/pages/beta/index.astro @@ -7,10 +7,11 @@ import BaseLayout from "../../layouts/BaseLayout.astro"; description="Create an mdbase Connect account with a verified email address and start using local or hosted Markdown collections." current="connect" > -
-

Connect open beta

+
+

Connect open beta

- Public signup is open. Create an account with your email address and a + Public signup for the Connect open beta is available. Create an account + with your email address and a password. Connect will prepare a small hosted Markdown collection so you can open the editor and start exploring.

@@ -25,15 +26,11 @@ import BaseLayout from "../../layouts/BaseLayout.astro";

-
-

What to expect

-
- Pre-release software -

- Connect has no availability guarantee during the open beta. Keep - independent backups of important collections. -

-
+
+

+ Connect has no availability guarantee during the open beta. Keep + independent backups of important collections. +

Hosted allowance
@@ -60,18 +57,17 @@ import BaseLayout from "../../layouts/BaseLayout.astro";
-
-

Before you start

+

Read how local and hosted collections differ, - including which components can read record contents. The - privacy policy and service terms + including which components can read record contents. The{" "} + privacy policy and service terms{" "} apply when you create an account.

The mdbase specification and local tools remain open - source and do not require a Connect account. You can also - download Connect or + source and do not require a Connect account. You can also{" "} + download Connect or{" "} try the SDK locally.

diff --git a/src/pages/connect/index.astro b/src/pages/connect/index.astro index 1c89568..ad9b2d4 100644 --- a/src/pages/connect/index.astro +++ b/src/pages/connect/index.astro @@ -4,58 +4,39 @@ import BaseLayout from "../../layouts/BaseLayout.astro"; -
-

Connect

+
+

mdbase Connect

- mdbase Connect allows an application to work with one local or hosted - collection. The application describes the kinds of records it understands - and the operations it needs. You choose the collection and review the - request before access is granted. + mdbase Connect makes Markdown collections available to applications. It + hosts collections online, synchronizes them with local copies, and + manages application access.

- A grant belongs to a particular application and collection. It might - allow the application to view, find, create, and edit records while - leaving deletion unavailable. The authority responsible for the - collection checks that grant whenever an operation is performed. + When a collection is hosted, Connect serves its online copy directly. + When a collection remains on your computer, the mdbase Connector serves + the folder locally. Connect still manages approval, but the contents of + local operations do not pass through the hosted service.

- For a local collection, an open-source connector runs on your computer - and performs approved operations against the folder. The Connect control - plane coordinates authorization and routing but does not receive the - operation payloads or results. + Connect encrypts hosted collections in transit and at rest. Because the + service serves those files to approved applications, it can decrypt + hosted records while processing requests. The security documentation explains this boundary in more detail.

- For a hosted collection, the provider keeps the authoritative copy online - and performs the same operations there. A local Markdown mirror can be - retained for offline work. + When an application asks for access, you choose a collection and review + what it needs to do. The permission applies only to that application and + collection and can be narrowed, paused, or revoked later.

- Access can be narrowed, paused, or revoked later. This changes what the - application may do; it does not alter ownership of the collection or - prevent other tools from using it. -

-

- Join the open beta or - sign in. -

-
- -
-

Trust boundary

-

- Connect does not make every component equally trusted. A local connector - can read the local folder. A hosted provider can decrypt hosted records in - order to process them. Applications receive only the operations in their - active grants. The control plane can identify accounts, applications, - collections, and grants, but cannot read local collection contents. -

-

- The security documentation describes these - boundaries and their limitations in detail. Developers can continue with - the Connect application guide. + You can download the Connector to use local + folders, create a Connect account for hosted + collections, or sign in to + manage an existing account.

diff --git a/src/pages/contracts/index.astro b/src/pages/contracts/index.astro index 35d39c5..f092c9c 100644 --- a/src/pages/contracts/index.astro +++ b/src/pages/contracts/index.astro @@ -20,31 +20,23 @@ const advancedPacks = catalog.packs.filter((pack) => pack.installation.visibilit description="Browse versioned data contracts and installable starter type packs for mdbase collections." current="sdk" > -
-
-
-

Portable collection semantics

-

Contracts and type packs

-
-
-

- Contracts give applications a small, shared vocabulary without - forcing every collection to use the same field names or storage - format. Type packs install a contract and a friendly editable type - together. -

- -
+
+

Contracts and type packs

+

+ Contracts give applications a small shared vocabulary without requiring + every collection to use the same field names or storage format. Type + packs install a contract together with a local, editable type. +

+
-

Local notes, shared meaning

+

How contracts map local fields

A type remains the source of truth for what your Markdown records store. Its implements entries explain how compatible applications diff --git a/src/pages/downloads/index.astro b/src/pages/downloads/index.astro index 5d17cb8..a7b250d 100644 --- a/src/pages/downloads/index.astro +++ b/src/pages/downloads/index.astro @@ -6,6 +6,9 @@ const { version, tag, releaseUrl: releasePage } = release; const releaseBase = `https://github.com/mdbase-dev/mdbase-connect/releases/download/${tag}`; const desktopDownloads = release.desktop; const cliDownloads = release.cli; +const macDownloadsSigned = desktopDownloads + .filter(({ platform }) => platform === "macOS") + .every(({ trust }) => trust === "Signed and notarized"); const published = new Date(release.publishedAt); const releaseSize = (bytes: number) => `${Math.round(bytes / 1_000_000)} MB`; --- @@ -15,39 +18,37 @@ const releaseSize = (bytes: number) => `${Math.round(bytes / 1_000_000)} MB`; description="Download the mdbase Connect desktop app or standalone command line tools for macOS, Windows, and Linux." current="downloads" > -

-
-
-

Download mdbase Connect

-
-
-

- The desktop app includes the local connector, background service, - and command line tools. The mdbase editor is available online. These - builds are public beta releases; hosted collections require a free - Connect account. -

-
- Version {version} - Published -
-
+
+

mdbase Connect downloads

+

+ Install mdbase Connect on your computer to make local Markdown folders + available to approved applications. The desktop app includes the mdbase + Connector, its background service, and the command-line tools. +

+

+ The mdbase editor is available online. These builds are public beta + releases; hosted collections require a free Connect account. +

+
+ Version {version} + Published

Desktop app

- Choose the package for your computer. The app can open local mdbase - collections immediately; managed Connect features require an account. + Choose the package for your computer. The app installs the Connector and + can open local mdbase collections immediately; hosted Connect features + require an account.

- macOS builds are not notarized; Windows builds are unsigned previews. + Signing and notarization

- Windows may show an Unknown Publisher or SmartScreen warning. macOS - requires a manual Privacy & Security override and the app has not - been notarized. The release includes checksums and Sigstore provenance. + Windows may show an Unknown Publisher or SmartScreen warning. {macDownloadsSigned + ? "The macOS builds are signed and notarized." + : "macOS requires a manual Privacy & Security override and the app has not been notarized."} The release includes checksums and Sigstore provenance.

@@ -70,7 +71,7 @@ const releaseSize = (bytes: number) => `${Math.round(bytes / 1_000_000)} MB`; }

- Portable Windows and macOS ZIP builds are available on the + Portable Windows and macOS ZIP builds are available on the{" "} release page.

@@ -100,7 +101,7 @@ const releaseSize = (bytes: number) => `${Math.round(bytes / 1_000_000)} MB`; }

- Follow the headless installation guide + Follow the headless installation guide{" "} to verify, install, and run the service.

diff --git a/src/pages/incidents/2026-08-18-candidate-b-production/index.astro b/src/pages/incidents/2026-08-18-candidate-b-production/index.astro index 4adf29a..576c0bb 100644 --- a/src/pages/incidents/2026-08-18-candidate-b-production/index.astro +++ b/src/pages/incidents/2026-08-18-candidate-b-production/index.astro @@ -57,7 +57,7 @@ import BaseLayout from "../../../layouts/BaseLayout.astro";

Connect remains a beta service with no availability SLA. This permanent summary records how a beta failure affected customers and what changed; it - is not an uptime commitment. Current conditions are published on the + is not an uptime commitment. Current conditions are published on the{" "} service status page.

diff --git a/src/pages/index.astro b/src/pages/index.astro index f4a8d83..13a17f7 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -4,14 +4,14 @@ import HomeLayout from "../layouts/HomeLayout.astro";
-
+
-

What is mdbase?

+

mdbase

An mdbase is a folder of Markdown files with enough shared structure for applications to understand them. The files remain readable in a @@ -19,20 +19,21 @@ import HomeLayout from "../layouts/HomeLayout.astro"; ordinary tools.

- The specification defines the common format. - Libraries provide validation and queries. Connect - lets an application request access to a particular collection. + Applications can use these files without importing them into private + databases. mdbase Connect can host a + collection online, synchronize it with a local copy, and control + which applications may use it. If a collection remains on your + computer, the mdbase Connector serves the folder locally.

-
+
-

A folder is the database.

- This collection contains project records and the definitions that - describe them. A project application and a text editor can work with - the same files. + A collection is a folder containing Markdown records and the + definitions that describe them. In this example, a project + application and a text editor can work with the same files.

projects/
 ├── mdbase.yaml
@@ -46,12 +47,12 @@ import HomeLayout from "../layouts/HomeLayout.astro";
       
-
+
-

The records are ordinary Markdown.

- Frontmatter holds fields that applications can validate and query. - The body remains prose. + Each record is an ordinary Markdown file. Frontmatter holds fields + that applications can validate and query, while the body remains + prose.

---
 type: project
@@ -70,48 +71,45 @@ easier to understand.
-
+
-

A collection can be local or hosted.

- A local collection is an ordinary folder on your computer. The - open-source libraries and command-line tools can use it without an - account. -

-

- A hosted collection keeps its main copy online. It can still have a - local Markdown mirror for offline work. + A collection can remain as a folder on your computer or be hosted by + mdbase Connect. The Connector serves a local folder directly to + approved applications. A hosted collection keeps its main copy + online and can synchronize with a local Markdown mirror for offline + work.

-
+
-

Applications ask for access.

- Connect shows which collection an application wants to use and which - operations it needs. You might allow an application to find, create, + Applications use Connect to ask for access to a collection and list + the operations they need. You might allow an application to find, create, and edit project records while leaving deletion blocked.

- The collection authority checks the grant whenever the application - performs an operation. + Connect checks that permission whenever the application uses the + collection.

-
+
-

The collection does not belong to the application.

- Access can be narrowed, paused, or revoked. Removing an application + The application does not own the collection. Access can be narrowed, + paused, or revoked. Removing an application does not remove the collection, and the files remain usable with other conforming tools.

- See the current applications, read the + See the current applications, read the{" "} developer documentation, or learn about the - optional runtime profile. + optional runtime profile. Connect is also + available in open beta.

diff --git a/src/pages/runtime/index.astro b/src/pages/runtime/index.astro index 08131c0..d2a23b6 100644 --- a/src/pages/runtime/index.astro +++ b/src/pages/runtime/index.astro @@ -7,28 +7,22 @@ import BaseLayout from "../../layouts/BaseLayout.astro"; description="Understand how Runtime profile 0.2 adds durable workflow execution to ordinary mdbase contracts and shared interoperability." current="runtime" > -
-
-
-

Runtime profile 0.2

-

Durable execution uses the same contracts.

-
-
-

- Contracts define meaning. Interoperability connects live - applications. The runtime adds admission, persistence, retries, - recovery, and honest outcomes when effects cannot be known. -

- -
+
+

mdbase runtime

+

+ Runtime profile 0.2 adds durable workflow execution to the same record, + event, and action contracts used by applications. It defines admission, + persistence, retries, recovery, and outcomes for effects whose result + cannot be known. +

+
-

Four layers, one contract model

+

Runtime model

An application can consume a record type, publish an event, or provide an action without becoming a workflow engine. Each layer has one job. @@ -36,7 +30,7 @@ import BaseLayout from "../../layouts/BaseLayout.astro";

-

1. Contracts define

+

1. Contracts

Record, event, and action artifacts share one identity, SemVer, JSON Schema, digest, registry, and conflict model. @@ -45,7 +39,7 @@ import BaseLayout from "../../layouts/BaseLayout.astro";

-

2. Applications connect

+

2. Application interoperability

CloudEvents and action envelopes carry exact contract evidence. Source and provider declarations bind live implementations to @@ -55,7 +49,7 @@ import BaseLayout from "../../layouts/BaseLayout.astro";

-

3. The runtime admits

+

3. Workflow admission

A workflow names compatible contracts. Admission resolves and pins the exact event source, action provider, handler, versions, and @@ -65,7 +59,7 @@ import BaseLayout from "../../layouts/BaseLayout.astro";

-

4. Durable execution recovers

+

4. Execution and recovery

Runs, attempts, leases, checkpoints, timers, cursors, and outcomes survive crashes. The authorization host remains the final boundary @@ -77,7 +71,7 @@ import BaseLayout from "../../layouts/BaseLayout.astro";

-

Readable requirements become exact evidence

+

Workflow requirements and admitted plans

Authors name behavior and a compatible version. The admitted plan records exact immutable bindings before any action runs. @@ -108,7 +102,7 @@ steps: status: $expr: event.data.target.value`}

- Compatibility is not authority. + Compatibility and authorization

A matching schema or SemVer range never grants access. The runtime admits exact candidates, and the embedding host still authorizes the diff --git a/src/pages/sdk/authorization/index.astro b/src/pages/sdk/authorization/index.astro index bef3bb1..c982c0d 100644 --- a/src/pages/sdk/authorization/index.astro +++ b/src/pages/sdk/authorization/index.astro @@ -97,7 +97,7 @@ const { connection } = await connect.authorize({

The abort signal stops polling and discards the unapproved in-memory key. Use openVerification when a shell owns the approval window. - See the portable HTML application guide + See the portable HTML application guide{" "} for the complete downloaded-file boundary.

diff --git a/src/pages/sdk/index.astro b/src/pages/sdk/index.astro index 39726f4..204124e 100644 --- a/src/pages/sdk/index.astro +++ b/src/pages/sdk/index.astro @@ -31,10 +31,10 @@ export async function listOpenTasks(client: MdbaseCollectionClient) { route and the collection authority checks the current grant.

-

Choose the first result you need

+

Starting points

- Learn the Connect client boundary + Local SDK sandbox

Run typed reads and revision-safe changes against an in-memory collection. This source-built sandbox needs no account or service. @@ -42,7 +42,7 @@ export async function listOpenTasks(client: MdbaseCollectionClient) { Run the source-built sandbox

- Connect a real application + Connect an application

Add a manifest, authorize one compatible collection, complete the browser callback, and use the approved connection. @@ -50,7 +50,7 @@ export async function listOpenTasks(client: MdbaseCollectionClient) { Open the Connect guide

- Implement the open specification + Specification implementations

Build a conforming collection tool or use the versioned TypeScript and Rust implementations without the managed Connect service. @@ -59,7 +59,7 @@ export async function listOpenTasks(client: MdbaseCollectionClient) {

- Open-beta release status + Release status

The production service and protocol 1 are deployed for public beta accounts. The npm packages await their first public release. Current developers @@ -68,7 +68,7 @@ export async function listOpenTasks(client: MdbaseCollectionClient) {

- Versioned implementation evidence + Conformance evidence

The current site records mdbase specification 0.3.0 claims for the TypeScript 0.3.0-rc.4 and Rust 0.4.0-rc.3 implementations, with evidence @@ -139,7 +139,7 @@ export async function listOpenTasks(client: MdbaseCollectionClient) {

- The operation envelope is part of the contract. + Operation envelopes

Record operations return {`{ valid, result, diagnostics }`}. Use unwrapOperation() when exceptions suit the calling code, diff --git a/src/pages/sdk/manifest/index.astro b/src/pages/sdk/manifest/index.astro index ed5d947..dffded8 100644 --- a/src/pages/sdk/manifest/index.astro +++ b/src/pages/sdk/manifest/index.astro @@ -101,7 +101,7 @@ const portableManifest = `{ digest.

- Canonical schema: + Canonical schema:{" "} mdbase-app.v1.json

diff --git a/src/styles/apps.css b/src/styles/apps.css index ec9b8c0..0cd4710 100644 --- a/src/styles/apps.css +++ b/src/styles/apps.css @@ -9,9 +9,9 @@ .app-entry__links { display: flex; margin-top: 0.35rem; flex-wrap: wrap; gap: 0.25rem 1rem; } .app-meta { display: grid; margin-top: 0.6rem; } .app-meta > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; } -.app-meta dt { color: var(--ink-muted); font: 400 0.68rem/1.55 var(--mono); } +.app-meta dt { color: var(--ink-muted); font: 400 0.68rem/1.55 var(--sans); } .app-meta dd { color: var(--ink-soft); font-size: 0.82rem; } -.catalogue-label { color: var(--ink-muted); font: 400 0.68rem/1.4 var(--mono); } +.catalogue-label { color: var(--ink-muted); font: 400 0.68rem/1.4 var(--sans); } .build-section { display: block; } .build-section__body p { margin-top: 0.5rem; color: var(--ink-soft); } .build-section__body .button-row { margin-top: 0.8rem; } diff --git a/src/styles/global.css b/src/styles/global.css index e15bd0a..934e1b1 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -15,8 +15,8 @@ --danger: var(--color-danger); --on-blue: var(--color-surface); --scrim: var(--color-scrim); - --page: 47.5rem; - --reading: 41rem; + --page: 760px; + --reading: 660px; --radius: 0; } @@ -31,6 +31,7 @@ html { min-width: 320px; scroll-behavior: smooth; + font-size: 17px; color: var(--ink); background: var(--canvas); text-rendering: optimizeLegibility; @@ -44,13 +45,12 @@ body { background: var(--canvas); font-family: var(--sans); font-size: 1rem; - line-height: 1.55; + line-height: 1.5; } .site-body > main { - width: min(calc(100% - 3rem), var(--reading)); - min-height: calc(100vh - 14rem); - margin: 4rem 0 0 var(--site-left); + width: min(calc(100% - 48px), var(--reading)); + margin: 64px 0 0 var(--site-left); } ::selection { color: var(--canvas); background: var(--ink); } @@ -67,11 +67,15 @@ button, select, input, textarea { color: inherit; font: inherit; } button, select { cursor: pointer; } img, svg { display: block; max-width: 100%; } +strong, b, +h1, h2, h3, h4 { + font-weight: 400; +} + h1, h2, h3, h4 { max-width: 34ch; color: var(--ink); font-size: 1rem; - font-weight: 700; line-height: 1.35; letter-spacing: 0; text-wrap: pretty; @@ -109,7 +113,7 @@ main[tabindex="-1"]:focus { outline: none; } .skip-link:focus { transform: none; } .page-shell { width: 100%; } -.eyebrow { margin-bottom: 1rem; color: var(--ink-muted); font: 400 0.72rem/1.4 var(--mono); } +.eyebrow { margin-bottom: 1rem; color: var(--ink-muted); font: 400 0.72rem/1.4 var(--sans); } .eyebrow i { display: none; } .button-row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; } @@ -166,7 +170,7 @@ main[tabindex="-1"]:focus { outline: none; } gap: 0.75rem; counter-increment: steps; } -.step::before { color: var(--ink-muted); font: 400 0.65rem/1.6 var(--mono); content: counter(steps, decimal-leading-zero); } +.step::before { color: var(--ink-muted); font: 400 0.65rem/1.6 var(--sans); content: counter(steps, decimal-leading-zero); } .step h3 { font-size: 1rem; } .step p { margin-top: 0.25rem; color: var(--ink-soft); } @@ -182,7 +186,7 @@ main[tabindex="-1"]:focus { outline: none; } border: 0; } .plain-sequence li { grid-template-columns: 2rem minmax(9rem, 0.35fr) minmax(0, 1fr); counter-increment: plain-sequence; } -.plain-sequence li::before { color: var(--ink-muted); font: 400 0.62rem/1.5 var(--mono); content: counter(plain-sequence, decimal-leading-zero); } +.plain-sequence li::before { color: var(--ink-muted); font: 400 0.62rem/1.5 var(--sans); content: counter(plain-sequence, decimal-leading-zero); } .plain-sequence span, .glossary-list dd { color: var(--ink-soft); } .trust-table, .profile-table, .api-table { @@ -199,7 +203,7 @@ main[tabindex="-1"]:focus { outline: none; } text-align: left; vertical-align: top; } -.trust-table th, .profile-table th, .api-table th { color: var(--ink-muted); font: 400 0.68rem/1.4 var(--mono); } +.trust-table th, .profile-table th, .api-table th { color: var(--ink-muted); font: 400 0.68rem/1.4 var(--sans); } .status { color: var(--ink-soft); font-size: 0.82rem; } .status::before { display: none; } @@ -220,7 +224,7 @@ main[tabindex="-1"]:focus { outline: none; } justify-content: space-between; color: var(--ink-muted); border-bottom: 1px solid var(--line); - font: 400 0.65rem/1 var(--mono); + font: 400 0.65rem/1 var(--sans); } .code-block button { min-height: 2.4rem; padding: 0 0.4rem; color: inherit; background: transparent; border: 0; } .code-block pre, pre:not(.file-tree):not(.record-example) { max-width: 100%; padding: 1rem; font-size: 0.76rem; line-height: 1.58; tab-size: 2; } @@ -244,7 +248,7 @@ main[tabindex="-1"]:focus { outline: none; } .start-options p { margin-top: 0.3rem; color: var(--ink-soft); } .start-options a { display: inline-block; margin-top: 0.4rem; } -.download-summary { display: flex; margin-top: 1rem; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--ink-muted); font: 400 0.68rem/1.5 var(--mono); } +.download-summary { display: flex; margin-top: 1rem; flex-wrap: wrap; gap: 0.4rem 1.2rem; color: var(--ink-muted); font: 400 0.68rem/1.5 var(--sans); } .download-list { margin-top: 1.5rem; } .download-option { display: grid; max-width: none; padding: 0; margin-bottom: 1.5rem; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 1rem; border: 0; } .download-option__detail p { color: var(--ink-soft); } @@ -254,20 +258,20 @@ main[tabindex="-1"]:focus { outline: none; } .docs-shell { display: grid; - width: min(calc(100vw - var(--site-left) - 1.5rem), 67.5rem); - grid-template-columns: 11.25rem minmax(0, 41rem) minmax(8rem, 1fr); - gap: clamp(2rem, 4vw, 4rem); + width: min(calc(100vw - var(--site-left) - 24px), var(--shell-width)); + grid-template-columns: 180px minmax(0, 660px) minmax(112px, 1fr); + gap: 32px; } .docs-nav, .docs-toc { position: sticky; top: 2rem; align-self: start; max-height: calc(100vh - 4rem); overflow: auto; } .docs-nav { padding-left: 1rem; border-left: 1px solid var(--ink); } -.docs-nav summary { padding-bottom: 0.65rem; color: var(--ink); font-weight: 700; list-style: none; } +.docs-nav summary { padding-bottom: 0.65rem; color: var(--ink); font-weight: 400; list-style: none; } .docs-nav summary::-webkit-details-marker { display: none; } .docs-nav nav, .docs-toc nav, .docs-nav__group { display: grid; } .docs-nav__group + .docs-nav__group { margin-top: 1rem; padding: 0; border: 0; } .docs-nav__group > strong { margin-bottom: 0.2rem; color: var(--ink-muted); font: 400 0.65rem/1.4 var(--mono); } .docs-nav nav a { padding: 0.2rem 0; color: var(--ink-soft); font-size: 0.82rem; line-height: 1.4; } -.docs-nav nav a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: none; } -.docs-nav__meta { display: flex; margin-top: 1rem; padding-top: 0.6rem; justify-content: space-between; color: var(--ink-muted); border-top: 1px solid var(--line); font: 400 0.62rem/1.4 var(--mono); } +.docs-nav nav a[aria-current="page"] { color: var(--ink); font-weight: 400; text-decoration: none; } +.docs-nav__meta { display: flex; margin-top: 1rem; padding-top: 0.6rem; justify-content: space-between; color: var(--ink-muted); border-top: 1px solid var(--line); font: 400 0.62rem/1.4 var(--sans); } .docs-article { min-width: 0; } .docs-title { margin-bottom: 2rem; } .docs-title > p { color: var(--ink-muted); } @@ -304,7 +308,7 @@ main[tabindex="-1"]:focus { outline: none; } .pack-card__caution { background: transparent !important; } .catalogue-status::before { display: none !important; } -@media (max-width: 60rem) { +@media (max-width: 68rem) { .docs-shell { display: block; width: min(calc(100vw - var(--site-left) - 1rem), var(--reading)); } .docs-nav { position: static; max-height: none; margin-bottom: 3rem; padding: 0 0 0 1rem; background: transparent; border: 0; border-left: 1px solid var(--ink); } .docs-nav details:not([open]) nav { display: none; } diff --git a/src/styles/home.css b/src/styles/home.css index c7bd874..6c2e737 100644 --- a/src/styles/home.css +++ b/src/styles/home.css @@ -33,17 +33,17 @@ .chapter { display: flex; min-height: 112vh; - padding: 9rem 1.5rem 12vh var(--site-left); + padding: 150px 24px 12vh var(--site-left); align-items: center; - scroll-margin-top: 7rem; + scroll-margin-top: 120px; } .chapter:first-child { min-height: 126vh; } .chapter:last-child { min-height: 120vh; } .chapter__inner { - width: min(38.75rem, 43vw); + width: min(620px, 43vw); opacity: 0.18; - transform: translateY(1.1rem); + transform: translateY(18px); transition: opacity 400ms ease, transform 500ms ease; } .chapter.is-active .chapter__inner { opacity: 1; transform: none; } @@ -51,25 +51,25 @@ .home-body h1, .home-body h2 { max-width: none; - margin: 0 0 1.5rem; + margin: 0 0 24px; font-size: 1rem; - line-height: 1.35; + line-height: 1.5; letter-spacing: 0; } -.home-body p { margin: 0 0 1.2rem; } +.home-body p { margin: 0 0 20px; } .chapter__lead, .chapter__body { color: var(--color-text); } .file-tree, .record-example { - width: min(31rem, 100%); - margin: 1.75rem 0; - padding: 1rem; + width: min(500px, 100%); + margin: 28px 0; + padding: 18px; overflow-x: auto; color: var(--color-text); background: var(--color-canvas); border: 1px solid var(--color-text); border-radius: 0; - font: 400 0.76rem/1.55 var(--mono); + font: 400 0.76rem/1.5 var(--mono); } .file-tree span, .record-example span, .file-tree strong { color: inherit; font-weight: inherit; } @@ -91,7 +91,7 @@ text-underline-offset: 0.2em; } -@media (max-width: 51.25rem) { +@media (max-width: 820px) { .chapter, .chapter:first-child, .chapter:last-child { diff --git a/src/styles/shell.css b/src/styles/shell.css index cb53a37..1a44e1b 100644 --- a/src/styles/shell.css +++ b/src/styles/shell.css @@ -1,16 +1,37 @@ :root { --sans: "Atkinson Hyperlegible", "Segoe UI", sans-serif; --mono: "Azeret Mono", "SFMono-Regular", "Cascadia Code", monospace; - --site-left: clamp(1.5rem, 8vw, 7.5rem); - --shell-width: 47.5rem; + --site-left: clamp(24px, 8vw, 120px); + --shell-width: 760px; +} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +html { + font-size: 17px; +} + +body { + margin: 0; + font-family: var(--sans); + font-size: 1rem; + line-height: 1.5; +} + +.site-body--wide { + --shell-width: 1080px; } .site-header { position: relative; z-index: 20; - width: min(calc(100% - 3rem), var(--shell-width)); + width: min(calc(100% - 48px), var(--shell-width)); margin-left: var(--site-left); - padding-top: 1.35rem; + padding-top: 22px; color: var(--color-text); background: var(--color-canvas); } @@ -18,8 +39,8 @@ .home-body > .site-header { position: fixed; top: 0; - left: 0; - margin-left: var(--site-left); + left: var(--site-left); + margin-left: 0; background: color-mix(in srgb, var(--color-canvas) 92%, transparent); } @@ -29,18 +50,18 @@ .wordmark { display: inline-block; - margin-bottom: 1rem; + margin-bottom: 18px; color: var(--color-text); - font-weight: 700; + font-weight: 400; text-decoration: none; } .site-nav { display: flex; - padding: 0.55rem 0; + padding: 10px 0; align-items: center; flex-wrap: wrap; - gap: 0.25rem 1.25rem; + gap: 6px 22px; border-top: 1px solid var(--color-text); border-bottom: 1px solid var(--color-text); } @@ -56,36 +77,58 @@ } .site-nav a[aria-current="page"] { - font-weight: 700; + font-weight: 400; text-decoration: none; } .theme-toggle { + width: 24px; + height: 24px; margin-left: auto; - text-decoration: underline; + display: grid; + place-items: center; cursor: pointer; } +.theme-toggle[hidden] { + display: none; +} + +.theme-toggle__icon { + width: 14px; + height: 14px; +} + +.theme-toggle__icon circle { + fill: none; + stroke: currentColor; + stroke-width: 1.25; +} + +.theme-toggle__icon path { + fill: currentColor; +} + .site-footer { position: relative; z-index: 3; - width: min(calc(100% - 3rem), var(--shell-width)); - margin: 5rem 0 0 var(--site-left); - padding: 0.7rem 0 3rem; + width: min(calc(100% - 48px), var(--shell-width)); + margin: 40px 0 0 var(--site-left); + padding: 12px 0 48px; color: var(--color-text); background: var(--color-canvas); border-top: 1px solid var(--color-text); } .site-footer__inner { - display: flex; - align-items: flex-start; - justify-content: space-between; - gap: 1.5rem; + display: grid; + align-items: start; + grid-template-columns: minmax(9rem, 0.6fr) minmax(0, 1.4fr); + gap: 2rem; } .site-footer strong { - font-weight: 700; + font-weight: 400; } .site-footer p { @@ -94,29 +137,53 @@ } .site-footer__nav { - display: flex; - justify-content: flex-end; - flex-wrap: wrap; - gap: 0.25rem 1.1rem; + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: 1.5rem; +} + +.site-footer__nav > div { + display: grid; + align-content: start; + gap: 0.2rem; +} + +.site-footer__nav > div > strong { + margin-bottom: 0.25rem; } .site-footer a { color: var(--color-text); + text-decoration: none; } -@media (max-width: 50rem) { +.site-footer a:hover { + color: var(--color-text-soft); +} + +@media (max-width: 820px) { :root { - --site-left: 1rem; + --site-left: 16px; } .site-header, .home-body > .site-header, .site-footer { - width: calc(100% - 2rem); + width: calc(100% - 32px); + } + + .site-header { + padding-top: 16px; } .site-nav { - gap: 0.2rem 0.85rem; + gap: 6px 14px; + } +} + +@media (max-width: 42rem) { + .site-footer__inner { + grid-template-columns: 1fr; } } @@ -124,4 +191,8 @@ .site-footer__identity p { display: none; } + + .site-footer__nav { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } }