Express + node:sqlite server, vanilla HTML/JS frontend. Daily puzzle by assigned date, puzzle list, shuffle, one-away hint, shareable emoji results, and a password-protected admin page to create and edit puzzles. Answers are checked server-side and never sent before they are solved. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.3 KiB
HTML
33 lines
1.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Puzzles | NT Connections</title>
|
|
<link rel="stylesheet" href="/style.css">
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<a class="brand" href="/">NT Connections</a>
|
|
<nav><a href="/">Today</a><a href="/puzzles" aria-current="page">Puzzles</a></nav>
|
|
</header>
|
|
<main>
|
|
<h1>All puzzles</h1>
|
|
<p class="sub">Play today's, or catch up on ones you missed.</p>
|
|
<ul class="list" id="list">
|
|
<li class="skeleton"></li><li class="skeleton"></li><li class="skeleton"></li>
|
|
</ul>
|
|
</main>
|
|
<script src="/common.js"></script>
|
|
<script>
|
|
(async () => {
|
|
const $list = document.getElementById('list');
|
|
const { ok, data } = await api('/api/games');
|
|
if (!ok) return $list.replaceChildren(el('li', { class: 'empty' }, 'Could not load puzzles. Try refreshing.'));
|
|
if (!data.length) return $list.replaceChildren(el('li', { class: 'empty' }, 'No puzzles yet. Check back soon.'));
|
|
$list.replaceChildren(...data.map((g) =>
|
|
el('li', {}, el('a', { href: `/play/${g.id}` }, el('strong', {}, g.title), el('span', { class: 'meta' }, fmtDate(g.date))))));
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|