-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathgame.html
More file actions
269 lines (237 loc) · 12.2 KB
/
Copy pathgame.html
File metadata and controls
269 lines (237 loc) · 12.2 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, 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="default">
<meta name="apple-mobile-web-app-title" content="SpellBloc">
<meta name="format-detection" content="telephone=no">
<title>SpellBloc - Kids Word Game</title>
<link rel="stylesheet" href="styles.css">
<!-- PWA Manifest - only load if served via HTTP/HTTPS -->
<script>
if (window.location.protocol !== 'file:') {
const link = document.createElement('link');
link.rel = 'manifest';
link.href = 'manifest.json';
document.head.appendChild(link);
}
</script>
<meta name="theme-color" content="#3b82f6">
<meta name="description" content="A world-class spelling game for children aged 2-7 with adaptive learning and multi-language support.">
<meta name="keywords" content="spelling, kids, education, learning, phonics, vocabulary">
<meta name="author" content="SpellBloc Team">
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website">
<meta property="og:url" content="https://wordbloc.xyz/">
<meta property="og:title" content="SpellBloc - Kids Word Game">
<meta property="og:description" content="A world-class spelling game for children aged 2-7 with adaptive learning and multi-language support.">
<meta property="og:image" content="/og-image.png">
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image">
<meta property="twitter:url" content="https://wordbloc.xyz/">
<meta property="twitter:title" content="SpellBloc - Kids Word Game">
<meta property="twitter:description" content="A world-class spelling game for children aged 2-7 with adaptive learning and multi-language support.">
<meta property="twitter:image" content="/twitter-image.png">
<!-- Preload critical resources -->
<link rel="preload" href="advanced-systems.js" as="script">
<link rel="preload" href="game.js" as="script">
</head>
<body>
<div id="app">
<!-- Home Screen -->
<div id="homeScreen" class="screen active">
<!-- User Info & Logout -->
<div id="userInfo" class="user-info hidden">
<div class="user-welcome">
<span id="welcomeMessage">Welcome back!</span>
<button id="logoutBtn" class="logout-btn">🚪 Logout</button>
</div>
</div>
<h1 class="title">🎮 SpellBloc!</h1>
<p class="subtitle" id="ageTitle">First Letters (Age 2)</p>
<!-- Age Selection -->
<div class="age-selector">
<label>Child's Age:</label>
<select id="ageSelect">
<option value="2">Age 2 - First Letters</option>
<option value="3">Age 3 - Letter Sounds</option>
<option value="4">Age 4 - First Words</option>
<option value="5">Age 5 - Word Builder</option>
<option value="6">Age 6 - Spelling Master</option>
<option value="7">Age 7 - Reading Ready</option>
</select>
</div>
<!-- Game Mode Selection -->
<div class="mode-selector">
<label>Game Mode:</label>
<select id="modeSelect">
<option value="classic">Classic Mode</option>
<option value="story">Story Adventure</option>
<option value="timed">Speed Challenge</option>
<option value="puzzle">Word Puzzles</option>
</select>
</div>
<!-- Language Selection -->
<div class="language-selector">
<label>Language:</label>
<select id="languageSelect">
<option value="en">English</option>
<option value="es">Español</option>
<option value="fr">Français</option>
<option value="de">Deutsch</option>
<option value="zh">中文</option>
</select>
</div>
<div class="categories" id="categoriesContainer">
<!-- Categories will be populated by JavaScript -->
</div>
<div class="stats">
<div class="stat">⭐ Stars: <span id="totalStars">0</span></div>
<div class="stat">🏆 Level: <span id="playerLevel">1</span></div>
<div class="stat">🎨 Badges: <span id="badgeCount">0</span></div>
</div>
<!-- Accessibility Panel -->
<div class="accessibility-panel">
<button id="accessibilityBtn" class="accessibility-btn">♿ Accessibility</button>
<div id="accessibilityOptions" class="accessibility-options hidden">
<button id="highContrastBtn">High Contrast</button>
<button id="dyslexiaFontBtn">Dyslexia Font</button>
<button id="largeFontBtn">Large Font</button>
<button id="screenReaderBtn">Screen Reader</button>
</div>
</div>
</div>
<!-- Game Screen -->
<div id="gameScreen" class="screen">
<div class="game-header">
<button id="backBtn" class="icon-btn">🏠</button>
<div class="progress-bar">
<div id="progressFill" class="progress-fill"></div>
</div>
<div class="stars-display">⭐ <span id="currentStars">0</span></div>
<div id="timer" class="timer hidden"></div>
<div id="difficultyIndicator" class="difficulty-indicator">Level: <span id="difficultyLevel">1.0</span></div>
</div>
<!-- Game Instructions -->
<div id="gameInstructions" class="game-instructions">
<div class="instruction-content">
<h3 id="instructionTitle">📝 How to Play</h3>
<p id="instructionText">Look at the emoji, listen to the word, then tap the letters below to spell it!</p>
<div class="instruction-example">
<span class="example-emoji">🐱</span>
<span class="example-arrow">→</span>
<span class="example-word">C-A-T</span>
</div>
<button id="startGameBtn" class="start-game-btn">Got It! Let's Play! 🎮</button>
</div>
</div>
<div class="game-content">
<div id="storyContext" class="story-context hidden"></div>
<!-- Current Task Display -->
<div id="currentTask" class="current-task">
<p id="taskDescription">Spell the word you hear!</p>
</div>
<div class="word-display">
<div id="wordImage" class="word-image"></div>
<button id="playSound" class="sound-btn" data-translate="hear_word">🔊 Hear Word</button>
<div id="phonicsDisplay" class="phonics-display hidden"></div>
</div>
<div id="dropZone" class="drop-zone"></div>
<div class="action-buttons">
<button id="deleteBtn" class="action-btn" data-translate="delete">⌫ Delete</button>
<button id="clearBtn" class="action-btn" data-translate="clear">✖ Clear</button>
<button id="hintBtn" class="action-btn">💡 Hint</button>
<button id="helpBtn" class="action-btn">❓ Help</button>
</div>
<div id="letterBank" class="letter-bank"></div>
<div id="feedback" class="feedback"></div>
<!-- AI Enhancements -->
<div class="ai-hints hidden" id="aiHint"></div>
<div class="ai-encouragement" id="aiEncouragement"></div>
</div>
</div>
<!-- Victory Screen -->
<div id="victoryScreen" class="screen">
<div class="victory-content">
<h2 class="victory-title">🎉 Round Complete!</h2>
<div class="victory-stars" id="victoryStars"></div>
<p class="victory-text">You earned <span id="earnedStars">0</span> stars this round!</p>
<div class="victory-buttons">
<button id="nextLevelBtn" class="big-btn">Next Stage ➡️</button>
<button id="homeBtn" class="big-btn secondary">Home 🏠</button>
</div>
</div>
</div>
<!-- Parent Dashboard Screen -->
<div id="dashboardScreen" class="screen">
<div class="dashboard-header">
<h2>Parent Dashboard</h2>
<button id="dashboardBackBtn" class="icon-btn">🏠</button>
</div>
<div class="dashboard-content">
<div class="dashboard-section">
<h3>Progress Overview</h3>
<div id="progressChart" class="progress-chart"></div>
<div id="progressStats" class="progress-stats"></div>
</div>
<div class="dashboard-section">
<h3>Recent Achievements</h3>
<div id="recentAchievements" class="achievements-list"></div>
</div>
<div class="dashboard-section">
<h3>Recommendations</h3>
<div id="recommendations" class="recommendations-list"></div>
</div>
<div class="dashboard-section">
<h3>Custom Word Lists</h3>
<div class="custom-words-controls">
<input type="text" id="customWordInput" placeholder="Enter words separated by commas">
<button id="addCustomWordsBtn">Add Words</button>
</div>
<div id="customWordsList" class="custom-words-list"></div>
</div>
</div>
</div>
<!-- Settings Panel -->
<button id="settingsBtn" class="settings-btn">⚙️</button>
<button id="parentDashboardBtn" class="parent-dashboard-btn">📈</button>
<div id="settingsPanel" class="settings-panel">
<h3>Settings</h3>
<div class="settings-section">
<label>
Volume: <input type="range" id="volumeControl" min="0" max="100" value="70">
</label>
</div>
<div class="settings-section">
<h4>Performance</h4>
<div id="performanceMetrics" class="performance-metrics">
<div>FPS: <span id="fpsDisplay">60</span></div>
<div>Memory: <span id="memoryDisplay">0</span>MB</div>
</div>
<button id="optimizeBtn">Optimize Performance</button>
</div>
<button id="closeSettings" class="big-btn">Close</button>
</div>
</div>
<footer class="footer">spellblocs by llins</footer>
<script src="offline-store.js"></script>
<script src="srs-engine.js"></script>
<script src="advanced-systems.js"></script>
<script src="ai-agent.js"></script>
<script src="email-service.js"></script>
<script src="email-integration.js"></script>
<script src="email-setup-ui.js"></script>
<script>
window.SPELLBLOC_REQUIRE_AUTH = true;
</script>
<script src="auth-manager.js"></script>
<script src="game.js"></script>
<!-- Authentication Check -->
<script>
// AuthManager verifies the token with /api/auth/verify and owns redirects/logout.
</script>
</body>
</html>