Digiator commited on
Commit
4d6ad68
Β·
verified Β·
1 Parent(s): 55196ae

when adding a new list

Browse files

Please enter both a list name and flashcards!

and no new button added - Initial Deployment

Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +491 -18
  3. prompts.txt +425 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: German Flashcards
3
- emoji: ⚑
4
- colorFrom: red
5
- colorTo: purple
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: german-flashcards
3
+ emoji: 🐳
4
+ colorFrom: gray
5
+ colorTo: gray
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,492 @@
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>German Flashcards</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
9
+ <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
10
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
11
+ <script src="https://unpkg.com/feather-icons"></script>
12
+ <style>
13
+ .flashcard {
14
+ perspective: 1000px;
15
+ min-height: 200px;
16
+ }
17
+ .flashcard-inner {
18
+ transition: transform 0.6s;
19
+ transform-style: preserve-3d;
20
+ }
21
+ .flashcard.flipped .flashcard-inner {
22
+ transform: rotateY(180deg);
23
+ }
24
+ .flashcard-front, .flashcard-back {
25
+ backface-visibility: hidden;
26
+ position: absolute;
27
+ width: 100%;
28
+ height: 100%;
29
+ }
30
+ .flashcard-back {
31
+ transform: rotateY(180deg);
32
+ }
33
+ .progress-bar {
34
+ transition: width 0.3s ease;
35
+ }
36
+ </style>
37
+ </head>
38
+ <body class="bg-gray-100 min-h-screen">
39
+ <div class="container mx-auto px-4 py-8">
40
+ <header class="mb-8 text-center">
41
+ <h1 class="text-4xl font-bold text-indigo-700 mb-2">German Flashcards</h1>
42
+ <p class="text-gray-600">Master German vocabulary with interactive flashcards</p>
43
+
44
+ <div class="mt-6 flex justify-center items-center space-x-4">
45
+ <div class="w-full max-w-md bg-white rounded-lg shadow p-4">
46
+ <div class="flex justify-between mb-1">
47
+ <span class="text-sm font-medium text-indigo-700">Progress</span>
48
+ <span id="progress-percentage" class="text-sm font-medium text-indigo-700">0%</span>
49
+ </div>
50
+ <div class="w-full bg-gray-200 rounded-full h-2.5">
51
+ <div id="progress-bar" class="progress-bar bg-indigo-600 h-2.5 rounded-full" style="width: 0%"></div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </header>
56
+
57
+ <div class="mb-8 flex flex-col items-center space-y-4">
58
+ <div class="w-full max-w-md bg-white rounded-lg shadow p-4">
59
+ <h3 class="text-lg font-medium text-indigo-700 mb-2">Add New Flashcards</h3>
60
+ <input id="list-name-input" type="text" class="w-full p-2 border rounded mb-2" placeholder="List name (e.g. 'Food Vocabulary')">
61
+ <textarea id="new-flashcards-input" class="w-full h-40 p-2 border rounded mb-2" placeholder="Enter German - English pairs (e.g. neun – nine)"></textarea>
62
+ <button id="add-flashcards-btn" class="px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition flex items-center justify-center w-full">
63
+ <i data-feather="plus" class="mr-2"></i> Add Flashcards
64
+ </button>
65
+ </div>
66
+
67
+ <div class="flex flex-col items-center space-y-4">
68
+ <div class="flex justify-center space-x-4">
69
+ <button id="shuffle-btn" class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition flex items-center">
70
+ <i data-feather="shuffle" class="mr-2"></i> Shuffle
71
+ </button>
72
+ <button id="reset-btn" class="px-4 py-2 bg-gray-600 text-white rounded-lg hover:bg-gray-700 transition flex items-center">
73
+ <i data-feather="refresh-cw" class="mr-2"></i> Reset Progress
74
+ </button>
75
+ <button id="show-original-btn" class="px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition flex items-center">
76
+ <i data-feather="book" class="mr-2"></i> Original List
77
+ </button>
78
+ </div>
79
+ <div id="custom-lists-container" class="flex flex-wrap justify-center gap-2">
80
+ <!-- Custom list buttons will be added here -->
81
+ </div>
82
+ </div>
83
+ </div>
84
+
85
+ <div id="flashcards-container" class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-6">
86
+ <!-- Flashcards will be inserted here by JavaScript -->
87
+ </div>
88
+ </div>
89
+
90
+ <script>
91
+ document.addEventListener('DOMContentLoaded', function() {
92
+ feather.replace();
93
+ AOS.init();
94
+
95
+ // Initial flashcards data
96
+ const initialFlashcards = [
97
+ { german: "Bad", english: "bath", mastered: false },
98
+ { german: "Sofa", english: "sofa", mastered: false },
99
+ { german: "mal", english: "time / once", mastered: false },
100
+ { german: "Banane", english: "banana", mastered: false },
101
+ { german: "nach", english: "after / to / toward", mastered: false },
102
+ { german: "Zahn", english: "tooth", mastered: false },
103
+ { german: "Bahn", english: "train / railway", mastered: false },
104
+ { german: "Aal", english: "eel", mastered: false },
105
+ { german: "Staat", english: "state / country", mastered: false },
106
+ { german: "man", english: "one / people (impersonal pronoun)", mastered: false },
107
+ { german: "Mann", english: "man", mastered: false },
108
+ { german: "Ball", english: "ball", mastered: false },
109
+ { german: "Apfel", english: "apple", mastered: false },
110
+ { german: "lesen", english: "to read", mastered: false },
111
+ { german: "eben", english: "just / exactly", mastered: false },
112
+ { german: "leben", english: "to live", mastered: false },
113
+ { german: "zehn", english: "ten", mastered: false },
114
+ { german: "sehen", english: "to see", mastered: false },
115
+ { german: "See", english: "lake / sea (context dependent)", mastered: false },
116
+ { german: "Tee", english: "tea", mastered: false },
117
+ { german: "Hemd", english: "shirt", mastered: false },
118
+ { german: "hell", english: "bright / light", mastered: false },
119
+ { german: "KΓΌche", english: "kitchen", mastered: false },
120
+ { german: "Garage", english: "garage", mastered: false },
121
+ { german: "bitte", english: "please", mastered: false },
122
+ { german: "Treppe", english: "stairs", mastered: false },
123
+ { german: "gefallen", english: "to please / to like", mastered: false },
124
+ { german: "bekommen", english: "to get / to receive", mastered: false },
125
+ { german: "erzΓ€hlen", english: "to tell / to narrate", mastered: false },
126
+ { german: "er", english: "he", mastered: false },
127
+ { german: "Meer", english: "sea", mastered: false },
128
+ { german: "sehr", english: "very", mastered: false },
129
+ { german: "schwer", english: "heavy / difficult", mastered: false },
130
+ { german: "LΓΆcher", english: "holes", mastered: false },
131
+ { german: "BΓΌcher", english: "books", mastered: false },
132
+ { german: "haben", english: "to have", mastered: false },
133
+ { german: "wir", english: "we", mastered: false },
134
+ { german: "Igel", english: "hedgehog", mastered: false },
135
+ { german: "ihr", english: "you (plural) / her", mastered: false },
136
+ { german: "ihm", english: "him", mastered: false },
137
+ { german: "Sie", english: "you (formal) / she (capitalized = You)", mastered: false },
138
+ { german: "sieben", english: "seven", mastered: false },
139
+ { german: "sieht", english: "sees", mastered: false },
140
+ { german: "Brille", english: "glasses", mastered: false },
141
+ { german: "holen", english: "to fetch / get", mastered: false },
142
+ { german: "bogen", english: "bow / curve / arch", mastered: false },
143
+ { german: "Obst", english: "fruit", mastered: false },
144
+ { german: "Ohr", english: "ear", mastered: false },
145
+ { german: "Bohne", english: "bean", mastered: false },
146
+ { german: "Boot", english: "boat", mastered: false },
147
+ { german: "doch", english: "but / however / indeed", mastered: false },
148
+ { german: "Loch", english: "hole", mastered: false },
149
+ { german: "kommen", english: "to come", mastered: false },
150
+ { german: "noch", english: "still / yet", mastered: false },
151
+ { german: "Mond", english: "moon", mastered: false },
152
+ { german: "Schule", english: "school", mastered: false },
153
+ { german: "Ufer", english: "shore / bank", mastered: false },
154
+ { german: "Buch", english: "book", mastered: false },
155
+ { german: "Stuhl", english: "chair", mastered: false },
156
+ { german: "Schuhe", english: "shoes", mastered: false },
157
+ { german: "Mutter", english: "mother", mastered: false },
158
+ { german: "Mund", english: "mouth", mastered: false },
159
+ { german: "KΓ€se", english: "cheese", mastered: false },
160
+ { german: "TΓ€ter", english: "perpetrator / offender", mastered: false },
161
+ { german: "ZΓ€hne", english: "teeth", mastered: false },
162
+ { german: "Γ„pfel", english: "apples", mastered: false },
163
+ { german: "MΓ€nner", english: "men", mastered: false },
164
+ { german: "LΓΆwe", english: "lion", mastered: false },
165
+ { german: "hΓΆren", english: "to hear", mastered: false },
166
+ { german: "BΓΆse", english: "evil / bad", mastered: false },
167
+ { german: "SΓΆhne", english: "sons", mastered: false },
168
+ { german: "LΓΆhne", english: "wages", mastered: false },
169
+ { german: "vΓΆllig", english: "completely", mastered: false },
170
+ { german: "zwΓΆlf", english: "twelve", mastered: false },
171
+ { german: "SchΓΌler", english: "student / pupil", mastered: false },
172
+ { german: "Übung", english: "exercise / practice", mastered: false },
173
+ { german: "MΓΌhe", english: "effort / trouble", mastered: false },
174
+ { german: "StΓΌhle", english: "chairs", mastered: false },
175
+ { german: "GlΓΌck", english: "luck / happiness", mastered: false },
176
+ { german: "fΓΌnf", english: "five", mastered: false },
177
+ { german: "Ei", english: "egg", mastered: false },
178
+ { german: "eins", english: "one", mastered: false },
179
+ { german: "Mai", english: "May", mastered: false },
180
+ { german: "Waise", english: "orphan", mastered: false },
181
+ { german: "Mayer / Meyer / Bayer", english: "surnames", mastered: false },
182
+ { german: "Auge", english: "eye", mastered: false },
183
+ { german: "Auto", english: "car", mastered: false },
184
+ { german: "Bauch", english: "belly / stomach", mastered: false },
185
+ { german: "Kakao", english: "cocoa", mastered: false },
186
+ { german: "Leute", english: "people", mastered: false },
187
+ { german: "neun", english: "nine", mastered: false },
188
+ { german: "heute", english: "today", mastered: false },
189
+ { german: "BΓ€uche", english: "bellies", mastered: false },
190
+ { german: "HΓ€user", english: "houses", mastered: false },
191
+ { german: "MΓ€use", english: "mice", mastered: false },
192
+ { german: "Ball", english: "ball", mastered: false },
193
+ { german: "Berlin", english: "Berlin", mastered: false },
194
+ { german: "Hobby", english: "hobby", mastered: false },
195
+ { german: "abfahren", english: "to depart", mastered: false },
196
+ { german: "Urlaub", english: "vacation / holiday", mastered: false },
197
+ { german: "Cent", english: "cent", mastered: false },
198
+ { german: "circa", english: "approximately", mastered: false },
199
+ { german: "CafΓ©", english: "cafΓ©", mastered: false },
200
+ { german: "Computer", english: "computer", mastered: false },
201
+ { german: "Clown", english: "clown", mastered: false },
202
+ { german: "du", english: "you (informal singular)", mastered: false },
203
+ { german: "danke", english: "thanks", mastered: false },
204
+ { german: "Ende", english: "end", mastered: false },
205
+ { german: "addieren", english: "to add (math)", mastered: false },
206
+ { german: "und", english: "and", mastered: false },
207
+ { german: "Hund", english: "dog", mastered: false },
208
+ { german: "Frau", english: "woman / Mrs.", mastered: false },
209
+ { german: "Fisch", english: "fish", mastered: false },
210
+ { german: "Hof", english: "courtyard / yard / farm", mastered: false },
211
+ { german: "Schiff", english: "ship", mastered: false },
212
+ { german: "gut", english: "good", mastered: false },
213
+ { german: "Giraffe", english: "giraffe", mastered: false },
214
+ { german: "Bagger", english: "excavator / digger", mastered: false },
215
+ { german: "montags", english: "on Mondays", mastered: false },
216
+ { german: "Tag", english: "day", mastered: false },
217
+ { german: "Weg", english: "way / path", mastered: false },
218
+ { german: "haben", english: "to have", mastered: false },
219
+ { german: "Hallo", english: "hello", mastered: false },
220
+ { german: "abholen", english: "to pick up", mastered: false },
221
+ { german: "FΓΆhn", english: "hairdryer / foehn wind", mastered: false },
222
+ { german: "ja", english: "yes", mastered: false },
223
+ { german: "Jacke", english: "jacket", mastered: false },
224
+ { german: "Journal", english: "journal", mastered: false },
225
+ { german: "joggen", english: "to jog", mastered: false },
226
+ { german: "Katze", english: "cat", mastered: false },
227
+ { german: "Ecke", english: "corner", mastered: false },
228
+ { german: "Akkusativ", english: "accusative (grammar)", mastered: false },
229
+ { german: "wollen", english: "to want", mastered: false },
230
+ { german: "Lampe", english: "lampe", mastered: false },
231
+ { german: "kommen", english: "to come", mastered: false },
232
+ { german: "kΓΆnnen", english: "can / to be able to", mastered: false },
233
+ { german: "nein", english: "no", mastered: false },
234
+ { german: "Papier", english: "paper", mastered: false },
235
+ { german: "Gruppe", english: "group", mastered: false },
236
+ { german: "rot", english: "red", mastered: false },
237
+ { german: "Rhein", english: "Rhine (river)", mastered: false },
238
+ { german: "Morgen", english: "morning / tomorrow", mastered: false },
239
+ { german: "Berlin", english: "Berlin", mastered: false },
240
+ { german: "mir", english: "me", mastered: false },
241
+ { german: "so", english: "so / like that", mastered: false },
242
+ { german: "Haus", english: "house", mastered: false },
243
+ { german: "Post", english: "post / mail", mastered: false },
244
+ { german: "mΓΌssen", english: "must / have to", mastered: false },
245
+ { german: "Tante", english: "aunt", mastered: false },
246
+ { german: "Theater", english: "theater", mastered: false },
247
+ { german: "Stadt", english: "city / town", mastered: false },
248
+ { german: "vier", english: "four", mastered: false },
249
+ { german: "Vater", english: "father", mastered: false },
250
+ { german: "Vogel", english: "bird", mastered: false },
251
+ { german: "Vase", english: "vase", mastered: false },
252
+ { german: "Kurve", english: "curve", mastered: false },
253
+ { german: "Wagen", english: "car / vehicle", mastered: false },
254
+ { german: "Xylophon", english: "xylophone", mastered: false },
255
+ { german: "Typ", english: "type / guy", mastered: false },
256
+ { german: "Γ„gypten", english: "Egypt", mastered: false },
257
+ { german: "Yacht", english: "yacht", mastered: false },
258
+ { german: "Yak", english: "yak", mastered: false },
259
+ { german: "Zug", english: "train", mastered: false },
260
+ { german: "Skizze", english: "sketch", mastered: false },
261
+ { german: "Satz", english: "sentence", mastered: false },
262
+ { german: "rechts", english: "right", mastered: false },
263
+ { german: "Straße", english: "street", mastered: false },
264
+ { german: "Fuß", english: "foot", mastered: false },
265
+ { german: "heißen", english: "to be called / to mean", mastered: false },
266
+ { german: "nach", english: "after / to", mastered: false },
267
+ { german: "acht", english: "eight", mastered: false },
268
+ { german: "Nacht", english: "night", mastered: false },
269
+ { german: "NΓ€chte", english: "nights", mastered: false },
270
+ { german: "Milch", english: "milk", mastered: false },
271
+ { german: "China", english: "China", mastered: false },
272
+ { german: "Sachsen", english: "Saxony", mastered: false },
273
+ { german: "nΓ€chst", english: "next", mastered: false },
274
+ { german: "sechs", english: "six", mastered: false },
275
+ { german: "machst", english: "(you) do / make", mastered: false },
276
+ { german: "machen", english: "to do / to make", mastered: false },
277
+ { german: "Charakter", english: "character", mastered: false },
278
+ { german: "Chor", english: "choir", mastered: false },
279
+ { german: "Chance", english: "chance", mastered: false },
280
+ { german: "Chef", english: "boss", mastered: false },
281
+ { german: "Chile", english: "Chile", mastered: false },
282
+ { german: "Checkliste", english: "checklist", mastered: false },
283
+ { german: "Stadtbewohner", english: "city dweller", mastered: false },
284
+ { german: "KΓΆnigreich", english: "kingdom", mastered: false },
285
+ { german: "KΓΆnig", english: "king", mastered: false },
286
+ { german: "Honig", english: "honey", mastered: false },
287
+ { german: "Photo", english: "photo", mastered: false },
288
+ { german: "Qualle", english: "jellyfish", mastered: false },
289
+ { german: "Quelle", english: "source / spring", mastered: false },
290
+ { german: "Quatsch", english: "nonsense", mastered: false },
291
+ { german: "schreiben", english: "to write", mastered: false },
292
+ { german: "Großstadt", english: "big city", mastered: false },
293
+ { german: "Radsport", english: "cycling", mastered: false },
294
+ { german: "spΓ€ter", english: "later", mastered: false },
295
+ { german: "Sport", english: "sport", mastered: false },
296
+ { german: "Pferd", english: "horse", mastered: false },
297
+ { german: "Nation", english: "nation", mastered: false },
298
+ { german: "Situation", english: "situation", mastered: false }
299
+ ];
300
+
301
+ // Get flashcards from localStorage or use initial data
302
+ let flashcards = JSON.parse(localStorage.getItem('germanFlashcards')) || initialFlashcards;
303
+ let customFlashcards = JSON.parse(localStorage.getItem('customGermanFlashcards')) || [];
304
+
305
+ // Render flashcards
306
+ function renderFlashcards() {
307
+ const container = document.getElementById('flashcards-container');
308
+ container.innerHTML = '';
309
+
310
+ flashcards.forEach((card, index) => {
311
+ const flashcard = document.createElement('div');
312
+ flashcard.className = `flashcard ${card.mastered ? 'border-2 border-green-500' : ''}`;
313
+ flashcard.dataset.index = index;
314
+
315
+ flashcard.innerHTML = `
316
+ <div class="flashcard-inner h-full">
317
+ <div class="flashcard-front bg-white rounded-lg shadow-md p-6 flex flex-col items-center justify-center cursor-pointer h-full">
318
+ <h3 class="text-2xl font-bold text-center text-indigo-700">${card.german}</h3>
319
+ <p class="text-gray-500 mt-2">Click to flip</p>
320
+ ${card.mastered ? '<i data-feather="check-circle" class="text-green-500 mt-2"></i>' : ''}
321
+ </div>
322
+ <div class="flashcard-back bg-indigo-100 rounded-lg shadow-md p-6 flex flex-col items-center justify-center cursor-pointer h-full">
323
+ <h3 class="text-xl font-semibold text-center text-gray-800">${card.english}</h3>
324
+ <div class="mt-4 flex space-x-2">
325
+ <button class="master-btn px-3 py-1 ${card.mastered ? 'bg-green-500' : 'bg-gray-500'} text-white rounded text-sm">
326
+ ${card.mastered ? 'Mastered' : 'Mark as Mastered'}
327
+ </button>
328
+ </div>
329
+ </div>
330
+ </div>
331
+ `;
332
+
333
+ container.appendChild(flashcard);
334
+
335
+ // Add click event to flip card
336
+ flashcard.addEventListener('click', function() {
337
+ if (!event.target.classList.contains('master-btn')) {
338
+ this.classList.toggle('flipped');
339
+ }
340
+ });
341
+ });
342
+
343
+ // Add event listeners to master buttons
344
+ document.querySelectorAll('.master-btn').forEach(btn => {
345
+ btn.addEventListener('click', function(e) {
346
+ e.stopPropagation();
347
+ const index = this.closest('.flashcard').dataset.index;
348
+ flashcards[index].mastered = !flashcards[index].mastered;
349
+ saveFlashcards();
350
+ updateProgress();
351
+ renderFlashcards();
352
+ });
353
+ });
354
+
355
+ feather.replace();
356
+ updateProgress();
357
+ }
358
+
359
+ // Save flashcards to localStorage
360
+ function saveFlashcards() {
361
+ localStorage.setItem('germanFlashcards', JSON.stringify(flashcards));
362
+ }
363
+
364
+ // Update progress bar
365
+ function updateProgress() {
366
+ const masteredCount = flashcards.filter(card => card.mastered).length;
367
+ const totalCount = flashcards.length;
368
+ const percentage = Math.round((masteredCount / totalCount) * 100);
369
+
370
+ document.getElementById('progress-bar').style.width = `${percentage}%`;
371
+ document.getElementById('progress-percentage').textContent = `${percentage}%`;
372
+ }
373
+
374
+ // Shuffle flashcards
375
+ document.getElementById('shuffle-btn').addEventListener('click', function() {
376
+ flashcards = shuffleArray(flashcards);
377
+ saveFlashcards();
378
+ renderFlashcards();
379
+ });
380
+
381
+ // Reset progress
382
+ document.getElementById('reset-btn').addEventListener('click', function() {
383
+ if (confirm('Are you sure you want to reset all progress?')) {
384
+ flashcards = initialFlashcards.map(card => ({ ...card, mastered: false }));
385
+ saveFlashcards();
386
+ renderFlashcards();
387
+ }
388
+ });
389
+
390
+ // Helper function to shuffle array
391
+ function shuffleArray(array) {
392
+ const newArray = [...array];
393
+ for (let i = newArray.length - 1; i > 0; i--) {
394
+ const j = Math.floor(Math.random() * (i + 1));
395
+ [newArray[i], newArray[j]] = [newArray[j], newArray[i]];
396
+ }
397
+ return newArray;
398
+ }
399
+
400
+
401
+ // Object to store all custom lists
402
+ let customLists = JSON.parse(localStorage.getItem('customGermanLists'));
403
+ if (!customLists) {
404
+ customLists = {};
405
+ localStorage.setItem('customGermanLists', JSON.stringify(customLists));
406
+ }
407
+
408
+ // Render custom list buttons
409
+ function renderCustomListButtons() {
410
+ const container = document.getElementById('custom-lists-container');
411
+ container.innerHTML = '';
412
+
413
+ Object.keys(customLists).forEach(listName => {
414
+ const button = document.createElement('button');
415
+ button.className = 'px-4 py-2 bg-purple-600 text-white rounded-lg hover:bg-purple-700 transition flex items-center';
416
+ button.innerHTML = `<i data-feather="list" class="mr-2"></i> ${listName}`;
417
+ button.addEventListener('click', () => {
418
+ flashcards = [...customLists[listName]];
419
+ renderFlashcards();
420
+ });
421
+ container.appendChild(button);
422
+ });
423
+
424
+ feather.replace();
425
+ }
426
+
427
+ // Show original flashcards
428
+ document.getElementById('show-original-btn').addEventListener('click', function() {
429
+ flashcards = [...initialFlashcards];
430
+ renderFlashcards();
431
+ });
432
+
433
+ // Parse and add new flashcards
434
+ document.getElementById('add-flashcards-btn').addEventListener('click', function() {
435
+ const input = document.getElementById('new-flashcards-input').value.trim();
436
+ const listName = document.getElementById('list-name-input').value.trim();
437
+
438
+ if (!input) {
439
+ alert('Please enter flashcards!');
440
+ return;
441
+ }
442
+ if (!listName) {
443
+ alert('Please enter a list name!');
444
+ return;
445
+ }
446
+
447
+ const lines = input.split('\n');
448
+ const newCards = [];
449
+
450
+ lines.forEach(line => {
451
+ const parts = line.split('–').map(part => part.trim());
452
+ if (parts.length === 2 && parts[0] && parts[1]) {
453
+ newCards.push({
454
+ german: parts[0],
455
+ english: parts[1],
456
+ mastered: false
457
+ });
458
+ }
459
+ });
460
+
461
+ if (newCards.length > 0) {
462
+ // Initialize customLists if it doesn't exist
463
+ if (!customLists) {
464
+ customLists = {};
465
+ }
466
+
467
+ // Add or update the custom list
468
+ customLists[listName] = newCards;
469
+ localStorage.setItem('customGermanLists', JSON.stringify(customLists));
470
+
471
+ document.getElementById('new-flashcards-input').value = '';
472
+ document.getElementById('list-name-input').value = '';
473
+
474
+ // Update the flashcards to show the newly added list
475
+ flashcards = [...newCards];
476
+
477
+ // Save and render
478
+ saveFlashcards();
479
+ renderFlashcards();
480
+ renderCustomListButtons();
481
+
482
+ alert(`Added ${newCards.length} new flashcards to "${listName}" list!`);
483
+ }
484
+ });
485
+
486
+ // Initial render
487
+ renderFlashcards();
488
+ renderCustomListButtons();
489
+ });
490
+ </script>
491
+ </body>
492
  </html>
