Skip to content

Site refresh: thumbnails, cards and list views, self-hosted fonts, category pages - #131

Merged
TMHSDigital merged 12 commits into
mainfrom
site-refresh
Oct 23, 2026
Merged

TMHSDigital merged 12 commits into
mainfrom
site-refresh

Conversation

@TMHSDigital

Copy link
Copy Markdown
Owner

Refines the GitHub Pages site in place: the assets now carry the page, the homepage loads fast on a phone, and the audit's layout items are fixed. Same palette, type and copy voice as before.

Spec: docs/superpowers/specs/2026-10-23-site-refresh-design.md. Plan: docs/superpowers/plans/2026-10-23-site-refresh.md.

What changed

  • Thumbnails, licence-gated. npm run thumbs (site/thumbs.mjs) fetches each eligible entry's own og:image, resizes it to 640 px WebP with ffmpeg and commits it under site/public/thumbs/ with a record in site/thumbs.json. Only status: active entries whose licence is on the allowlist in site/lib/thumbs.mjs (CC0, CC-BY, MIT, OFL, GPL and the other open licences that allow a resized copy) get one. custom, varies and unknown never do; GitHub and Google Fonts pages are skipped (social card, logo); an image three or more entries share is treated as a logo and dropped. preview: none opts an entry out (set on three entries whose page image is the publisher's general promo), preview: <https url> pins a checked image. The validator fails when a committed image no longer passes the gate, and the script removes it on its next run. First batch: 192 thumbnails, 4.4 MB. Monthly refresh: .github/workflows/thumbs.yml pushes a thumbs/<month> branch and opens an issue with the compare link (Actions cannot open pull requests here).
  • One entry template. site/lib/cards.mjs renders every entry for the build, app.js, the stack pages and the new category pages. Cards and List are the same markup under data-view; each category heading has a Cards / List toggle (views.js) whose choice is remembered per kind of category. Entries without an image get a typographic tile.
  • Homepage. New hero with the count and the promise, a filmstrip of real previews, six cards or eight rows per category with "Show all N" linking to a static category/<id>/ page (with JavaScript the link opens the category in place). Search results use the list form. The homepage HTML drops from 692 KB to 139 KB and the catalog ships once, in data.js.
  • Entry and stack pages. The preview as a header strip with its credit line, one primary action ("Go to source") with the rest as links, facts in the body face, 44 px copy buttons on touch screens. Stack picks render as cards with the need above and the reason below.
  • Fonts. Public Sans and IBM Plex Mono self-hosted under site/public/fonts/ (latin WOFF2, OFL); one shared <head> helper emits icon, preloads and stylesheet for every page type; the page checks refuse Google Fonts.
  • Audit fixes. Group headings read "3D, 77 entries" to assistive tech; the 4 px commercial-use edge bar is a dot before the flags; the 3 px side tab on notes is gone; the phone header is a brand row plus a scrolling 44 px nav row; the floating Search button sits bottom-left and steps aside while a card's links have focus; every thumbnail has width, height, lazy loading.

Numbers (Lighthouse, mobile, homepage)

before after
Performance 0.83 0.91
CLS 0.092 0
Accessibility / Best practices / SEO 1 / 1 / 1 1 / 1 / 1
index.html 631 KB 139 KB

Checks

npm run check green (163 + 629 assertions, validate, build with page checks on 433 pages). Lighthouse accessibility, best practices and SEO are 1 on the homepage, a category page and a stack page. Reviewed by a fresh reviewer; its five findings (shortlist buttons on lazily rendered cards, the "Show all" scroll target, heading levels on the new pages, three promo images, an over-strict licence-drift check) are fixed in the last commit. Detector: one static false positive left (the heading size uses clamp()).

Note on the diff: site/lib/exports.mjs, site/lib/freshness.mjs, site/lib/stack-page.mjs and site/README.md were CRLF and are now LF, so their diffs show whole files; the real changes in them are small.

Closes #75
Closes #87

🤖 Generated with Claude Code

TMHSDigital and others added 12 commits October 23, 2026 17:45
…s, perf)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
node site/thumbs.mjs fetches each eligible entry's og:image, resizes it with
ffmpeg to 640px WebP and keeps site/thumbs.json in step; the validator fails
when a committed image no longer passes the licence and status gate.

First batch: 195 thumbnails, 4.5 MB. 177 entries skipped by the gate
(custom/varies/unknown licences, needs-review, GitHub and Google Fonts
hosts), 44 failed (41 pages without og:image, 2 unconvertible images, 1 404).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Closes #87

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…list views

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…mobile header

Closes #75

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ards

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… round

Lazy card rendering in app.js (the hydrate no longer builds 348 cards at
load), a focus class instead of a :has() selector for the floating button,
a fixed heading height so the injected view toggle cannot shift the page,
font-display: optional with the preloads, the last side-tab declaration
removed, and the social card retaken for the new hero.

Lighthouse mobile, homepage: performance 0.91 (was 0.83), CLS 0 (was 0.092),
TBT 220 ms, accessibility 1, best practices 1, SEO 1.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ding levels, promo images, drift check

- shortlist.js wires its buttons again when app.js renders the rest of the
  catalog (fgda:cards-rendered), so every card can be starred.
- "Show all" in place scrolls to the first card of the list; the category
  headings are hidden under a category filter.
- Category pages use h2 group headings and h3 card titles, stack picks h3,
  so no page skips a heading level (Lighthouse heading-order 1 on both).
- preview: none on three entries whose og:image is the publisher's general
  promo (kenney-animated-characters, blender-ellie-poses,
  blender-human-base-meshes); 192 thumbnails remain.
- checkThumbManifest fails only when the gate fails; a licence that moved
  between two allowed values no longer turns a correction PR red.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@TMHSDigital
TMHSDigital merged commit 69387df into main Oct 23, 2026
3 checks passed
@TMHSDigital
TMHSDigital deleted the site-refresh branch October 23, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant