Skip to content

Game switcher: a tab on every game opens a shelf of all the games - #6

Merged
agautsc merged 1 commit into
mainfrom
games-switcher
Nov 25, 2026
Merged

agautsc merged 1 commit into
mainfrom
games-switcher

Conversation

@agautsc

@agautsc agautsc commented Nov 25, 2026

Copy link
Copy Markdown
Owner

A small tab on the left edge of every game opens a shelf with each game's cover, a Surprise me button and a link to /games/.

  • static/games/switcher.js: the whole thing, in a shadow root so it can't clash with a game's styles. Covers load only when the shelf opens.
  • One <script src="/games/switcher.js" defer></script> tag in each game page.
  • scripts/check_site.py fails the build if a game on the shelf is missing the tag (a fresh copy from a game's repo would arrive without it).
  • Dog Hog's offline cache name is bumped so returning players get the new page.

Checked in headless Edge at 1280x800 and 390x844 on all nine games: tab present, shelf opens, nine covers load, current game marked, Escape closes, no page errors, tile and Surprise me navigate. Not checked: a real tablet or phone.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GQpzxx4LjFoV4Dz7sB2og6

static/games/switcher.js adds a small tab on the left edge of each game.
It opens a shelf with every game's cover, a Surprise me button and a link
to /games/. One script tag per game page; check_site.py fails the build
if a game on the shelf is missing it. Dog Hog's offline cache name is
bumped so returning players get the new page.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GQpzxx4LjFoV4Dz7sB2og6
@agautsc
agautsc merged commit bb9a227 into main Nov 25, 2026
2 checks passed
@agautsc
agautsc deleted the games-switcher branch November 25, 2026 02:07
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