Files
wyrm/src/routes/rules/+page.svelte
T

48 lines
1.7 KiB
Svelte

<script lang="ts">
// The rules page: the game's own text, structured for reading mid-game.
// Keep the original rules text verbatim in docs/ and render from it
// where you can, so the page and the engine follow one source.
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 = (path: string) => (room ? `${path}?room=${room}` : path);
</script>
<svelte:head>
<title>Wyrm: the rules</title>
</svelte:head>
<main class="reading">
<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={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>
<section id="turn">
<h2>A turn</h2>
<p>What each player does on a turn, in order, in short paragraphs. Put the thing a player checks mid-game first.</p>
</section>
<section id="winning">
<h2>Winning</h2>
<p>How the game ends and who wins, including draws.</p>
</section>
<section id="source">
<h2>The original text</h2>
<p>The full source text, in collapsible sections, so a rules question can be settled by the words the engine follows.</p>
</section>
<p class="word">If this page reads a rule differently from the original text, that is a bug. Please <a href="mailto:eric@ericwagoner.com">send word</a>.</p>
</main>
<style>
.word {
margin-top: 2rem;
color: var(--bone-faint);
font-size: 0.9rem;
}
</style>