Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ The home page lists one **Games Hub** card (`games/`). Individual games live on
- **Word Scramble** (`games/words/`) — unscramble a common word; best streak
- **Reaction Tap** (`games/reaction/`) — wait for gold, tap fast; best average ms
- **Tap Order** (`games/order/`) — tap 1–9 in order on a 3×3 grid; best time
- **Casual Quiz** (`games/quiz/`) — multiple-choice on India, Tamil Nadu, science, technology, and more, plus a General mix. Switch topic or level anytime. Marks stay in `localStorage`. Questions live only in `games/quiz/questions.json`.

#### How to add or change quiz questions

Edit `games/quiz/questions.json` only. The page reads topics, levels, and questions from that file.

1. **New question** — append an object to `questions` with unique kebab-case `id`, existing `topic` and `level` ids, `question`, `options` (2+ strings), `answer` (must match one option exactly), `hint`, and `explain`.
2. **New topic** — append `{ "id": "my-topic", "name": "My Topic", "blurb": "…" }` to `topics`, then add questions with `"topic": "my-topic"`. A topic with `"mix": true` (General) automatically includes every other topic — do not add questions to a mix topic.
3. **New level** — append `{ "id": "expert", "name": "Expert", "points": 4 }` to `levels`, then tag questions with that `level`. Optional per-question `"points"` overrides the level value.
4. Run `node scripts/site-check.mjs` before opening a PR.

### AI

Expand All @@ -103,7 +113,7 @@ Instruction packs and prompts for **GitHub Copilot**, **Claude Code**, and **Cod

GitHub Actions workflow `.github/workflows/site-checks.yml` runs on pull requests and pushes to `main`:

- Validates Skillbook / Promptbook JSON shape
- Validates Skillbook / Promptbook / Casual Quiz JSON shape
- Ensures every tool path listed in `assets/site.js` has a matching `index.html`
- Basic HTML well-formedness for tool pages

Expand Down
120 changes: 120 additions & 0 deletions assets/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,124 @@ body[data-tool="collab"] .site-footer { display: none; }
}
.order-cell:disabled { cursor: default; }

/* Casual Quiz */
.quiz-pickers { margin: 0 0 1rem; }
.quiz-picker-row { margin-bottom: 0.65rem; }
.quiz-picker-row .label { margin-bottom: 0.4rem; }
.quiz-picker-row .book-chips { margin: 0; }
.quiz-card {
max-width: 640px;
margin: 0 auto;
}
.quiz-meta {
margin: 0 0 0.55rem;
font-size: 0.72rem;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--color-accent);
}
.quiz-question {
margin: 0 0 1rem;
font-size: clamp(1.05rem, 2.6vw, 1.4rem);
font-weight: 800;
letter-spacing: -0.02em;
line-height: 1.35;
overflow-wrap: anywhere;
}
.quiz-options {
display: grid;
gap: 0.55rem;
}
.quiz-option {
display: flex;
align-items: flex-start;
gap: 0.7rem;
width: 100%;
text-align: left;
min-height: 52px;
padding: 0.85rem 0.95rem;
border-radius: 12px;
border: 1px solid var(--color-line);
background: var(--color-input);
color: var(--color-text);
font-weight: 700;
font-size: 0.95rem;
line-height: 1.35;
cursor: pointer;
font-family: inherit;
user-select: none;
-webkit-tap-highlight-color: transparent;
transition: border-color 0.12s ease, background 0.12s ease, transform 0.08s ease;
}
.quiz-option:hover:not(:disabled) {
border-color: rgba(255, 195, 0, 0.55);
color: var(--color-text);
}
.quiz-option:active:not(:disabled) {
transform: scale(0.99);
}
.quiz-option:disabled { cursor: default; }
.quiz-option-key {
flex: 0 0 1.6rem;
width: 1.6rem;
height: 1.6rem;
border-radius: 8px;
border: 1px solid rgba(255, 195, 0, 0.35);
background: rgba(255, 195, 0, 0.1);
color: var(--color-accent);
font-size: 0.75rem;
font-weight: 800;
display: inline-flex;
align-items: center;
justify-content: center;
margin-top: 0.05rem;
}
.quiz-option.is-correct {
border-color: rgba(74, 222, 128, 0.55);
background: rgba(74, 222, 128, 0.12);
color: var(--color-ok);
}
.quiz-option.is-correct .quiz-option-key {
border-color: rgba(74, 222, 128, 0.55);
color: var(--color-ok);
background: rgba(74, 222, 128, 0.16);
}
.quiz-option.is-wrong {
border-color: rgba(248, 113, 113, 0.7);
background: rgba(248, 113, 113, 0.12);
color: var(--color-error);
}
.quiz-option.is-wrong .quiz-option-key {
border-color: rgba(248, 113, 113, 0.55);
color: var(--color-error);
background: rgba(248, 113, 113, 0.16);
}
.quiz-actions {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 1rem;
}
.quiz-help {
margin: 0.85rem 0 0;
padding: 0.75rem 0.85rem;
border-radius: 10px;
border: 1px solid var(--color-line);
background: rgba(8, 14, 26, 0.55);
color: var(--color-muted);
font-size: 0.88rem;
line-height: 1.45;
}
.quiz-help.ok {
border-color: rgba(74, 222, 128, 0.35);
color: var(--color-ok);
}
.quiz-help.err {
border-color: rgba(248, 113, 113, 0.35);
color: var(--color-text);
}

@media (max-width: 420px) {
.memory-grid,
.slide-grid {
Expand All @@ -887,4 +1005,6 @@ body[data-tool="collab"] .site-footer { display: none; }
min-height: 56px;
font-size: 1.25rem;
}
.quiz-option { min-height: 56px; }
.quiz-actions .btn { flex: 1 1 calc(50% - 0.5rem); }
}
7 changes: 6 additions & 1 deletion games/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Focus Games | RMKR Toolkit</title>
<meta name="description" content="Simple browser focus games — memory, sequence, number slide, word scramble, reaction tap, and tap order. No accounts, works offline after load.">
<meta name="description" content="Simple browser focus games — memory, sequence, number slide, word scramble, reaction tap, tap order, and a casual quiz. No accounts, works offline after load.">
<link rel="icon" type="image/svg+xml" href="../assets/favicon.svg">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;900&display=swap" rel="stylesheet">
Expand Down Expand Up @@ -41,13 +41,18 @@ <h3>Reaction Tap</h3>
<h3>Tap Order</h3>
<p>Numbers 1–9 are shuffled on a 3×3 grid. Tap them in order as fast as you can.</p>
</a>
<a class="tool-card ai-card-accent" href="quiz/">
<h3>Casual Quiz</h3>
<p>Multiple-choice on India, Tamil Nadu, science, tech, and more. Switch topic or level anytime.</p>
</a>
</div>

<h2 class="section-title">How it works</h2>
<div class="card">
<ul>
<li>Everything runs client-side — nothing is uploaded.</li>
<li>Best score / streak values use <code>localStorage</code> keys prefixed with <code>rmkr-game-</code>.</li>
<li>Casual Quiz questions, topics, and levels live in <code>quiz/questions.json</code> — update that file to add more.</li>
<li>No ads, accounts, or external game CDNs.</li>
</ul>
</div>
Expand Down
Loading
Loading