feat: redesign the site and drop the projects pages #6

Merged
magndotcc merged 2 commits from t3/redesign-blog-style into main 2026-10-07 17:26:31 +00:00
Owner

What this changes

A full redesign of the HTML site. Routes, /md, /rss, the GPG and WKD paths, and the post markdown files are untouched apart from what is listed here.

Look

  • One flat warm background: #262624 in dark mode, #f0eee6 in light mode. No gradients or glows.
  • A single pink accent (#f283b6 dark, #c93d7c light) on links, the tree marker, footnotes, commit hashes and the activity graph.
  • Geist for text and JetBrains Mono for labels, served from Bunny Fonts.
  • UI text uses normal capitalization (Magnus Eickhoff, Blog / About, Published). Post titles and post text are left exactly as written.

Navigation

  • Internal links are fetched on hover, focus or touch, so a click only swaps <main> and does not load a new document.
  • The swap runs inside a view transition, and the clicked post title morphs into the post heading. Going back morphs it into the list again. Back and forward keep scroll position, and footnote #hash links stay on the page.
  • Browsers without view transitions get the instant swap with no animation. If a fetch fails, the click falls back to a normal page load.

Posts

  • The header shows Published and Reading time under small └ branches, plus an optional pixel-art icon above the title when the post sets heroImage and pixelated.
  • A reading tree built from the post's headings, with a ▓▓░░ 42% progress bar and j/k to jump between sections. It sits beside the post on wide screens and collapses into a bottom bar on narrow ones.
  • An "Up next" link at the end of each post.
  • Tags are no longer rendered anywhere. The frontmatter still parses them.

About

  • Rendered on the server instead of loading in the browser, so there is no skeleton state.
  • Activity is cached in KV under activity:v1, served fresh for 10 minutes, then served stale while it refreshes in the background. The KV entry lasts 7 days.
  • The home page prefetches /about when the browser is idle.
  • Duplicate commits from repos mirrored to several forges are removed.
  • /api/activity reads from the same cache.

Removed

  • The projects pages and src/lib/projects.ts. /projects, /project/* and /md/project* redirect with a 302. The projects/ folder and its R2 upload in the deploy workflow are left as they are.

Smaller

  • Render cache keys move to rendered:v2: so stale pages in the old layout are not served after deploy.
  • The activity SVG gets a viewBox so it scales to the column width.
  • Excerpts skip a leading heading and flatten markdown links, so posts that open with # still get one.
  • npm run dev passes SKIP_RENDER_CACHE so template edits show up without waiting out the KV TTL, and forwards extra arguments to wrangler dev.

Testing

Ran wrangler dev and checked in headless Chromium at 1440, 1100 and 390 px wide, in dark and light mode:

  • /, every post, /about, /md, /md/about and /rss return 200; an unknown path returns 404; the project routes return 302
  • clicking a post swaps the page without a reload, the title morphs, and back returns to the list at the same scroll position
  • hovering a post link fetches it ahead of the click
  • the reading tree highlights the current section, the bar fills on scroll, and j jumps to the next section
  • the mobile tree bar opens and closes
  • /about takes about 2.5 s on a cold start and about 10 ms once cached
  • no console errors on any page
  • tsc --noEmit clean

Before merging

  • The site now loads fonts from fonts.bunny.net, one external request it did not make before.
  • The pixel Claude on "my history with anthropic" is still orange because the colour is in the image itself.
## What this changes A full redesign of the HTML site. Routes, `/md`, `/rss`, the GPG and WKD paths, and the post markdown files are untouched apart from what is listed here. **Look** - One flat warm background: `#262624` in dark mode, `#f0eee6` in light mode. No gradients or glows. - A single pink accent (`#f283b6` dark, `#c93d7c` light) on links, the tree marker, footnotes, commit hashes and the activity graph. - Geist for text and JetBrains Mono for labels, served from Bunny Fonts. - UI text uses normal capitalization (`Magnus Eickhoff`, `Blog / About`, `Published`). Post titles and post text are left exactly as written. **Navigation** - Internal links are fetched on hover, focus or touch, so a click only swaps `<main>` and does not load a new document. - The swap runs inside a view transition, and the clicked post title morphs into the post heading. Going back morphs it into the list again. Back and forward keep scroll position, and footnote `#hash` links stay on the page. - Browsers without view transitions get the instant swap with no animation. If a fetch fails, the click falls back to a normal page load. **Posts** - The header shows `Published` and `Reading time` under small `└` branches, plus an optional pixel-art icon above the title when the post sets `heroImage` and `pixelated`. - A reading tree built from the post's headings, with a `▓▓░░ 42%` progress bar and `j`/`k` to jump between sections. It sits beside the post on wide screens and collapses into a bottom bar on narrow ones. - An "Up next" link at the end of each post. - Tags are no longer rendered anywhere. The frontmatter still parses them. **About** - Rendered on the server instead of loading in the browser, so there is no skeleton state. - Activity is cached in KV under `activity:v1`, served fresh for 10 minutes, then served stale while it refreshes in the background. The KV entry lasts 7 days. - The home page prefetches `/about` when the browser is idle. - Duplicate commits from repos mirrored to several forges are removed. - `/api/activity` reads from the same cache. **Removed** - The projects pages and `src/lib/projects.ts`. `/projects`, `/project/*` and `/md/project*` redirect with a 302. The `projects/` folder and its R2 upload in the deploy workflow are left as they are. **Smaller** - Render cache keys move to `rendered:v2:` so stale pages in the old layout are not served after deploy. - The activity SVG gets a `viewBox` so it scales to the column width. - Excerpts skip a leading heading and flatten markdown links, so posts that open with `#` still get one. - `npm run dev` passes `SKIP_RENDER_CACHE` so template edits show up without waiting out the KV TTL, and forwards extra arguments to `wrangler dev`. ## Testing Ran `wrangler dev` and checked in headless Chromium at 1440, 1100 and 390 px wide, in dark and light mode: - `/`, every post, `/about`, `/md`, `/md/about` and `/rss` return 200; an unknown path returns 404; the project routes return 302 - clicking a post swaps the page without a reload, the title morphs, and back returns to the list at the same scroll position - hovering a post link fetches it ahead of the click - the reading tree highlights the current section, the bar fills on scroll, and `j` jumps to the next section - the mobile tree bar opens and closes - `/about` takes about 2.5 s on a cold start and about 10 ms once cached - no console errors on any page - `tsc --noEmit` clean ## Before merging - The site now loads fonts from `fonts.bunny.net`, one external request it did not make before. - The pixel Claude on "my history with anthropic" is still orange because the colour is in the image itself.
Replace the monochrome terminal look with a calmer layout on a single
warm background, with a pink accent and Geist plus JetBrains Mono.

Posts open in place: links are fetched on hover, a click swaps <main>
inside a view transition, and the post title morphs between the list
and the post heading in both directions. Posts get a published and
reading time header and a reading tree with a scroll progress bar.

Tags are no longer rendered. The projects pages are removed and their
routes redirect home. The about page is rendered on the server from
activity cached in KV, so it no longer loads in client side.
Bring back the email, matrix and gpg rows with the label beside the value, and the sentence linking to the forges, instead of the tree-style facts row.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
magndotcc/blog!6
No description provided.