Skip to content

gitflarePublicPartly agent-ready40

sketch-rush

Multiplayer draw-and-guess game on Cloudflare Workers, Durable Objects and D1.

Add the Apache-2.0 licencedbe1e99
HTML50 lines2.3 KB
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><title>Sketch Rush</title><link rel="stylesheet" href="/style.css"></head><body><main id="landing">  <h1>Sketch <span>Rush</span></h1>  <svg class="wob" viewBox="0 0 200 12" aria-hidden="true"><path d="M2 8 Q25 1 50 7 T100 6 T150 8 T198 5" fill="none" stroke="#222" stroke-width="3" stroke-linecap="round"/></svg>  <p class="live" id="live">…</p>  <input id="name" maxlength="16" placeholder="Your name" autocomplete="off">  <div class="row">    <button id="quick">Quick play</button>    <button id="create" class="alt">Create private room</button>  </div>  <p id="err"></p>  <div class="cards">    <section><h2>How to play</h2><ol><li>Pick a word and draw it.</li><li>Others guess in chat. Faster = more points.</li><li>3 rounds, everyone draws once per round.</li></ol></section>    <section><h2>Leaderboard</h2><ol id="board-list"><li class="dim">loading…</li></ol></section>  </div></main>  <div id="joinsheet" hidden><h2>Join room <b id="jcode"></b></h2><input id="jname" maxlength="16" placeholder="Your name" autocomplete="off"><button id="jgo">Join</button></div><section id="game" hidden>  <header id="hud">    <span id="phase"></span>    <span id="wait" hidden></span><span id="mask" aria-live="polite"></span>    <svg id="ring" viewBox="0 0 36 36"><circle class="bg" cx="18" cy="18" r="15"/><circle id="ringfg" cx="18" cy="18" r="15"/></svg>    <span id="timer"></span>    <button id="invite" title="Copy invite link">Invite</button>    <span id="badge" class="badge" hidden>reconnecting…</span>    <span id="spec" class="badge" hidden>spectating</span>    <span id="dbg" hidden></span>  </header>  <div id="main">    <div id="stage"><canvas id="board"></canvas><div id="toast" hidden></div><div id="banner" hidden></div></div>    <aside id="side"><ol id="scores"></ol><ul id="chat"></ul>      <form id="guessForm"><input id="guess" maxlength="64" placeholder="Type your guess…" autocomplete="off"></form>    </aside>  </div>  <div id="tools" hidden></div>  <div id="modal" hidden><div id="choices"></div></div>  <div id="results" hidden><h2>Results</h2><div id="podium"></div><p id="next"></p></div></section><script type="module" src="/app.js"></script></body></html>