From fe1e3e35fe4a0ea0007a90fd47cd0651f6085b4a Mon Sep 17 00:00:00 2001
From: David Hill <1879069+iamdavidhill@users.noreply.github.com>
Date: Thu, 5 Nov 2026 18:50:20 -0600
Subject: [PATCH] feat(site): bring services/site up to date with the latest
site work (#62219)
---
services/site/DESIGN.md | 1 +
.../site/src/component/font/cover-title.tsx | 82 ++--
.../site/src/component/font/typewriter.tsx | 22 +-
.../site/src/component/site/arcade/arcade.css | 5 +
.../site/src/component/site/arcade/arcade.tsx | 204 +++++++--
.../site/src/component/site/arcade/chrome.css | 113 ++++-
.../site/src/component/site/arcade/chrome.tsx | 58 ++-
.../src/component/site/arcade/geometry.ts | 16 +-
.../site/src/component/site/arcade/layers.css | 13 +
.../site/src/component/site/design-mode.tsx | 2 +-
services/site/src/component/site/doc-list.css | 368 +++++++++++++++++
.../site/src/component/site/github-link.css | 13 +-
.../site/src/component/site/github-link.tsx | 26 ++
.../site/src/component/site/logo-wall.tsx | 2 +-
.../site/src/component/site/on-this-page.css | 59 ++-
.../site/src/component/site/phone-menu.css | 168 ++++++++
.../site/src/component/site/phone-menu.tsx | 52 +++
.../src/component/site/preload-settings.ts | 4 +-
.../site/src/component/site/product-list.css | 60 ++-
.../site/src/component/site/product-list.tsx | 10 +-
services/site/src/component/site/products.css | 21 +
services/site/src/component/site/products.tsx | 4 +-
services/site/src/component/site/settings.ts | 4 +-
services/site/src/component/site/site.css | 176 +++-----
services/site/src/component/site/site.tsx | 52 +--
.../src/component/site/voice/voice-mode.css | 77 +++-
services/site/src/config.ts | 2 +-
services/site/src/i18n/ar.ts | 4 +-
services/site/src/i18n/br.ts | 4 +-
services/site/src/i18n/content/ar.ts | 2 +-
services/site/src/i18n/content/br.ts | 2 +-
services/site/src/i18n/content/da.ts | 2 +-
services/site/src/i18n/content/de.ts | 2 +-
services/site/src/i18n/content/es.ts | 2 +-
services/site/src/i18n/content/fr.ts | 2 +-
services/site/src/i18n/content/it.ts | 2 +-
services/site/src/i18n/content/ja.ts | 2 +-
services/site/src/i18n/content/ko.ts | 2 +-
services/site/src/i18n/content/no.ts | 2 +-
services/site/src/i18n/content/pl.ts | 2 +-
services/site/src/i18n/content/ru.ts | 2 +-
services/site/src/i18n/content/th.ts | 2 +-
services/site/src/i18n/content/tr.ts | 2 +-
services/site/src/i18n/content/uk.ts | 2 +-
services/site/src/i18n/content/zh.ts | 2 +-
services/site/src/i18n/content/zht.ts | 2 +-
services/site/src/i18n/da.ts | 4 +-
services/site/src/i18n/de.ts | 4 +-
services/site/src/i18n/en.ts | 4 +-
services/site/src/i18n/es.ts | 4 +-
services/site/src/i18n/fr.ts | 4 +-
services/site/src/i18n/it.ts | 4 +-
services/site/src/i18n/ja.ts | 4 +-
services/site/src/i18n/ko.ts | 4 +-
services/site/src/i18n/no.ts | 4 +-
services/site/src/i18n/pl.ts | 4 +-
services/site/src/i18n/ru.ts | 4 +-
services/site/src/i18n/stamps/ar.json | 6 +-
services/site/src/i18n/stamps/br.json | 6 +-
services/site/src/i18n/stamps/da.json | 6 +-
services/site/src/i18n/stamps/de.json | 6 +-
services/site/src/i18n/stamps/es.json | 6 +-
services/site/src/i18n/stamps/fr.json | 6 +-
services/site/src/i18n/stamps/it.json | 6 +-
services/site/src/i18n/stamps/ja.json | 6 +-
services/site/src/i18n/stamps/ko.json | 6 +-
services/site/src/i18n/stamps/no.json | 6 +-
services/site/src/i18n/stamps/pl.json | 6 +-
services/site/src/i18n/stamps/ru.json | 6 +-
services/site/src/i18n/stamps/th.json | 6 +-
services/site/src/i18n/stamps/tr.json | 6 +-
services/site/src/i18n/stamps/uk.json | 6 +-
services/site/src/i18n/stamps/zh.json | 6 +-
services/site/src/i18n/stamps/zht.json | 6 +-
services/site/src/i18n/th.ts | 4 +-
services/site/src/i18n/tr.ts | 4 +-
services/site/src/i18n/uk.ts | 4 +-
services/site/src/i18n/zh.ts | 4 +-
services/site/src/i18n/zht.ts | 4 +-
services/site/src/routes/brand/index.css | 44 +-
services/site/src/routes/font/index.css | 64 ++-
services/site/src/routes/index.css | 7 +-
services/site/src/routes/legal/index.tsx | 1 +
services/site/src/routes/legal/legal.css | 391 ++----------------
services/site/src/routes/press/index.css | 6 +-
services/site/src/routes/press/index.tsx | 25 +-
.../site/src/routes/press/media-gallery.css | 12 +-
87 files changed, 1580 insertions(+), 792 deletions(-)
create mode 100644 services/site/src/component/site/doc-list.css
create mode 100644 services/site/src/component/site/github-link.tsx
create mode 100644 services/site/src/component/site/phone-menu.css
create mode 100644 services/site/src/component/site/phone-menu.tsx
diff --git a/services/site/DESIGN.md b/services/site/DESIGN.md
index 217c9c5312e..5fa963e1cea 100644
--- a/services/site/DESIGN.md
+++ b/services/site/DESIGN.md
@@ -93,6 +93,7 @@ To add a rule, add one line under its group. Mark a rule that is still being dec
- Make tap targets at least 44px on coarse pointers (`tap-targets.css`).
- Close menus on Escape, an outside click and a choice, and return focus to the trigger. → [Language picker](/dev/components#language-picker)
- Test platform UI with the device preview's `_device` parameter, not a narrow window. → [ProductAction](/dev/components#product-action)
+- On phones the 404 arcade centres the cabinet and has no Insert coin or Back button: a tap on the coin inserts it, and the site's own GitHub mark, menu button and sheet (`phone-menu.tsx`) sit in the top bar beside the logo.
## Motion
diff --git a/services/site/src/component/font/cover-title.tsx b/services/site/src/component/font/cover-title.tsx
index 3b1c8cdeea9..b779aa50cd5 100644
--- a/services/site/src/component/font/cover-title.tsx
+++ b/services/site/src/component/font/cover-title.tsx
@@ -13,7 +13,8 @@ const HEIGHT = 7 + TOP + BOTTOM
// Phase budgets in milliseconds; each phase's moves share its budget in proportion to length.
const PHASES = { metrics: 420, grids: 620, outlines: 820, fill: 760, shade: 380 }
-const SETTLE = 220
+// After the last move the plot settles: the pen, readout and counter fade out and the guides dim.
+const SETTLE = 360
// The shade: the ink at the page's paper shade opacity.
const SHADE_ALPHA = 0.22
@@ -170,7 +171,9 @@ export function CoverTitle() {
let md = 16
let dpr = 1
let palette: Palette = { ink: "#141414", blue: "#3b5cf6", faint: "#bbb" }
- let started: number | undefined
+ let elapsed = reduced ? END : 0
+ let last: number | undefined
+ let played = false
let frame = 0
const layout = () => {
@@ -226,14 +229,14 @@ export function CoverTitle() {
for (const [col, row] of buildOrder(WORD[letter] as Letter)) context.fillRect(X(letter * 5 + col), Y(row), md, md)
}
- const ticks = (letter: number) => {
+ const ticks = (letter: number, label: boolean) => {
const y = Y(7) + Math.round(md * 0.55)
context.fillRect(X(letter * 5), y, X(letter * 5 + 4) - X(letter * 5), 1)
for (let col = 0; col <= 4; col++) {
const x = Math.min(X(letter * 5 + col), X(letter * 5 + 4) - 1)
context.fillRect(x, y - Math.round(md * 0.18), 1, Math.round(md * 0.36) + 1)
}
- context.fillText("4 × 120u", X(letter * 5), y + Math.round(md * 0.25) + 10 * dpr)
+ if (label) context.fillText("4 × 120u", X(letter * 5), y + Math.round(md * 0.25) + 10 * dpr)
}
const registration = () => {
@@ -255,13 +258,17 @@ export function CoverTitle() {
}
const draw = (t: number) => {
- const done = t >= END
+ // 0 while plotting, easing to 1 over the settle (an ease-out quint), so nothing snaps at the end.
+ const settle = 1 - (1 - Math.min(1, Math.max(0, (t - program.end) / SETTLE))) ** 5
+ const fade = (to: number) => 1 + (to - 1) * settle
context.clearRect(0, 0, canvas.width, canvas.height)
context.font = `${10 * dpr}px "OpenTUI Mono", "OpenTUI Mono Menlo", ui-monospace, monospace`
context.textBaseline = "alphabetic"
+ // On a narrow canvas the module label is wider than a letter, so only the first letter carries it.
+ const everyLabel = context.measureText("4 × 120u").width + 4 * dpr <= 5 * md
// Registration marks: always there, faint once the plot is done.
- context.globalAlpha = done ? 0.5 : 1
+ context.globalAlpha = fade(0.5)
context.fillStyle = palette.blue
registration()
context.globalAlpha = 1
@@ -282,18 +289,18 @@ export function CoverTitle() {
]
if (move.kind === "metric" || move.kind === "grid" || move.kind === "outline") {
context.fillStyle = move.kind === "outline" ? palette.blue : palette.faint
- context.globalAlpha = done && move.kind !== "outline" ? 0.55 : 1
- // Outlines vanish under the ink once a letter is filled; the grid and metrics stay faint.
- if (!(done && move.kind === "outline")) hairline(move.from, move.to, progress)
+ // Outlines fade under the ink once the plot is done; the grid and metrics stay faint.
+ context.globalAlpha = fade(move.kind === "outline" ? 0 : 0.55)
+ hairline(move.from, move.to, progress)
context.globalAlpha = 1
segments += progress === 1 ? 1 : 0
travelled += length(move) * progress
pen = { at, down: true }
}
if (move.kind === "travel") {
- if (!done && move.phase === phase) {
+ if (move.phase === phase && settle < 1) {
context.fillStyle = palette.blue
- context.globalAlpha = 0.45
+ context.globalAlpha = 0.45 * fade(0)
hairline(move.from, move.to, progress, true)
context.globalAlpha = 1
}
@@ -308,8 +315,8 @@ export function CoverTitle() {
if (progress === 1) {
filled.add(move.letter)
context.fillStyle = palette.blue
- context.globalAlpha = done ? 0.6 : 1
- ticks(move.letter)
+ context.globalAlpha = fade(0.6)
+ ticks(move.letter, everyLabel || move.letter === 0)
context.globalAlpha = 1
} else if (shown > 0) {
const [col, row] = order[shown - 1]
@@ -334,7 +341,8 @@ export function CoverTitle() {
context.fillStyle = palette.ink
for (const letter of filled) fillLetter(letter)
- if (done || !pen) return
+ if (settle === 1 || !pen) return
+ context.globalAlpha = fade(0)
// The pen: a filled square when down, an open one when up; its position in font units beside it.
const px = X(pen.at[0])
const py = Y(pen.at[1])
@@ -361,32 +369,50 @@ export function CoverTitle() {
canvas.height - Math.round(md * 0.35),
)
context.textAlign = "left"
+ context.globalAlpha = 1
}
+ // The plot's own clock: it advances only while frames run, so pausing off screen resumes in place.
const tick = (now: number) => {
- started ??= now
- const t = now - started
- draw(t)
- frame = t < END ? requestAnimationFrame(tick) : 0
+ // A long gap (a background tab) resumes where it left off instead of skipping ahead.
+ elapsed += last === undefined ? 0 : Math.min(now - last, 100)
+ last = now
+ draw(elapsed)
+ frame = elapsed < END ? requestAnimationFrame(tick) : 0
+ }
+ const resume = () => {
+ if (reduced || frame || elapsed >= END) return
+ last = undefined
+ frame = requestAnimationFrame(tick)
}
const play = () => {
if (reduced) return
cancelAnimationFrame(frame)
- started = undefined
- frame = requestAnimationFrame(tick)
+ frame = 0
+ played = true
+ elapsed = 0
+ resume()
}
layout()
- draw(reduced ? END : 0)
+ draw(elapsed)
+ // The readout and labels are canvas text: start once the mono font is in, so they don't swap faces mid-plot.
+ const fontReady = document.fonts.load(`${10 * dpr}px "OpenTUI Mono"`).catch(() => undefined)
+ // Starts once most of the title is in view, and pauses whenever it leaves the screen.
const observer = new IntersectionObserver(
([entry]) => {
- if (!entry.isIntersecting) return
- observer.disconnect()
- if (reduced) return draw(END)
- play()
+ if (!entry.isIntersecting) {
+ cancelAnimationFrame(frame)
+ frame = 0
+ return
+ }
+ if (played) return resume()
+ if (entry.intersectionRatio < 0.6) return
+ played = true
+ void fontReady.then(play)
},
- { threshold: 0.6 },
+ { threshold: [0, 0.6] },
)
observer.observe(root)
root.addEventListener("click", play)
@@ -396,13 +422,13 @@ export function CoverTitle() {
if (root.clientWidth === width) return
width = root.clientWidth
layout()
- if (!frame) draw(END)
+ if (!frame) draw(elapsed)
})
resize.observe(root)
const repaint = () => {
layout()
- if (!frame) draw(END)
+ if (!frame) draw(elapsed)
}
const site = root.closest("[data-site]")
const themeObserver = new MutationObserver(repaint)
diff --git a/services/site/src/component/font/typewriter.tsx b/services/site/src/component/font/typewriter.tsx
index d3c35f8dbfc..067a3e118f2 100644
--- a/services/site/src/component/font/typewriter.tsx
+++ b/services/site/src/component/font/typewriter.tsx
@@ -493,6 +493,17 @@ export function Typewriter() {
})
})
+ const claim = () => (
+ <>
+ A TYPEFACE WITH{" "}
+
+ {fontContent.combinations.base}
+ {fontContent.combinations.exponent}
+ {" "}
+ POSSIBLE COMBINATIONS
+ >
+ )
+
return (
{fontContent.title}
@@ -514,16 +525,11 @@ export function Typewriter() {
{/* The server renders the starting wordmark, so the hero is never empty before hydration. */}
+ {/* Phones show the claim under the wordmark instead of in the bar; CSS shows one of the two. */}
+
{claim()}
-
- A TYPEFACE WITH{" "}
-
- {fontContent.combinations.base}
- {fontContent.combinations.exponent}
- {" "}
- POSSIBLE COMBINATIONS
-