Files
moonchess/static/index.html
T
tukaunuandClaude Opus 5.5 ce6b71eb35 Serve practice mode from the main server, add mode switch, fix touch
Practice mode is now at /practice on server.py instead of a separate
server, with a button in the bottom-right corner of each page to the
other mode. Touch: no double-tap zoom, no sticky hover after a tap, no
long-press selection on the board, and a pressed look on tapped squares.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 01:47:27 +02:00

54 lines
1.9 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Moonchess</title>
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<main>
<section id="lobby">
<h1>Moonchess</h1>
<p class="lede">Tic-tac-toe, but you only get three pieces. Place a fourth and your oldest one vanishes first.</p>
<button id="create" class="primary">Generate code</button>
<div class="divider"><span>or enter any code</span></div>
<form id="join-form">
<input id="join-code" placeholder="Any code or word" maxlength="32" autocomplete="off"
autocapitalize="characters" spellcheck="false" aria-label="Game code">
<button type="submit">Join</button>
</form>
<p id="lobby-error" class="error" role="alert"></p>
</section>
<section id="game" hidden>
<header class="bar">
<div class="code-wrap">
<span class="label">Code</span>
<span id="code" class="code"></span>
<button id="copy" class="small">Copy link</button>
</div>
<button id="leave" class="small ghost">Leave</button>
</header>
<div class="players">
<div class="player" id="player-0"><span class="mark x">X</span><span class="who"></span></div>
<div class="player" id="player-1"><span class="mark o">O</span><span class="who"></span></div>
</div>
<p id="status" class="status" aria-live="polite"></p>
<div id="board" class="board" role="grid" aria-label="Board"></div>
<div class="footer">
<button id="rematch" class="primary" hidden>Rematch</button>
<p id="meta" class="meta"></p>
</div>
</section>
</main>
<a class="mode-switch" href="/practice">Practice</a>
<script src="/static/board.js"></script>
<script src="/static/app.js"></script>
</body>
</html>