Repository navigation
Redesign foundations: fonts, colours, header, footer and 404 - #36
Conversation
Self-host subsets of DejaVu Sans Mono and Newsreader (regular and italic, optical size kept) in src/fonts/, made by scripts/subset-fonts.py, and stop loading Space Mono, Roboto Mono and Poppins from Google Fonts. The colours and fonts are custom properties in src/styles/tokens.css, and the base styles, without the weight-300 body text, are in global.css. Every page is built in a new Frame component: up to 1240px wide with 24px side padding, the new header (wordmark, Home and About, the current page underlined in the accent colour) and the new footer (wordmark, About, LinkedIn, GitHub, X). The 404 page and the not-found view of /documents/ use it too and look the same. The pages not yet redesigned keep their content styles in legacy.css, under a legacy class, until #31, #32 and #33 rebuild them. The text of articles and About is now in Newsreader. Implements #29. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013MdjUerTCBDeF5DG9puDd2
|
Preview: https://pr-36-meaningfool.josselin-perrus.workers.dev Built from 7d38043 with the latest content. The link stays the same and shows the latest push. Search engines are asked not to index it. |
|
Review checkpoint: accepted, no fixes needed Head: Build and tests
Issue #29, point by point
Comparison with the prototype (
Pages outside the scope (
Secrets and personal data: none in the diff. The LinkedIn, GitHub and X links were already public on the site. Notes, not blocking
Generated by Claude Code |
Implements #29 (part of #35). This is the first unit, so the tokens, fonts, frame, header and footer are built for the later units to reuse.
What changes
src/fonts/holds Latin subsets of DejaVu Sans Mono 2.37 (24 KB) and Newsreader 1.003, regular and italic (58 KB and 65 KB). Newsreader's weight is fixed at 400 and its optical size axis is kept, which is what Google Fonts serves the prototype.scripts/subset-fonts.pyremakes the files: it downloads the originals, checks their SHA-256 and gives the same output every time. The licences sit next to the fonts. The mono subset leaves out symbols that also exist as emoji (⚙ ★ ✅), so those still show as emoji. Vite fingerprints the fonts under/_astro/, so they get the long cache, and every page preloads the mono font.public/_headers).public/fonts/space-mono-*.woff2were in fact Google 404 HTML pages, so/documents/had been falling back to the system mono font.src/styles/tokens.css): page, ink, muted, line, panel, tint and accent, plus--monoand--serif. It has no element styles, so/documents/can load it safely. Base styles (src/styles/global.css) follow the prototype: 13px/1.6 mono, links in running text underlined, and the focus ring.Framecomponent: content up to 1240px wide with 24px side padding, with the header above it and the footer below.Wordmarkis its own component, andLayoutwraps every page inFrame./documents/uses the same components and renders pixel for pixel like/404.html.src/styles/legacy.cssholds the old global styles under:where(.legacy), so each rule has the same specificity it had before. Those pages'<main>carries thelegacyclass. Only the fonts, the weights and the colours change. Article text and About text are in Newsreader; everything else is in DejaVu Sans Mono. Redesign: home page #31, Redesign: article page #32 and Redesign: About page #33 drop the class as they rebuild their page, and the last one deletes the file.Choices to check
/documents/: the portfolio view keeps its own header (wordmark and name). Only its font changes, to DejaVu Sans Mono.strongis drawn as a browser bold (600) until Redesign: article page #32 styles the text.initial-scale=1, as on the 404 page and in the prototype. The 404 page also gets the favicon and a doctype; before, it rendered in quirks mode.Validation
Head commit:
7d38043c7c0f4c48a6537d6e9177551cb5291429, on baseb30e3037a74306716125c804e3a0a8bc981f84a4. Node 24.22.1, Bun 1.4.4, content submodule atbf783ba(git submodule update --init --remote).bun install, thenbun run build: passes, 62 pages.bun run test:documents: 10 tests, 10 passed.dist/has no reference togoogleapisorgstatic. In headless Chromium,/,/about/, an article, a daily log, an unknown URL (the 404) and/documents/make no request to any other host. They load only/_astro/dejavu-sans-mono.*.woff2and, on articles and About,/_astro/newsreader.*.woff2, with no console errors apart from the expected 404 status.docs/redesign/prototype/index.htmland of the built pages):<main>content of all 62 pages is identical once the class rename and the scope attributes are set aside.<head>changes only in the viewport meta (and, on the 404 page, the favicon).rss.xml, the sitemap,_redirectsandrobots.txtare unchanged, andllms*.txtdiffer only in their build timestamp.🤖 Generated with Claude Code
https://claude.ai/code/session_013MdjUerTCBDeF5DG9puDd2