prompts.txt ADDED
@@ -0,0 +1,425 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ make me a site takes flash card like below
2
+
3
+ Bad – bath
4
+
5
+ Sofa – sofa
6
+
7
+ mal – time / once
8
+
9
+ Banane – banana
10
+
11
+ nach – after / to / toward
12
+
13
+ Zahn – tooth
14
+
15
+ Bahn – train / railway
16
+
17
+ Aal – eel
18
+
19
+ Staat – state / country
20
+
21
+ man – one / people (impersonal pronoun)
22
+
23
+ Mann – man
24
+
25
+ Ball – ball
26
+
27
+ Apfel – apple
28
+
29
+ lesen – to read
30
+
31
+ eben – just / exactly
32
+
33
+ leben – to live
34
+
35
+ zehn – ten
36
+
37
+ sehen – to see
38
+
39
+ See – lake / sea (context dependent)
40
+
41
+ Tee – tea
42
+
43
+ Hemd – shirt
44
+
45
+ hell – bright / light
46
+
47
+ KΓΌche – kitchen
48
+
49
+ Garage – garage
50
+
51
+ bitte – please
52
+
53
+ Treppe – stairs
54
+
55
+ gefallen – to please / to like
56
+
57
+ bekommen – to get / to receive
58
+
59
+ erzΓ€hlen – to tell / to narrate
60
+
61
+ er – he
62
+
63
+ Meer – sea
64
+
65
+ sehr – very
66
+
67
+ schwer – heavy / difficult
68
+
69
+ LΓΆcher – holes
70
+
71
+ BΓΌcher – books
72
+
73
+ haben – to have
74
+
75
+ wir – we
76
+
77
+ Igel – hedgehog
78
+
79
+ ihr – you (plural) / her
80
+
81
+ ihm – him
82
+
83
+ Sie – you (formal) / she (capitalized = You)
84
+
85
+ sieben – seven
86
+
87
+ sieht – sees
88
+
89
+ Brille – glasses
90
+
91
+ holen – to fetch / get
92
+
93
+ bogen – bow / curve / arch
94
+
95
+ Obst – fruit
96
+
97
+ Ohr – ear
98
+
99
+ Bohne – bean
100
+
101
+ Boot – boat
102
+
103
+ doch – but / however / indeed
104
+
105
+ Loch – hole
106
+
107
+ kommen – to come
108
+
109
+ noch – still / yet
110
+
111
+ Mond – moon
112
+
113
+ Schule – school
114
+
115
+ Ufer – shore / bank
116
+
117
+ Buch – book
118
+
119
+ Stuhl – chair
120
+
121
+ Schuhe – shoes
122
+
123
+ Mutter – mother
124
+
125
+ Mund – mouth
126
+
127
+ KΓ€se – cheese
128
+
129
+ TΓ€ter – perpetrator / offender
130
+
131
+ ZΓ€hne – teeth
132
+
133
+ Γ„pfel – apples
134
+
135
+ MΓ€nner – men
136
+
137
+ LΓΆwe – lion
138
+
139
+ hΓΆren – to hear
140
+
141
+ BΓΆse – evil / bad
142
+
143
+ SΓΆhne – sons
144
+
145
+ LΓΆhne – wages
146
+
147
+ vΓΆllig – completely
148
+
149
+ zwΓΆlf – twelve
150
+
151
+ SchΓΌler – student / pupil
152
+
153
+ Übung – exercise / practice
154
+
155
+ MΓΌhe – effort / trouble
156
+
157
+ StΓΌhle – chairs
158
+
159
+ GlΓΌck – luck / happiness
160
+
161
+ fΓΌnf – five
162
+
163
+ Ei – egg
164
+
165
+ eins – one
166
+
167
+ Mai – May
168
+
169
+ Waise – orphan
170
+
171
+ Mayer / Meyer / Bayer – surnames
172
+
173
+ Auge – eye
174
+
175
+ Auto – car
176
+
177
+ Bauch – belly / stomach
178
+
179
+ Kakao – cocoa
180
+
181
+ Leute – people
182
+
183
+ neun – nine
184
+
185
+ heute – today
186
+
187
+ BΓ€uche – bellies
188
+
189
+ HΓ€user – houses
190
+
191
+ MΓ€use – mice
192
+
193
+ Ball – ball
194
+
195
+ Berlin – Berlin
196
+
197
+ Hobby – hobby
198
+
199
+ abfahren – to depart
200
+
201
+ Urlaub – vacation / holiday
202
+
203
+ Cent – cent
204
+
205
+ circa – approximately
206
+
207
+ CafΓ© – cafΓ©
208
+
209
+ Computer – computer
210
+
211
+ Clown – clown
212
+
213
+ du – you (informal singular)
214
+
215
+ danke – thanks
216
+
217
+ Ende – end
218
+
219
+ addieren – to add (math)
220
+
221
+ und – and
222
+
223
+ Hund – dog
224
+
225
+ Frau – woman / Mrs.
226
+
227
+ Fisch – fish
228
+
229
+ Hof – courtyard / yard / farm
230
+
231
+ Schiff – ship
232
+
233
+ gut – good
234
+
235
+ Giraffe – giraffe
236
+
237
+ Bagger – excavator / digger
238
+
239
+ montags – on Mondays
240
+
241
+ Tag – day
242
+
243
+ Weg – way / path
244
+
245
+ haben – to have
246
+
247
+ Hallo – hello
248
+
249
+ abholen – to pick up
250
+
251
+ FΓΆhn – hairdryer / foehn wind
252
+
253
+ ja – yes
254
+
255
+ Jacke – jacket
256
+
257
+ Journal – journal
258
+
259
+ joggen – to jog
260
+
261
+ Katze – cat
262
+
263
+ Ecke – corner
264
+
265
+ Akkusativ – accusative (grammar)
266
+
267
+ wollen – to want
268
+
269
+ Lampe – lamp
270
+
271
+ kommen – to come
272
+
273
+ kΓΆnnen – can / to be able to
274
+
275
+ nein – no
276
+
277
+ Papier – paper
278
+
279
+ Gruppe – group
280
+
281
+ rot – red
282
+
283
+ Rhein – Rhine (river)
284
+
285
+ Morgen – morning / tomorrow
286
+
287
+ Berlin – Berlin
288
+
289
+ mir – me
290
+
291
+ so – so / like that
292
+
293
+ Haus – house
294
+
295
+ Post – post / mail
296
+
297
+ mΓΌssen – must / have to
298
+
299
+ Tante – aunt
300
+
301
+ Theater – theater
302
+
303
+ Stadt – city / town
304
+
305
+ vier – four
306
+
307
+ Vater – father
308
+
309
+ Vogel – bird
310
+
311
+ Vase – vase
312
+
313
+ Kurve – curve
314
+
315
+ Wagen – car / vehicle
316
+
317
+ Xylophon – xylophone
318
+
319
+ Typ – type / guy
320
+
321
+ Γ„gypten – Egypt
322
+
323
+ Yacht – yacht
324
+
325
+ Yak – yak
326
+
327
+ Zug – train
328
+
329
+ Skizze – sketch
330
+
331
+ Satz – sentence
332
+
333
+ rechts – right
334
+
335
+ Straße – street
336
+
337
+ Fuß – foot
338
+
339
+ heißen – to be called / to mean
340
+
341
+ nach – after / to
342
+
343
+ acht – eight
344
+
345
+ Nacht – night
346
+
347
+ NΓ€chte – nights
348
+
349
+ Milch – milk
350
+
351
+ China – China
352
+
353
+ Sachsen – Saxony
354
+
355
+ nΓ€chst – next
356
+
357
+ sechs – six
358
+
359
+ machst – (you) do / make
360
+
361
+ machen – to do / to make
362
+
363
+ Charakter – character
364
+
365
+ Chor – choir
366
+
367
+ Chance – chance
368
+
369
+ Chef – boss
370
+
371
+ Chile – Chile
372
+
373
+ Checkliste – checklist
374
+
375
+ Stadtbewohner – city dweller
376
+
377
+ KΓΆnigreich – kingdom
378
+
379
+ KΓΆnig – king
380
+
381
+ Honig – honey
382
+
383
+ Photo – photo
384
+
385
+ Qualle – jellyfish
386
+
387
+ Quelle – source / spring
388
+
389
+ Quatsch – nonsense
390
+
391
+ schreiben – to write
392
+
393
+ Großstadt – big city
394
+
395
+ Radsport – cycling
396
+
397
+ spΓ€ter – later
398
+
399
+ Sport – sport
400
+
401
+ Pferd – horse
402
+
403
+ Nation – nation
404
+
405
+ Situation – situation
406
+
407
+ and display it in a glance
408
+
409
+ save the data in local storage
410
+ Nice make me an input to take german - english words as below format
411
+
412
+ neun – nine
413
+
414
+ first word is german, second is english
415
+
416
+ once parsed save it in a different list name and add a button to display it
417
+
418
+ save the result in local storage
419
+ Have you added a time out on show custom it reverts back to original list
420
+ add a button for original list and also each time a user add input creat a new button linked to the list
421
+ it's better to take list name input
422
+ when adding a new list
423
+ Please enter both a list name and flashcards!
424
+
425
+ and no new button added