-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
407 lines (391 loc) · 21.8 KB
/
index.html
File metadata and controls
407 lines (391 loc) · 21.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes, viewport-fit=cover">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- SEO -->
<title>FlashCards – Create, Study & Print Flashcards</title>
<meta name="description" content="Create and study flashcard sets in your browser. Add rounds, import/export JSON, print to PDF, and use offline. Works on desktop and mobile.">
<meta name="keywords" content="flashcards, study, quiz, learning, print flashcards, offline study">
<meta name="author" content="FlashCards">
<meta name="theme-color" content="#0a0a0a">
<link rel="canonical" href="https://flashcards.aspenini.com/">
<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://flashcards.aspenini.com/">
<meta property="og:title" content="FlashCards – Create, Study & Print Flashcards">
<meta property="og:description" content="Create and study flashcard sets in your browser. Add rounds, import/export JSON, print to PDF, and use offline.">
<meta property="og:image" content="https://flashcards.aspenini.com/img/sandy-bowling-approved.png">
<meta property="og:image:width" content="256">
<meta property="og:image:height" content="256">
<meta property="og:site_name" content="FlashCards">
<meta property="og:locale" content="en_US">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary">
<meta name="twitter:url" content="https://flashcards.aspenini.com/">
<meta name="twitter:title" content="FlashCards – Create, Study & Print Flashcards">
<meta name="twitter:description" content="Create and study flashcard sets in your browser. Add rounds, import/export JSON, print to PDF, and use offline.">
<meta name="twitter:image" content="https://flashcards.aspenini.com/img/sandy-bowling-approved.png">
<!-- PWA -->
<link rel="manifest" href="manifest.webmanifest">
<link rel="apple-touch-icon" href="img/sandy-bowling-approved.png">
<link rel="icon" type="image/x-icon" href="img/sandy-bowling-approved.ico">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" />
<!-- Standalone detection + theme (before first paint to avoid flash) -->
<script>
(function() {
var isStandalone = window.matchMedia('(display-mode: standalone)').matches || !!navigator.standalone;
if (isStandalone) document.documentElement.classList.add('standalone');
var theme = localStorage.getItem('appTheme') || 'dark';
document.documentElement.setAttribute('data-theme', theme);
})();
</script>
</head>
<body>
<img id="pdfLogo" src="img/logo.png" alt="" hidden>
<div class="container">
<!-- Main Menu View -->
<div id="mainView" class="view active" role="region" aria-label="Home">
<div class="main-header">
<div class="header-top">
<div class="site-logo">
<img id="siteLogo" src="img/logo.png" alt="FlashCards">
<h1 id="siteLogoFallback" class="site-logo-fallback">FlashCards</h1>
</div>
<div class="theme-select-row theme-select-row-main">
<label for="themeSelectMain">Theme</label>
<select id="themeSelectMain" class="theme-select" title="Choose theme" aria-label="Choose theme">
<option value="dark">Dark</option>
<option value="light">Light</option>
<option value="ocean">Ocean</option>
<option value="forest">Forest</option>
<option value="sunset">Sunset</option>
</select>
</div>
</div>
<div class="button-group">
<button id="createSetBtn" class="btn btn-primary">Create New Set</button>
<button id="studyBtn" class="btn btn-primary" disabled>Study</button>
<button id="importSetBtn" class="btn btn-secondary">Import Set</button>
<button id="printBtn" class="btn btn-secondary">Print</button>
</div>
</div>
<input type="file" id="importFileInput" accept=".json" style="display: none;">
<div class="sets-container">
<div id="bundledSetsContainer" style="display: none;">
<h2>Bundled Sets</h2>
<div id="bundledSetsList" class="sets-list"></div>
</div>
<h2>Your Sets</h2>
<div id="setsList" class="sets-list">
<p class="empty-message">No sets yet. Create your first set to get started!</p>
</div>
</div>
<div class="version-info">v0.5.0</div>
</div>
<!-- Create/Edit Set View -->
<div id="setEditorView" class="view" role="region" aria-label="Set editor">
<div class="editor-header">
<button id="backToMainBtn" class="btn btn-secondary">← Back</button>
<h2 id="editorTitle">Create New Set</h2>
<button id="newSetBtn" class="btn btn-secondary btn-small" type="button">New set</button>
</div>
<div class="form-group">
<label for="setName">Set Name</label>
<input type="text" id="setName" placeholder="Enter set name" maxlength="50">
</div>
<div class="form-group">
<label for="setYear">Year (optional)</label>
<input type="text" id="setYear" placeholder="e.g. 2024 or 2024-2025" maxlength="20">
<span class="hint">Single year or range like 2025-2026</span>
</div>
<div class="form-group">
<label for="setCreator">Creator (optional)</label>
<input type="text" id="setCreator" placeholder="e.g. Your name or organization" maxlength="80">
</div>
<div class="form-group">
<label for="setSubject">Subject (optional)</label>
<input type="text" id="setSubject" placeholder="e.g. Science, History" maxlength="50">
</div>
<div class="form-group">
<label for="setColor">Color (optional)</label>
<div class="color-input-row">
<input type="color" id="setColor" value="#6b7280" title="Set card accent color">
<input type="text" id="setColorText" placeholder="#6b7280" maxlength="9" class="color-text-input">
</div>
<span class="hint">Shown in the top-right corner of the set card on the homepage</span>
</div>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="roundsEnabled">
<span>Enable Rounds (group cards into rounds)</span>
</label>
</div>
<div id="roundsSection" style="display: none;" class="rounds-section">
<div class="rounds-header">
<h3>Rounds</h3>
<button id="addRoundBtn" class="btn btn-secondary btn-small">+ Add Round</button>
</div>
<div id="roundsList" class="rounds-list"></div>
</div>
<div class="cards-editor">
<div class="cards-header">
<h3>Cards</h3>
<div class="cards-header-actions">
<button id="addCardBtn" class="btn btn-small">+ Add Card</button>
</div>
</div>
<div id="cardsList" class="cards-list"></div>
</div>
<div class="editor-actions">
<button id="saveSetBtn" class="btn btn-primary">Save Set</button>
<button id="deleteSetBtn" class="btn btn-danger" style="display: none;">Delete Set</button>
</div>
</div>
<!-- Study Setup View -->
<div id="studySetupView" class="view" role="region" aria-label="Study setup">
<div class="setup-header">
<button id="backToMainFromSetupBtn" class="btn btn-secondary">← Back</button>
<h2>Study Setup</h2>
</div>
<div class="setup-content">
<div class="form-group">
<label for="selectedSet">Select Set</label>
<select id="selectedSet" class="select-input"></select>
</div>
<div class="form-group" id="roundSelectGroup" style="display: none;">
<label for="selectedRound">Select Round</label>
<select id="selectedRound" class="select-input">
<option value="">All Rounds</option>
</select>
</div>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="progressiveMode">
<span>Progressive Mode (questions shown in order, can add more before answering)</span>
</label>
</div>
<div class="form-group">
<label class="checkbox-label">
<input type="checkbox" id="moderatorMode">
<span>Moderator Mode (show question & answer together, manage players & points)</span>
</label>
</div>
<button id="startStudyBtn" class="btn btn-primary">Start Studying</button>
</div>
</div>
<!-- Study View -->
<div id="studyView" class="view" role="region" aria-label="Study">
<div class="study-header">
<div class="progress-info">
<span id="progressText">Card 1 of 10</span>
<div class="progress-timeline" id="progressTimeline" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" aria-label="Study progress"></div>
</div>
<div id="reviewOverlay" class="review-overlay" style="display:none;">
<div class="review-card">
<div class="review-header">
<span id="reviewTitle" class="review-title"></span>
<button type="button" id="reviewClose" class="review-close" aria-label="Close review">×</button>
</div>
<div class="review-body">
<div class="review-section">
<span class="review-label">Question</span>
<span id="reviewQuestion" class="review-text"></span>
</div>
<div class="review-section">
<span class="review-label">Answer</span>
<span id="reviewAnswer" class="review-text"></span>
</div>
<div id="reviewBadge" class="review-badge"></div>
</div>
</div>
</div>
</div>
<div class="card-container">
<div id="flashcard" class="flashcard" role="button" tabindex="0" aria-label="Flashcard – click or press Enter to flip">
<div class="card-front">
<div id="hintsFront" class="card-hints"></div>
<div id="doNotAcceptFront" class="card-do-not-accept"></div>
<div class="card-main-content">
<div class="card-text-content">
<div class="card-label"><span>Question</span></div>
<div id="questionText" class="card-content" aria-live="polite"></div>
</div>
<div id="cardImageFront" class="card-image"></div>
</div>
</div>
<div class="card-back">
<div id="hintsBack" class="card-hints"></div>
<div id="doNotAcceptBack" class="card-do-not-accept"></div>
<div class="card-main-content">
<div class="card-text-content">
<div class="card-label">Answer</div>
<div id="answerText" class="card-content" aria-live="polite"></div>
<div id="acceptedAnswersList" class="accepted-answers-list"></div>
</div>
<div id="cardImageBack" class="card-image"></div>
</div>
</div>
</div>
</div>
<div class="study-actions">
<button id="flipCardBtn" class="btn btn-secondary">Flip Card</button>
<div id="answerButtons" class="answer-buttons" style="display: none;">
<button id="wrongBtn" class="btn btn-danger">✗ Wrong</button>
<button id="rightBtn" class="btn btn-success">✓ Right</button>
</div>
<div id="hintButton" class="hint-button" style="display: none;">
<button id="askForHintBtn" class="btn btn-secondary">Add Next Question</button>
</div>
</div>
<!-- Moderator view (replaces flashcard when moderator mode active) -->
<div id="moderatorView" class="moderator-view" style="display:none;">
<div class="mod-qa-section">
<div class="mod-qa-block">
<div class="mod-qa-label">Question</div>
<div class="mod-qa-text" id="modQuestionText"></div>
<div class="mod-qa-hints" id="modHints"></div>
</div>
<div class="mod-qa-block mod-answer-block">
<div class="mod-qa-label">Answer</div>
<div class="mod-qa-text" id="modAnswerText"></div>
<div class="mod-qa-dna" id="modDoNotAccept"></div>
<div class="mod-qa-accepted" id="modAccepted"></div>
</div>
<div class="mod-qa-image" id="modImage"></div>
</div>
<div class="mod-nav-row">
<button type="button" id="modHintBtn" class="btn btn-secondary" style="display:none;">Add Next Question</button>
<button type="button" id="modNextBtn" class="btn btn-primary">Next →</button>
</div>
<div class="mod-players-section">
<div class="mod-players-header">
<h3>Players</h3>
<div class="mod-player-add-row">
<input type="text" id="modPlayerNameInput" class="text-input" placeholder="Add player..." maxlength="40">
<button type="button" id="modAddPlayerBtn" class="btn btn-primary btn-sm">Add</button>
</div>
</div>
<div id="modPlayersList" class="mod-players-list"></div>
</div>
</div>
<div class="study-read-controls">
<button type="button" id="readAloudBtn" class="btn-read-aloud" title="Read current side aloud" aria-label="Read current side aloud">
<span class="material-symbols-outlined" aria-hidden="true">volume_up</span>
</button>
<label for="readVoiceSelect" class="sr-only">Voice</label>
<select id="readVoiceSelect" class="read-voice-select" title="Choose voice"></select>
</div>
</div>
<!-- Results View -->
<div id="resultsView" class="view" role="region" aria-label="Results">
<div class="results-header"><h2>Study Results</h2></div>
<div class="results-content">
<div class="stat-card">
<div class="stat-value" id="totalCards">0</div>
<div class="stat-label">Total Cards</div>
</div>
<div class="stat-card">
<div class="stat-value" id="correctCards">0</div>
<div class="stat-label">Correct</div>
</div>
<div class="stat-card">
<div class="stat-value" id="wrongCards">0</div>
<div class="stat-label">Wrong</div>
</div>
<div class="stat-card">
<div class="stat-value" id="accuracyPercent">0%</div>
<div class="stat-label">Accuracy</div>
</div>
</div>
<div id="moderatorResultsSection" class="moderator-results-section" style="display:none;">
<h3>Player Scores</h3>
<div id="moderatorFinalScores" class="moderator-final-scores"></div>
</div>
<div class="cards-results-container">
<h3>Card Results</h3>
<div id="cardsResultsList" class="cards-results-list"></div>
</div>
<div class="results-actions">
<button id="studyAgainBtn" class="btn btn-primary">Study Again</button>
<button id="backToMainFromResultsBtn" class="btn btn-secondary">Back to Main</button>
</div>
</div>
<!-- Settings View -->
<div id="settingsView" class="view" role="region" aria-label="Settings">
<div class="settings-header"><h2>Settings</h2></div>
<div class="settings-content">
<p class="settings-version" id="settingsVersion">v0.5.0</p>
<div class="theme-select-row settings-update-row">
<label for="themeSelectSettings">Theme</label>
<select id="themeSelectSettings" class="theme-select" title="Choose theme" aria-label="Choose theme">
<option value="dark">Dark</option>
<option value="light">Light</option>
<option value="ocean">Ocean</option>
<option value="forest">Forest</option>
<option value="sunset">Sunset</option>
</select>
</div>
<div class="settings-update-row">
<button type="button" id="updateBtnSettings" class="btn btn-secondary">Update</button>
<span class="hint">Get latest app version; keeps your sets.</span>
</div>
</div>
</div>
</div>
<!-- PWA bottom nav -->
<nav class="pwa-bottom-nav" id="pwaBottomNav" aria-label="Main navigation">
<button type="button" class="pwa-nav-btn" id="pwaNavHome" data-view="mainView" aria-label="Home">
<span class="material-symbols-outlined pwa-nav-icon" aria-hidden="true">home</span>
<span class="pwa-nav-label">Home</span>
</button>
<button type="button" class="pwa-nav-btn" id="pwaNavStudy" data-view="studySetupView" aria-label="Study">
<span class="material-symbols-outlined pwa-nav-icon" aria-hidden="true">menu_book</span>
<span class="pwa-nav-label">Study</span>
</button>
<button type="button" class="pwa-nav-btn" id="pwaNavCreate" data-view="setEditorView" aria-label="Create set">
<span class="material-symbols-outlined pwa-nav-icon" aria-hidden="true">add_circle</span>
<span class="pwa-nav-label">Create</span>
</button>
<button type="button" class="pwa-nav-btn" id="pwaNavSettings" data-view="settingsView" aria-label="Settings">
<span class="material-symbols-outlined pwa-nav-icon" aria-hidden="true">settings</span>
<span class="pwa-nav-label">Settings</span>
</button>
</nav>
<!-- Print modal -->
<div id="printModal" class="modal" role="dialog" aria-label="Print flashcards" style="display: none;">
<div class="modal-backdrop" id="printModalBackdrop"></div>
<div class="modal-content">
<div class="modal-header">
<h2>Print Flashcards</h2>
<button type="button" class="modal-close" id="printModalClose" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-group">
<label for="printSetSelect">Set</label>
<select id="printSetSelect" class="select-input">
<option value="">Select a set...</option>
</select>
</div>
<div class="form-group" id="printRoundGroup" style="display: none;">
<label for="printRoundSelect">Round</label>
<select id="printRoundSelect" class="select-input">
<option value="">All Rounds</option>
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" id="printModalCancel" class="btn btn-secondary">Cancel</button>
<button type="button" id="printGenerateBtn" class="btn btn-primary">Generate PDF</button>
</div>
</div>
</div>
<!-- Bundled sets (generated by build_bundled_sets.py) -->
<script src="bundled-sets.js?v=532b7f0a"></script>
<!-- App entry point -->
<script type="module" src="/src/main.ts"></script>
</body>
</html>