Skip to content

feat(site): refine the chrome and landing page, add a 404 page - #2

Merged
dark-sorceror merged 5 commits into
mainfrom
feat/site-polish
Oct 26, 2026
Merged

dark-sorceror merged 5 commits into
mainfrom
feat/site-polish

Conversation

@dark-sorceror

Copy link
Copy Markdown
Member

Summary

A second pass over ml3labs.com. The nav stops repeating the name next to the logo, the footer is rebuilt, the cart-pole's copy and math are corrected, and the site gets a 404 page. Under that, a refactor and performance pass that leaves the pages' markup as it was.

The cart-pole line used to say it falls past 96 ms. Just past the deadline the ±20 N motor can hold it in a steady wobble instead, so it now says what the simulation shows: past the deadline it can no longer settle, and further on it falls.

How it works

next build (output: "export")
  → ControlSection runs the cart-pole simulation: the deadline and the linear delay margin
  → Tex typesets the control law, d and θ with KaTeX into plain HTML
    → ControlToy, a client component, receives that HTML as props
  → not-found.tsx renders inside the root layout and is written to 404.html,
    which GitHub Pages serves for any path it has no file for
In the browser
  → the live cart-pole carries on from a copy of the 8 s warm-up the server drew
  → the footer reads the page's Navigation Timing entry once loading finishes

Key invariants: every page, the 404 included, renders inside one root layout with the site's chrome, and KaTeX runs only at build time: the browser gets its stylesheet and fonts, never the library.

Structure

  • src/app/(site)/ is gone. Its layout merged into src/app/layout.tsx and its pages moved up a level, with the same URLs.
  • New components: Tex, ModelDetails, CartPoleDrawings, PageLoad. EmptySection became SectionPage, with a PageFrame underneath it that the 404 uses.
  • New src/lib/motion.ts: the reduced-motion query and the hero's boot clock.
  • Brand images and fonts use lowercase kebab-case names (ml3-logo-light.png, ml3-mark.svg, inter-tight-medium.ttf).

What's included

Chrome

  • Nav.tsx: the logo with "McMaster / Low Latency Labs" beside it in the label type, rather than a second "ML³"
  • Footer.tsx, PageLoad.tsx: the mark large in the label column; this page's load time (first byte, DOM ready, loaded) measured in the visitor's browser; Pages and Reach us columns at the right, ending where the deadline would be. Phones end on the links.
  • icon.svg, favicon.ico: the mark cropped to fill the tab icon; the SVG switches to the dark logo's colors on dark tab bars

Landing page

  • ControlSection.tsx: "Past 96 ms it can no longer settle. Push further and it falls."
  • Tex.tsx, ModelDetails.tsx: KaTeX for the control law and every d and θ. The Greek letters had fallen back to a system font.
  • ControlToy.tsx: a simulation started after the knob has moved runs at the knob's delay; after a resize the live pose is restored before paint; the figure's accessible name is its caption sentence, not the whole caption with the model details
  • Hero.tsx: a press released off the logo no longer turns later hovering into scrubbing
  • LatencyKnob.module.css: below 380 px the Unstable label hides instead of running into the deadline's

Refactor

  • src/lib/motion.ts: one reduced-motion query instead of three; the hero hands its boot clock to its CSS as --t0 and --tick, so the animation and its legend share one source
  • Grid.module.css: the figure header, figure number and caption styles, shared by the hero, the cart-pole and the timing strips
  • src/app/layout.tsx: the chrome in the root layout; only the landing page claims the canonical /
  • SectionPage.tsx: Contact passes its own email, links and caption instead of four special cases
  • CartPoleDrawings.tsx: the cart and trace drawings, out of ControlToy.tsx (757 lines to 459)
  • TimingStrip.tsx: measures where the waveforms start, the padding and its height from CSS instead of repeating them
  • .github/workflows/deploy.yaml: pull requests get lint, typecheck, test and build without a deploy; only the deploy job can write to Pages; a newer push no longer cancels a deploy in progress
  • vitest.config.mts: loads as an ES module

Performance

  • ControlToy.tsx, cartpole.ts: the live simulation carries on from a clone of the still frame instead of running the 8 s warm-up a second time during hydration. The first frame is memoised, and the live pose is re-applied on resize rather than after every knob input.
  • globals.css: Tailwind generates only antialiased, the one utility in use (7.4 KB to 4.7 KB)

Pages

  • not-found.tsx: the 404 in the section-page layout. "Not found", a timing strip where REQ goes up and no ACK ever comes, and Home and Contact buttons. Not indexed and no canonical URL.
  • sponsors/, get-involved/: an Email us button. The landing page's two calls to action lead here, and both pages were dead ends.

@dark-sorceror
dark-sorceror merged commit e8a3193 into main Oct 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant