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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jm2auWk6RP71CjaAb4FMoG
This commit is contained in:
1 parent
c0254e3fe9
commit
baab21a0a7
3 files changed
+10
-4
No files matched your search
@@ -6,6 +6,7 @@
|
||||
|
||||
/** Opened from a table, the page offers the way back to it. */
|
||||
const room = $derived((page.url.searchParams.get('room') ?? '').toUpperCase());
|
||||
const withRoom = $derived((path: string) => (room ? `${path}?room=${room}` : path));
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -14,7 +15,7 @@
|
||||
|
||||
<main class="rules">
|
||||
<header>
|
||||
{#if room}<a class="back" href={`/join/${room}`}>Back to your game</a> · {/if}<a class="back" href="/">Back to the hall</a> · <a class="back" href="/guide">How to play</a>
|
||||
{#if room}<a class="back" href={`/join/${room}`}>Back to your game</a> · {/if}<a class="back" href="/">Back to the hall</a> · <a class="back" href={withRoom('/guide')}>How to play</a>
|
||||
<h1>The rules</h1>
|
||||
<p class="lede">One paragraph on where these rules come from and which edition or text this page follows.</p>
|
||||
</header>
|
||||
|
||||
Reference in new issue
Block a user