Expand snippet pool with more code and add lore/flavor text
All checks were successful
Docker / build-and-push (push) Successful in 37s

8 more entries (16 total, up from 8): three more code snippets across
delve-term/stash/goonk for variety, plus five real lore/flavor text
fragments -- two from adventure's Chronicle of the Keepers (English)
and three from djupet's event log (Swedish, on purpose -- genuinely
different character set, and it's real shipped content, not filler).

Added a `type` field (code/lore) to every entry for future use (could
filter by type later) and updated the header/help-modal copy to stop
saying "code" exclusively now that it isn't.

Verified via simulated typing: a full Swedish snippet (öäå included)
types and finishes correctly with 100% accuracy, and a lore snippet
renders and completes the same as any code one.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Fredrik Johansson
2026-07-15 14:33:54 +02:00
parent 4192a05a78
commit 0828ef473d
6 changed files with 1151 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8">
<title>typo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A typing test built from your own code — real snippets from real repos.">
<meta name="description" content="A typing test built from your own code and lore — real snippets from real repos.">
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Inter:wght@400;500;600&display=swap" rel="stylesheet" />
@@ -16,7 +16,7 @@
<h1>typo</h1>
<button class="help-btn" id="help-btn" title="How this works">?</button>
</div>
<p class="hint">real code, from real repos — type it as fast and cleanly as you can</p>
<p class="hint">real code and lore, from real repos — type it as fast and cleanly as you can</p>
<div class="card" id="game-card">
<div class="source-line" id="source-line">loading a snippet…</div>
@@ -42,8 +42,8 @@
<button class="help-btn" id="close-help">&times;</button>
</div>
<ul>
<li>Every snippet is real code pulled from real, shipped repos flit, wisp, keep, stash, delve-term, goonk itself.</li>
<li>Click the code block and start typing. Timing starts on your first keystroke, not on page load.</li>
<li>Every snippet is real — either code pulled from real, shipped repos (flit, wisp, keep, stash, delve-term, goonk itself), or in-world lore/flavor text from the games (Delve's chronicle, djupet's event log — some of that in Swedish, on purpose).</li>
<li>Click the block and start typing. Timing starts on your first keystroke, not on page load.</li>
<li><strong>WPM</strong> = (correct characters / 5) / minutes elapsed — the standard typing-test formula.</li>
<li><strong>Accuracy</strong> = correct keystrokes / total keystrokes, including ones you backspaced over.</li>
<li>Mistakes are highlighted in place. You can backspace to fix them or keep going — either way, they count against accuracy.</li>