Repository navigation
feat(site): refine the chrome and landing page, add a 404 page - #2
Merged
Merged
Conversation
…sharpen the tab icon
…out, split the cart-pole
… the tailwind in use
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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 intosrc/app/layout.tsxand its pages moved up a level, with the same URLs.Tex,ModelDetails,CartPoleDrawings,PageLoad.EmptySectionbecameSectionPage, with aPageFrameunderneath it that the 404 uses.src/lib/motion.ts: the reduced-motion query and the hero's boot clock.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 barsLanding 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 detailsHero.tsx: a press released off the logo no longer turns later hovering into scrubbingLatencyKnob.module.css: below 380 px the Unstable label hides instead of running into the deadline'sRefactor
src/lib/motion.ts: one reduced-motion query instead of three; the hero hands its boot clock to its CSS as--t0and--tick, so the animation and its legend share one sourceGrid.module.css: the figure header, figure number and caption styles, shared by the hero, the cart-pole and the timing stripssrc/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 casesCartPoleDrawings.tsx: the cart and trace drawings, out ofControlToy.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 progressvitest.config.mts: loads as an ES modulePerformance
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 onlyantialiased, 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.