Spaces:
Running

onlyoneritz commited on
Commit
51458a4
·
verified ·
1 Parent(s): 55c418b

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +6 -4
  2. index.html +777 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Vedicmath
3
- emoji: 📉
4
  colorFrom: purple
5
- colorTo: gray
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: vedicmath
3
+ emoji: 🐳
4
  colorFrom: purple
5
+ colorTo: yellow
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,777 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Vedic Math Magic - Learn Fast Calculation Tricks</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .trick-card:hover {
11
+ transform: translateY(-5px);
12
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
13
+ }
14
+ .progress-step.active {
15
+ background-color: #4f46e5;
16
+ color: white;
17
+ }
18
+ .progress-step.completed {
19
+ background-color: #10b981;
20
+ color: white;
21
+ }
22
+ .math-animation {
23
+ transition: all 0.3s ease;
24
+ }
25
+ .confetti {
26
+ position: absolute;
27
+ width: 10px;
28
+ height: 10px;
29
+ background-color: #f00;
30
+ border-radius: 50%;
31
+ animation: fall 3s linear forwards;
32
+ }
33
+ @keyframes fall {
34
+ to {
35
+ transform: translateY(100vh);
36
+ opacity: 0;
37
+ }
38
+ }
39
+ .step-content {
40
+ display: none;
41
+ }
42
+ .step-content.active {
43
+ display: block;
44
+ }
45
+ </style>
46
+ </head>
47
+ <body class="bg-gray-50 min-h-screen font-sans">
48
+ <!-- Header -->
49
+ <header class="bg-indigo-600 text-white shadow-lg">
50
+ <div class="container mx-auto px-4 py-6">
51
+ <div class="flex justify-between items-center">
52
+ <div class="flex items-center space-x-3">
53
+ <i class="fas fa-square-root-alt text-3xl"></i>
54
+ <h1 class="text-2xl font-bold">Vedic Math Magic</h1>
55
+ </div>
56
+ <div class="flex items-center space-x-4">
57
+ <div class="flex items-center space-x-2 bg-indigo-500 px-3 py-1 rounded-full">
58
+ <i class="fas fa-star text-yellow-300"></i>
59
+ <span id="points">0</span>
60
+ </div>
61
+ <button id="help-btn" class="bg-white text-indigo-600 px-3 py-1 rounded-full font-medium">
62
+ <i class="fas fa-question-circle"></i> Help
63
+ </button>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </header>
68
+
69
+ <!-- Main Content -->
70
+ <main class="container mx-auto px-4 py-8">
71
+ <!-- Welcome Section -->
72
+ <section id="welcome" class="mb-12 text-center">
73
+ <h2 class="text-3xl font-bold text-indigo-800 mb-4">Welcome to Vedic Math Magic!</h2>
74
+ <p class="text-lg text-gray-700 max-w-3xl mx-auto mb-6">
75
+ Learn ancient Indian calculation techniques that make math faster and more fun!
76
+ These tricks will help you solve problems in seconds that normally take minutes.
77
+ </p>
78
+ <div class="bg-indigo-100 border-l-4 border-indigo-500 p-4 max-w-3xl mx-auto mb-8">
79
+ <p class="text-indigo-800 font-medium">
80
+ <i class="fas fa-lightbulb mr-2"></i>
81
+ Did you know? Vedic Math has 16 main formulas that can solve thousands of math problems!
82
+ </p>
83
+ </div>
84
+ <button id="start-learning" class="bg-indigo-600 hover:bg-indigo-700 text-white font-bold py-3 px-6 rounded-full text-lg shadow-lg transition-all">
85
+ Start Learning Now <i class="fas fa-arrow-right ml-2"></i>
86
+ </button>
87
+ </section>
88
+
89
+ <!-- Tricks Section (initially hidden) -->
90
+ <section id="tricks-section" class="hidden">
91
+ <div class="flex justify-between items-center mb-8">
92
+ <h2 class="text-2xl font-bold text-indigo-800">Choose a Vedic Math Trick to Learn</h2>
93
+ <div class="flex items-center space-x-2">
94
+ <span class="text-sm text-gray-600">Filter:</span>
95
+ <select id="difficulty-filter" class="border rounded px-3 py-1 text-sm">
96
+ <option value="all">All Difficulties</option>
97
+ <option value="easy">Easy</option>
98
+ <option value="medium">Medium</option>
99
+ <option value="hard">Hard</option>
100
+ </select>
101
+ </div>
102
+ </div>
103
+
104
+ <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 mb-12">
105
+ <!-- Trick Cards -->
106
+ <div class="trick-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-200 transition-all cursor-pointer" data-trick="ekadhikena" data-difficulty="easy">
107
+ <div class="p-5">
108
+ <div class="flex justify-between items-start mb-3">
109
+ <h3 class="text-xl font-bold text-indigo-700">Ekadhikena Purvena</h3>
110
+ <span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">Easy</span>
111
+ </div>
112
+ <p class="text-gray-600 mb-4">"By one more than the previous one" - Perfect for squaring numbers ending with 5</p>
113
+ <div class="flex justify-between items-center">
114
+ <div class="flex items-center text-yellow-400">
115
+ <i class="fas fa-star"></i>
116
+ <i class="fas fa-star"></i>
117
+ <i class="fas fa-star"></i>
118
+ <i class="far fa-star"></i>
119
+ <i class="far fa-star"></i>
120
+ </div>
121
+ <button class="text-indigo-600 font-medium flex items-center">
122
+ Learn <i class="fas fa-chevron-right ml-1"></i>
123
+ </button>
124
+ </div>
125
+ </div>
126
+ </div>
127
+
128
+ <div class="trick-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-200 transition-all cursor-pointer" data-trick="nikhilam" data-difficulty="medium">
129
+ <div class="p-5">
130
+ <div class="flex justify-between items-start mb-3">
131
+ <h3 class="text-xl font-bold text-indigo-700">Nikhilam Navatashcaramam</h3>
132
+ <span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded-full">Medium</span>
133
+ </div>
134
+ <p class="text-gray-600 mb-4">"All from 9 and last from 10" - Multiply numbers near powers of 10</p>
135
+ <div class="flex justify-between items-center">
136
+ <div class="flex items-center text-yellow-400">
137
+ <i class="fas fa-star"></i>
138
+ <i class="fas fa-star"></i>
139
+ <i class="fas fa-star"></i>
140
+ <i class="fas fa-star"></i>
141
+ <i class="far fa-star"></i>
142
+ </div>
143
+ <button class="text-indigo-600 font-medium flex items-center">
144
+ Learn <i class="fas fa-chevron-right ml-1"></i>
145
+ </button>
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <div class="trick-card bg-white rounded-xl shadow-md overflow-hidden border border-gray-200 transition-all cursor-pointer" data-trick="urdhva" data-difficulty="hard">
151
+ <div class="p-5">
152
+ <div class="flex justify-between items-start mb-3">
153
+ <h3 class="text-xl font-bold text-indigo-700">Urdhva-Tiryagbhyam</h3>
154
+ <span class="bg-red-100 text-red-800 text-xs px-2 py-1 rounded-full">Hard</span>
155
+ </div>
156
+ <p class="text-gray-600 mb-4">"Vertically and crosswise" - Universal multiplication method</p>
157
+ <div class="flex justify-between items-center">
158
+ <div class="flex items-center text-yellow-400">
159
+ <i class="fas fa-star"></i>
160
+ <i class="fas fa-star"></i>
161
+ <i class="fas fa-star"></i>
162
+ <i class="fas fa-star"></i>
163
+ <i class="fas fa-star"></i>
164
+ </div>
165
+ <button class="text-indigo-600 font-medium flex items-center">
166
+ Learn <i class="fas fa-chevron-right ml-1"></i>
167
+ </button>
168
+ </div>
169
+ </div>
170
+ </div>
171
+ </div>
172
+
173
+ <div class="text-center">
174
+ <button id="practice-all" class="bg-green-600 hover:bg-green-700 text-white font-bold py-2 px-6 rounded-full shadow-md transition-all">
175
+ <i class="fas fa-dumbbell mr-2"></i> Practice All Tricks
176
+ </button>
177
+ </div>
178
+ </section>
179
+
180
+ <!-- Learning Area (initially hidden) -->
181
+ <section id="learning-area" class="hidden max-w-4xl mx-auto">
182
+ <div class="flex justify-between items-center mb-6">
183
+ <button id="back-to-tricks" class="text-indigo-600 font-medium flex items-center">
184
+ <i class="fas fa-arrow-left mr-2"></i> Back to Tricks
185
+ </button>
186
+ <div class="flex space-x-1">
187
+ <div class="progress-step w-8 h-8 rounded-full border-2 border-gray-300 flex items-center justify-center font-bold">1</div>
188
+ <div class="progress-step w-8 h-8 rounded-full border-2 border-gray-300 flex items-center justify-center font-bold">2</div>
189
+ <div class="progress-step w-8 h-8 rounded-full border-2 border-gray-300 flex items-center justify-center font-bold">3</div>
190
+ <div class="progress-step w-8 h-8 rounded-full border-2 border-gray-300 flex items-center justify-center font-bold">4</div>
191
+ </div>
192
+ </div>
193
+
194
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden">
195
+ <!-- Trick Explanation -->
196
+ <div id="trick-explanation" class="p-6">
197
+ <h2 class="text-2xl font-bold text-indigo-800 mb-4" id="trick-title">Ekadhikena Purvena</h2>
198
+ <div class="flex items-center mb-4">
199
+ <span id="trick-difficulty" class="bg-green-100 text-green-800 text-sm px-3 py-1 rounded-full mr-3">Easy</span>
200
+ <div class="flex items-center text-yellow-400">
201
+ <i class="fas fa-star"></i>
202
+ <i class="fas fa-star"></i>
203
+ <i class="fas fa-star"></i>
204
+ <i class="far fa-star"></i>
205
+ <i class="far fa-star"></i>
206
+ </div>
207
+ </div>
208
+
209
+ <div id="step-1" class="step-content active">
210
+ <h3 class="text-lg font-semibold text-gray-800 mb-3">What does it mean?</h3>
211
+ <p class="text-gray-700 mb-4">
212
+ "Ekadhikena Purvena" means "By one more than the previous one".
213
+ This sutra is particularly useful for squaring numbers that end with 5.
214
+ </p>
215
+ <div class="bg-blue-50 border-l-4 border-blue-500 p-4 mb-4">
216
+ <p class="text-blue-800 font-medium">
217
+ <i class="fas fa-info-circle mr-2"></i>
218
+ Remember: This trick works only for numbers ending with 5!
219
+ </p>
220
+ </div>
221
+ <button class="next-step bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-4 rounded-full">
222
+ Next <i class="fas fa-arrow-right ml-1"></i>
223
+ </button>
224
+ </div>
225
+
226
+ <div id="step-2" class="step-content">
227
+ <h3 class="text-lg font-semibold text-gray-800 mb-3">How it works</h3>
228
+ <p class="text-gray-700 mb-4">
229
+ To square a number ending with 5 (like 25, 35, 45 etc.):
230
+ </p>
231
+ <ol class="list-decimal pl-5 mb-4 space-y-2 text-gray-700">
232
+ <li>Take the part before the 5 (for 25, it's 2)</li>
233
+ <li>Multiply it by "one more than itself" (2 × 3 = 6)</li>
234
+ <li>Write 25 at the end (625)</li>
235
+ </ol>
236
+ <div class="bg-indigo-100 p-4 rounded-lg mb-4 math-animation">
237
+ <div class="flex justify-center items-center space-x-4">
238
+ <div class="text-3xl font-bold text-indigo-800">25<sup>2</sup> = </div>
239
+ <div class="flex flex-col items-center">
240
+ <div class="flex items-center">
241
+ <span class="border-b-2 border-indigo-500 px-2">2 × 3</span>
242
+ <span class="mx-2">= 6</span>
243
+ </div>
244
+ <div class="text-3xl font-bold text-indigo-800">625</div>
245
+ </div>
246
+ </div>
247
+ </div>
248
+ <button class="next-step bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-4 rounded-full">
249
+ Next <i class="fas fa-arrow-right ml-1"></i>
250
+ </button>
251
+ </div>
252
+
253
+ <div id="step-3" class="step-content">
254
+ <h3 class="text-lg font-semibold text-gray-800 mb-3">Let's try another example</h3>
255
+ <div class="bg-yellow-50 border-l-4 border-yellow-500 p-4 mb-4">
256
+ <p class="text-yellow-800 font-medium">
257
+ <i class="fas fa-lightbulb mr-2"></i>
258
+ Try to solve this before revealing the answer!
259
+ </p>
260
+ </div>
261
+ <div class="mb-6">
262
+ <p class="text-xl font-medium mb-2">What is 35 squared (35 × 35)?</p>
263
+ <div class="flex space-x-4">
264
+ <button id="show-hint" class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm">
265
+ Show Hint
266
+ </button>
267
+ <button id="show-solution" class="bg-green-100 text-green-800 px-3 py-1 rounded-full text-sm">
268
+ Show Solution
269
+ </button>
270
+ </div>
271
+ <div id="hint" class="hidden mt-4 bg-blue-50 p-3 rounded-lg">
272
+ <p class="text-blue-800">Remember: Take the digit before 5 (3), multiply by one more than itself (3 × 4), then write 25 at the end.</p>
273
+ </div>
274
+ <div id="solution" class="hidden mt-4 bg-green-50 p-3 rounded-lg">
275
+ <p class="text-green-800 font-medium">Solution:</p>
276
+ <p>3 × 4 = 12</p>
277
+ <p>Write 25 at the end: 1225</p>
278
+ <p class="text-xl font-bold mt-2">35<sup>2</sup> = 1225</p>
279
+ </div>
280
+ </div>
281
+ <button class="next-step bg-indigo-600 hover:bg-indigo-700 text-white font-medium py-2 px-4 rounded-full">
282
+ Next <i class="fas fa-arrow-right ml-1"></i>
283
+ </button>
284
+ </div>
285
+
286
+ <div id="step-4" class="step-content">
287
+ <h3 class="text-lg font-semibold text-gray-800 mb-3">Time to Practice!</h3>
288
+ <p class="text-gray-700 mb-4">
289
+ Let's test your understanding with some practice problems.
290
+ Try to solve them using the Ekadhikena Purvena method.
291
+ </p>
292
+
293
+ <div class="bg-purple-50 p-4 rounded-lg mb-6">
294
+ <div class="mb-4">
295
+ <p class="font-medium text-purple-800 mb-2">1. What is 45 squared (45 × 45)?</p>
296
+ <div class="flex space-x-2">
297
+ <input type="text" class="border rounded px-3 py-1 w-24 answer-input" data-answer="2025">
298
+ <button class="check-answer bg-purple-600 hover:bg-purple-700 text-white px-3 py-1 rounded-full text-sm">
299
+ Check
300
+ </button>
301
+ </div>
302
+ <p class="hidden text-green-600 mt-2 feedback"><i class="fas fa-check-circle mr-1"></i> Correct! 4 × 5 = 20, then add 25 to get 2025.</p>
303
+ </div>
304
+
305
+ <div class="mb-4">
306
+ <p class="font-medium text-purple-800 mb-2">2. What is 75 squared (75 × 75)?</p>
307
+ <div class="flex space-x-2">
308
+ <input type="text" class="border rounded px-3 py-1 w-24 answer-input" data-answer="5625">
309
+ <button class="check-answer bg-purple-600 hover:bg-purple-700 text-white px-3 py-1 rounded-full text-sm">
310
+ Check
311
+ </button>
312
+ </div>
313
+ <p class="hidden text-green-600 mt-2 feedback"><i class="fas fa-check-circle mr-1"></i> Excellent! 7 × 8 = 56, then add 25 to get 5625.</p>
314
+ </div>
315
+
316
+ <div>
317
+ <p class="font-medium text-purple-800 mb-2">3. What is 105 squared (105 × 105)?</p>
318
+ <div class="flex space-x-2">
319
+ <input type="text" class="border rounded px-3 py-1 w-24 answer-input" data-answer="11025">
320
+ <button class="check-answer bg-purple-600 hover:bg-purple-700 text-white px-3 py-1 rounded-full text-sm">
321
+ Check
322
+ </button>
323
+ </div>
324
+ <p class="hidden text-green-600 mt-2 feedback"><i class="fas fa-check-circle mr-1"></i> Great job! 10 × 11 = 110, then add 25 to get 11025.</p>
325
+ </div>
326
+ </div>
327
+
328
+ <div class="flex justify-between items-center">
329
+ <button id="try-another-trick" class="bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium py-2 px-4 rounded-full">
330
+ <i class="fas fa-random mr-1"></i> Try Another Trick
331
+ </button>
332
+ <button id="celebrate" class="bg-yellow-500 hover:bg-yellow-600 text-white font-medium py-2 px-4 rounded-full">
333
+ <i class="fas fa-trophy mr-1"></i> I Did It!
334
+ </button>
335
+ </div>
336
+ </div>
337
+ </div>
338
+ </div>
339
+ </section>
340
+
341
+ <!-- Practice Mode (initially hidden) -->
342
+ <section id="practice-mode" class="hidden max-w-4xl mx-auto">
343
+ <div class="flex justify-between items-center mb-6">
344
+ <button id="back-to-tricks-practice" class="text-indigo-600 font-medium flex items-center">
345
+ <i class="fas fa-arrow-left mr-2"></i> Back to Tricks
346
+ </button>
347
+ <div class="flex items-center space-x-2">
348
+ <span class="text-sm font-medium">Score:</span>
349
+ <div class="bg-indigo-100 px-3 py-1 rounded-full font-bold" id="practice-score">0</div>
350
+ </div>
351
+ </div>
352
+
353
+ <div class="bg-white rounded-xl shadow-lg overflow-hidden p-6">
354
+ <h2 class="text-2xl font-bold text-indigo-800 mb-6">Practice All Vedic Math Tricks</h2>
355
+
356
+ <div class="mb-8">
357
+ <div class="flex justify-between items-center mb-4">
358
+ <h3 class="text-lg font-semibold text-gray-800">Random Practice Problems</h3>
359
+ <button id="new-problem" class="bg-indigo-600 hover:bg-indigo-700 text-white text-sm px-3 py-1 rounded-full">
360
+ <i class="fas fa-sync-alt mr-1"></i> New Problem
361
+ </button>
362
+ </div>
363
+
364
+ <div id="current-problem" class="bg-blue-50 p-6 rounded-lg mb-4 text-center">
365
+ <p class="text-xl font-medium mb-2">What is 25 × 25?</p>
366
+ <p class="text-sm text-gray-600 mb-4">(Use the Ekadhikena Purvena method)</p>
367
+ <div class="flex justify-center space-x-2">
368
+ <input type="text" id="practice-answer" class="border rounded px-4 py-2 w-32 text-center text-lg font-bold">
369
+ <button id="submit-practice" class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded-full">
370
+ Submit
371
+ </button>
372
+ </div>
373
+ </div>
374
+
375
+ <div id="practice-feedback" class="hidden p-4 rounded-lg mb-4">
376
+ <div class="flex items-start">
377
+ <div class="mr-3 text-2xl" id="feedback-icon"></div>
378
+ <div>
379
+ <p class="font-medium" id="feedback-message"></p>
380
+ <p class="text-sm mt-1" id="feedback-explanation"></p>
381
+ </div>
382
+ </div>
383
+ </div>
384
+ </div>
385
+
386
+ <div class="bg-gray-100 p-4 rounded-lg">
387
+ <h4 class="font-medium text-gray-800 mb-3">Quick Tips:</h4>
388
+ <ul class="list-disc pl-5 space-y-2 text-gray-700">
389
+ <li>For numbers ending with 5, use Ekadhikena Purvena</li>
390
+ <li>For numbers near 100, use Nikhilam method</li>
391
+ <li>For general multiplication, try Urdhva-Tiryagbhyam</li>
392
+ </ul>
393
+ </div>
394
+ </div>
395
+ </section>
396
+ </main>
397
+
398
+ <!-- Help Modal -->
399
+ <div id="help-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
400
+ <div class="bg-white rounded-xl shadow-xl max-w-2xl w-full max-h-[90vh] overflow-y-auto">
401
+ <div class="p-6">
402
+ <div class="flex justify-between items-center mb-4">
403
+ <h3 class="text-2xl font-bold text-indigo-800">Help Center</h3>
404
+ <button id="close-help" class="text-gray-500 hover:text-gray-700">
405
+ <i class="fas fa-times text-2xl"></i>
406
+ </button>
407
+ </div>
408
+
409
+ <div class="space-y-4">
410
+ <div class="bg-blue-50 p-4 rounded-lg">
411
+ <h4 class="font-bold text-blue-800 mb-2"><i class="fas fa-question-circle mr-2"></i> How to use this app?</h4>
412
+ <p class="text-gray-700">Start by selecting a Vedic Math trick to learn. Each trick has 4 steps: explanation, how it works, example, and practice. Complete all steps to master the technique!</p>
413
+ </div>
414
+
415
+ <div class="bg-green-50 p-4 rounded-lg">
416
+ <h4 class="font-bold text-green-800 mb-2"><i class="fas fa-star mr-2"></i> Earning points</h4>
417
+ <p class="text-gray-700">You earn points by completing learning steps and solving practice problems correctly. More difficult tricks give more points!</p>
418
+ </div>
419
+
420
+ <div class="bg-yellow-50 p-4 rounded-lg">
421
+ <h4 class="font-bold text-yellow-800 mb-2"><i class="fas fa-lightbulb mr-2"></i> Learning tips</h4>
422
+ <ul class="list-disc pl-5 space-y-1 text-gray-700">
423
+ <li>Take your time with each step</li>
424
+ <li>Try examples on paper before checking solutions</li>
425
+ <li>Practice daily for best results</li>
426
+ </ul>
427
+ </div>
428
+ </div>
429
+
430
+ <div class="mt-6 pt-4 border-t border-gray-200">
431
+ <h4 class="font-bold text-indigo-800 mb-2">Contact Support</h4>
432
+ <p class="text-gray-700">Need more help? Email us at <a href="mailto:support@vedicmathmagic.com" class="text-indigo-600 underline">support@vedicmathmagic.com</a></p>
433
+ </div>
434
+ </div>
435
+ </div>
436
+ </div>
437
+
438
+ <script>
439
+ // DOM Elements
440
+ const welcomeSection = document.getElementById('welcome');
441
+ const tricksSection = document.getElementById('tricks-section');
442
+ const learningArea = document.getElementById('learning-area');
443
+ const practiceMode = document.getElementById('practice-mode');
444
+ const startLearningBtn = document.getElementById('start-learning');
445
+ const trickCards = document.querySelectorAll('.trick-card');
446
+ const backToTricksBtn = document.getElementById('back-to-tricks');
447
+ const backToTricksPracticeBtn = document.getElementById('back-to-tricks-practice');
448
+ const nextStepBtns = document.querySelectorAll('.next-step');
449
+ const progressSteps = document.querySelectorAll('.progress-step');
450
+ const showHintBtn = document.getElementById('show-hint');
451
+ const showSolutionBtn = document.getElementById('show-solution');
452
+ const hintDiv = document.getElementById('hint');
453
+ const solutionDiv = document.getElementById('solution');
454
+ const checkAnswerBtns = document.querySelectorAll('.check-answer');
455
+ const tryAnotherTrickBtn = document.getElementById('try-another-trick');
456
+ const celebrateBtn = document.getElementById('celebrate');
457
+ const practiceAllBtn = document.getElementById('practice-all');
458
+ const newProblemBtn = document.getElementById('new-problem');
459
+ const submitPracticeBtn = document.getElementById('submit-practice');
460
+ const practiceAnswerInput = document.getElementById('practice-answer');
461
+ const practiceFeedbackDiv = document.getElementById('practice-feedback');
462
+ const helpBtn = document.getElementById('help-btn');
463
+ const helpModal = document.getElementById('help-modal');
464
+ const closeHelpBtn = document.getElementById('close-help');
465
+ const pointsDisplay = document.getElementById('points');
466
+ const practiceScoreDisplay = document.getElementById('practice-score');
467
+
468
+ // State
469
+ let currentStep = 1;
470
+ let currentTrick = '';
471
+ let points = 0;
472
+ let practiceScore = 0;
473
+
474
+ // Initialize the app
475
+ document.addEventListener('DOMContentLoaded', () => {
476
+ // Set first step as active
477
+ document.querySelector('.step-content').classList.add('active');
478
+
479
+ // Add event listeners
480
+ setupEventListeners();
481
+ });
482
+
483
+ function setupEventListeners() {
484
+ // Navigation buttons
485
+ startLearningBtn.addEventListener('click', () => {
486
+ welcomeSection.classList.add('hidden');
487
+ tricksSection.classList.remove('hidden');
488
+ });
489
+
490
+ trickCards.forEach(card => {
491
+ card.addEventListener('click', () => {
492
+ currentTrick = card.dataset.trick;
493
+ tricksSection.classList.add('hidden');
494
+ learningArea.classList.remove('hidden');
495
+
496
+ // Update UI based on selected trick
497
+ document.getElementById('trick-title').textContent = getTrickTitle(currentTrick);
498
+ document.getElementById('trick-difficulty').textContent = getTrickDifficulty(currentTrick);
499
+ document.getElementById('trick-difficulty').className = getDifficultyClass(card.dataset.difficulty);
500
+
501
+ // Reset steps
502
+ currentStep = 1;
503
+ updateProgressSteps();
504
+ });
505
+ });
506
+
507
+ backToTricksBtn.addEventListener('click', () => {
508
+ learningArea.classList.add('hidden');
509
+ tricksSection.classList.remove('hidden');
510
+ resetLearningArea();
511
+ });
512
+
513
+ backToTricksPracticeBtn.addEventListener('click', () => {
514
+ practiceMode.classList.add('hidden');
515
+ tricksSection.classList.remove('hidden');
516
+ });
517
+
518
+ // Step navigation
519
+ nextStepBtns.forEach(btn => {
520
+ btn.addEventListener('click', () => {
521
+ if (currentStep < 4) {
522
+ currentStep++;
523
+ updateProgressSteps();
524
+
525
+ // Add points when completing steps
526
+ if (currentStep === 4) {
527
+ addPoints(20);
528
+ }
529
+ }
530
+ });
531
+ });
532
+
533
+ // Example section buttons
534
+ showHintBtn.addEventListener('click', () => {
535
+ hintDiv.classList.toggle('hidden');
536
+ });
537
+
538
+ showSolutionBtn.addEventListener('click', () => {
539
+ solutionDiv.classList.toggle('hidden');
540
+ });
541
+
542
+ // Practice answer checking
543
+ checkAnswerBtns.forEach(btn => {
544
+ btn.addEventListener('click', function() {
545
+ const input = this.previousElementSibling;
546
+ const correctAnswer = input.dataset.answer;
547
+ const feedback = this.parentElement.querySelector('.feedback');
548
+
549
+ if (input.value === correctAnswer) {
550
+ input.classList.add('border-green-500');
551
+ input.classList.remove('border-red-500');
552
+ feedback.classList.remove('hidden');
553
+ feedback.classList.add('text-green-600');
554
+ feedback.classList.remove('text-red-600');
555
+
556
+ // Add points for correct answer
557
+ addPoints(10);
558
+ } else {
559
+ input.classList.add('border-red-500');
560
+ input.classList.remove('border-green-500');
561
+ feedback.classList.remove('hidden');
562
+ feedback.classList.add('text-red-600');
563
+ feedback.classList.remove('text-green-600');
564
+ feedback.innerHTML = `<i class="fas fa-times-circle mr-1"></i> Not quite! Try again. The correct answer is ${correctAnswer}.`;
565
+ }
566
+ });
567
+ });
568
+
569
+ // Navigation buttons
570
+ tryAnotherTrickBtn.addEventListener('click', () => {
571
+ learningArea.classList.add('hidden');
572
+ tricksSection.classList.remove('hidden');
573
+ resetLearningArea();
574
+ });
575
+
576
+ celebrateBtn.addEventListener('click', () => {
577
+ createConfetti();
578
+ setTimeout(() => {
579
+ learningArea.classList.add('hidden');
580
+ tricksSection.classList.remove('hidden');
581
+ resetLearningArea();
582
+ }, 2000);
583
+ });
584
+
585
+ practiceAllBtn.addEventListener('click', () => {
586
+ tricksSection.classList.add('hidden');
587
+ practiceMode.classList.remove('hidden');
588
+ generatePracticeProblem();
589
+ });
590
+
591
+ // Practice mode buttons
592
+ newProblemBtn.addEventListener('click', generatePracticeProblem);
593
+
594
+ submitPracticeBtn.addEventListener('click', checkPracticeAnswer);
595
+
596
+ practiceAnswerInput.addEventListener('keypress', function(e) {
597
+ if (e.key === 'Enter') {
598
+ checkPracticeAnswer();
599
+ }
600
+ });
601
+
602
+ // Help modal
603
+ helpBtn.addEventListener('click', () => {
604
+ helpModal.classList.remove('hidden');
605
+ });
606
+
607
+ closeHelpBtn.addEventListener('click', () => {
608
+ helpModal.classList.add('hidden');
609
+ });
610
+ }
611
+
612
+ // Functions
613
+ function updateProgressSteps() {
614
+ progressSteps.forEach((step, index) => {
615
+ step.classList.remove('active', 'completed');
616
+ if (index + 1 === currentStep) {
617
+ step.classList.add('active');
618
+ } else if (index + 1 < currentStep) {
619
+ step.classList.add('completed');
620
+ }
621
+ });
622
+
623
+ // Show current step content
624
+ document.querySelectorAll('.step-content').forEach(content => {
625
+ content.classList.remove('active');
626
+ });
627
+ document.getElementById(`step-${currentStep}`).classList.add('active');
628
+ }
629
+
630
+ function resetLearningArea() {
631
+ currentStep = 1;
632
+ updateProgressSteps();
633
+
634
+ // Reset inputs and feedback
635
+ document.querySelectorAll('.answer-input').forEach(input => {
636
+ input.value = '';
637
+ input.classList.remove('border-green-500', 'border-red-500');
638
+ });
639
+
640
+ document.querySelectorAll('.feedback').forEach(feedback => {
641
+ feedback.classList.add('hidden');
642
+ });
643
+
644
+ hintDiv.classList.add('hidden');
645
+ solutionDiv.classList.add('hidden');
646
+ }
647
+
648
+ function getTrickTitle(trick) {
649
+ const titles = {
650
+ 'ekadhikena': 'Ekadhikena Purvena',
651
+ 'nikhilam': 'Nikhilam Navatashcaramam',
652
+ 'urdhva': 'Urdhva-Tiryagbhyam'
653
+ };
654
+ return titles[trick] || 'Vedic Math Trick';
655
+ }
656
+
657
+ function getTrickDifficulty(trick) {
658
+ const difficulties = {
659
+ 'ekadhikena': 'Easy',
660
+ 'nikhilam': 'Medium',
661
+ 'urdhva': 'Hard'
662
+ };
663
+ return difficulties[trick] || 'Medium';
664
+ }
665
+
666
+ function getDifficultyClass(difficulty) {
667
+ const classes = {
668
+ 'easy': 'bg-green-100 text-green-800 text-sm px-3 py-1 rounded-full mr-3',
669
+ 'medium': 'bg-yellow-100 text-yellow-800 text-sm px-3 py-1 rounded-full mr-3',
670
+ 'hard': 'bg-red-100 text-red-800 text-sm px-3 py-1 rounded-full mr-3'
671
+ };
672
+ return classes[difficulty] || 'bg-gray-100 text-gray-800 text-sm px-3 py-1 rounded-full mr-3';
673
+ }
674
+
675
+ function createConfetti() {
676
+ for (let i = 0; i < 50; i++) {
677
+ const confetti = document.createElement('div');
678
+ confetti.className = 'confetti';
679
+ confetti.style.left = Math.random() * 100 + 'vw';
680
+ confetti.style.backgroundColor = `hsl(${Math.random() * 360}, 100%, 50%)`;
681
+ confetti.style.animationDuration = Math.random() * 2 + 1 + 's';
682
+ document.body.appendChild(confetti);
683
+
684
+ setTimeout(() => {
685
+ confetti.remove();
686
+ }, 3000);
687
+ }
688
+ }
689
+
690
+ function addPoints(amount) {
691
+ points += amount;
692
+ pointsDisplay.textContent = points;
693
+
694
+ // Add animation to points display
695
+ pointsDisplay.classList.add('animate-bounce');
696
+ setTimeout(() => {
697
+ pointsDisplay.classList.remove('animate-bounce');
698
+ }, 1000);
699
+ }
700
+
701
+ function generatePracticeProblem() {
702
+ const problems = [
703
+ {
704
+ question: "What is 25 × 25?",
705
+ hint: "(Use the Ekadhikena Purvena method)",
706
+ answer: "625",
707
+ explanation: "2 × 3 = 6, then add 25 to get 625"
708
+ },
709
+ {
710
+ question: "What is 35 × 35?",
711
+ hint: "(Use the Ekadhikena Purvena method)",
712
+ answer: "1225",
713
+ explanation: "3 × 4 = 12, then add 25 to get 1225"
714
+ },
715
+ {
716
+ question: "What is 45 × 45?",
717
+ hint: "(Use the Ekadhikena Purvena method)",
718
+ answer: "2025",
719
+ explanation: "4 × 5 = 20, then add 25 to get 2025"
720
+ },
721
+ {
722
+ question: "What is 75 × 75?",
723
+ hint: "(Use the Ekadhikena Purvena method)",
724
+ answer: "5625",
725
+ explanation: "7 × 8 = 56, then add 25 to get 5625"
726
+ },
727
+ {
728
+ question: "What is 95 × 95?",
729
+ hint: "(Use the Ekadhikena Purvena method)",
730
+ answer: "9025",
731
+ explanation: "9 × 10 = 90, then add 25 to get 9025"
732
+ }
733
+ ];
734
+
735
+ // Select a random problem
736
+ const randomProblem = problems[Math.floor(Math.random() * problems.length)];
737
+
738
+ // Update the UI
739
+ document.querySelector('#current-problem p:nth-child(1)').textContent = randomProblem.question;
740
+ document.querySelector('#current-problem p:nth-child(2)').textContent = randomProblem.hint;
741
+ practiceAnswerInput.value = '';
742
+ practiceAnswerInput.dataset.correctAnswer = randomProblem.answer;
743
+ practiceAnswerInput.dataset.explanation = randomProblem.explanation;
744
+ practiceFeedbackDiv.classList.add('hidden');
745
+ }
746
+
747
+ function checkPracticeAnswer() {
748
+ const userAnswer = practiceAnswerInput.value.trim();
749
+ const correctAnswer = practiceAnswerInput.dataset.correctAnswer;
750
+ const explanation = practiceAnswerInput.dataset.explanation;
751
+
752
+ if (userAnswer === correctAnswer) {
753
+ // Correct answer
754
+ practiceFeedbackDiv.className = 'bg-green-50 p-4 rounded-lg mb-4';
755
+ document.getElementById('feedback-icon').innerHTML = '<i class="fas fa-check-circle text-green-500"></i>';
756
+ document.getElementById('feedback-message').textContent = 'Correct! Well done!';
757
+ document.getElementById('feedback-explanation').textContent = explanation;
758
+
759
+ // Add to score
760
+ practiceScore += 10;
761
+ practiceScoreDisplay.textContent = practiceScore;
762
+
763
+ // Add points
764
+ addPoints(5);
765
+ } else {
766
+ // Incorrect answer
767
+ practiceFeedbackDiv.className = 'bg-red-50 p-4 rounded-lg mb-4';
768
+ document.getElementById('feedback-icon').innerHTML = '<i class="fas fa-times-circle text-red-500"></i>';
769
+ document.getElementById('feedback-message').textContent = 'Not quite right. Try again!';
770
+ document.getElementById('feedback-explanation').textContent = `The correct answer is ${correctAnswer}. ${explanation}`;
771
+ }
772
+
773
+ practiceFeedbackDiv.classList.remove('hidden');
774
+ }
775
+ </script>
776
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=onlyoneritz/vedicmath" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
777
+ </html>
prompts.txt ADDED
File without changes