Files
tiennm99bot/internal/modules/wordledaily/web/index.html
T
tiennm99 629b513c91 feat(games): move /wordle and /loldle to the web games and add /loldledaily
/wordle and /loldle now send the wordle and loldle BotFather games in an
unlimited mode: each player gets their own word or champion, saved after
every guess, with a New game button. Cards the bot did not record as
unlimited, including the daily cards, play the daily puzzle. The helper
commands keep working on the player's round.

/loldledaily mirrors /wordledaily: one champion per day at 07:00 ICT,
subscribe and unsubscribe, the morning recap and the live group results.

The daily and unlimited machinery is shared in util/guessgame, the old
in-chat wordle module is removed, and a one-time startup migration carries
each player's stats and unfinished round over without changing old data.
2026-10-10 09:29:48 +07:00

75 lines
3.1 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<meta name="referrer" content="no-referrer">
<meta name="color-scheme" content="light dark">
<title>Wordle</title>
<link rel="stylesheet" href="app.css">
</head>
<body>
<main class="app">
<header class="top">
<div class="title">
<h1><span id="title">Wordle</span> <span id="num"></span></h1>
<p id="subtitle" class="muted"></p>
</div>
<div class="top-actions">
<button type="button" id="new-top" class="new-top" hidden>New game</button>
<button type="button" id="contrast-btn" class="icon" aria-pressed="false" aria-label="High contrast colours" title="High contrast colours"><span aria-hidden="true">◐</span></button>
<button type="button" id="stats-btn" class="icon" aria-label="Results" title="Results" hidden><span aria-hidden="true">▤</span></button>
</div>
</header>
<section id="screen-missing" class="card" hidden>
<p class="lead">Open the game from Telegram.</p>
<p class="muted">Send <code>/wordle</code> or <code>/wordledaily</code> in a chat with the bot, then press Play.</p>
</section>
<section id="screen-game" hidden>
<div class="board-wrap">
<div id="board" class="board" role="group" aria-label="Guesses"></div>
</div>
<div id="keyboard" class="keyboard" aria-label="Keyboard"></div>
</section>
<p id="toast" class="toast" role="status" aria-live="polite" hidden></p>
<p id="announce" class="sr-only" aria-live="polite"></p>
<div id="end" class="overlay" hidden>
<section class="modal" role="dialog" aria-modal="true" aria-labelledby="end-title">
<button type="button" id="end-close" class="icon close" aria-label="Close" title="Close"><span aria-hidden="true">✕</span></button>
<h2 id="end-title"></h2>
<p id="end-answer" class="answer"></p>
<h3>Statistics</h3>
<div class="stats">
<div><strong id="st-played">0</strong><span>Played</span></div>
<div><strong id="st-pct">0</strong><span>Win %</span></div>
<div><strong id="st-cur">0</strong><span>Current Streak</span></div>
<div><strong id="st-max">0</strong><span>Max Streak</span></div>
</div>
<h3>Guess Distribution</h3>
<ol id="dist" class="dist"></ol>
<div id="end-daily">
<p class="next">Next puzzle in <strong id="countdown">--:--:--</strong></p>
<button type="button" id="next-btn" class="primary" hidden>Play the new puzzle</button>
<div class="actions">
<button type="button" id="share-btn" class="primary" hidden>Share</button>
<button type="button" id="copy-btn">Copy result</button>
</div>
</div>
<div id="end-unlimited" hidden>
<div class="actions">
<button type="button" id="new-end" class="primary">New game</button>
</div>
<p class="hint muted">Want the same word as everyone today? Send <code>/wordledaily</code>.</p>
</div>
</section>
</div>
</main>
<script src="app.js"></script>
<script src="https://telegram.org/js/games.js" async></script>
</body>
</html>