From baab21a0a75ce696d6f42036529d9963a8e1a163 Mon Sep 17 00:00:00 2001 From: Eric Wagoner Date: Wed, 23 Sep 2026 19:13:11 -0400 Subject: [PATCH] The guide and the rules page keep the room they were opened from, and carry it to each other and back Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG --- template/src/routes/guide/+page.svelte | 7 ++++++- template/src/routes/join/[code]/+page.svelte | 4 ++-- template/src/routes/rules/+page.svelte | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/template/src/routes/guide/+page.svelte b/template/src/routes/guide/+page.svelte index 3ce0b53..9407955 100644 --- a/template/src/routes/guide/+page.svelte +++ b/template/src/routes/guide/+page.svelte @@ -3,6 +3,11 @@ // screenshot per section, from the hall to a first game. Capture the // figures from the running game into static/guide/ and describe what a // new player is looking at, not what the code does. + import { page } from '$app/state'; + + /** Opened from a table, the page offers the way back to it and carries it to its cross-links. */ + const room = $derived((page.url.searchParams.get('room') ?? '').toUpperCase()); + const withRoom = $derived((path: string) => (room ? `${path}?room=${room}` : path)); @@ -11,7 +16,7 @@
- Back to the hall + {#if room}Back to your game · {/if}Back to the hall · The rules

How to play

Two sentences that set the scene and say what this page walks through.