akhaliq HF Staff commited on
Commit
3650441
·
verified ·
1 Parent(s): 42258c0

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +1366 -19
index.html CHANGED
@@ -1,19 +1,1366 @@
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
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Reminders - Apple Style Todo</title>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ :root {
11
+ --primary: #007AFF;
12
+ --primary-dark: #0051D5;
13
+ --primary-light: #5AC8FA;
14
+ --secondary: #FF3B30;
15
+ --success: #34C759;
16
+ --warning: #FF9500;
17
+ --info: #5AC8FA;
18
+ --dark: #1C1C1E;
19
+ --light: #F2F2F7;
20
+ --gray: #8E8E93;
21
+ --gray-light: #E5E5EA;
22
+ --white: #FFFFFF;
23
+ --system-gray: #C7C7CC;
24
+ --system-gray2: #AEAEB2;
25
+ --system-gray3: #8E8E93;
26
+ --system-gray4: #636366;
27
+ --system-gray5: #48484A;
28
+ --system-gray6: #363638;
29
+ --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
30
+ --shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
31
+ --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
32
+ --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
33
+ --radius: 20px;
34
+ --radius-sm: 12px;
35
+ --radius-xs: 8px;
36
+ }
37
+
38
+ [data-theme="dark"] {
39
+ --light: #000000;
40
+ --gray-light: #1C1C1E;
41
+ --white: #1C1C1E;
42
+ --dark: #FFFFFF;
43
+ --gray: #AEAEB2;
44
+ --system-gray: #48484A;
45
+ --system-gray2: #636366;
46
+ --system-gray3: #8E8E93;
47
+ --system-gray4: #AEAEB2;
48
+ --system-gray5: #C7C7CC;
49
+ --system-gray6: #D1D1D6;
50
+ }
51
+
52
+ * {
53
+ margin: 0;
54
+ padding: 0;
55
+ box-sizing: border-box;
56
+ }
57
+
58
+ body {
59
+ font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
60
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
61
+ min-height: 100vh;
62
+ display: flex;
63
+ justify-content: center;
64
+ align-items: center;
65
+ padding: 20px;
66
+ transition: var(--transition);
67
+ position: relative;
68
+ overflow: hidden;
69
+ }
70
+
71
+ [data-theme="dark"] body {
72
+ background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
73
+ }
74
+
75
+ .background-gradient {
76
+ position: fixed;
77
+ top: 0;
78
+ left: 0;
79
+ width: 100%;
80
+ height: 100%;
81
+ background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
82
+ radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
83
+ radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
84
+ z-index: -1;
85
+ }
86
+
87
+ .container {
88
+ width: 100%;
89
+ max-width: 920px;
90
+ background: rgba(255, 255, 255, 0.95);
91
+ backdrop-filter: blur(20px);
92
+ -webkit-backdrop-filter: blur(20px);
93
+ border-radius: var(--radius);
94
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
95
+ overflow: hidden;
96
+ animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
97
+ border: 1px solid rgba(255, 255, 255, 0.2);
98
+ }
99
+
100
+ [data-theme="dark"] .container {
101
+ background: rgba(28, 28, 30, 0.95);
102
+ border: 1px solid rgba(255, 255, 255, 0.1);
103
+ }
104
+
105
+ @keyframes slideUp {
106
+ from {
107
+ opacity: 0;
108
+ transform: translateY(40px) scale(0.95);
109
+ }
110
+
111
+ to {
112
+ opacity: 1;
113
+ transform: translateY(0) scale(1);
114
+ }
115
+ }
116
+
117
+ header {
118
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
119
+ color: var(--white);
120
+ padding: 32px;
121
+ position: relative;
122
+ overflow: hidden;
123
+ }
124
+
125
+ header::before {
126
+ content: '';
127
+ position: absolute;
128
+ top: 0;
129
+ left: 0;
130
+ right: 0;
131
+ bottom: 0;
132
+ background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
133
+ pointer-events: none;
134
+ }
135
+
136
+ .header-content {
137
+ display: flex;
138
+ justify-content: space-between;
139
+ align-items: center;
140
+ margin-bottom: 24px;
141
+ position: relative;
142
+ z-index: 1;
143
+ }
144
+
145
+ h1 {
146
+ font-size: 2.2em;
147
+ font-weight: 700;
148
+ letter-spacing: -0.5px;
149
+ display: flex;
150
+ align-items: center;
151
+ gap: 12px;
152
+ }
153
+
154
+ .logo {
155
+ width: 48px;
156
+ height: 48px;
157
+ background: rgba(255, 255, 255, 0.2);
158
+ border-radius: var(--radius-sm);
159
+ display: flex;
160
+ align-items: center;
161
+ justify-content: center;
162
+ font-size: 1.4em;
163
+ backdrop-filter: blur(10px);
164
+ }
165
+
166
+ .header-actions {
167
+ display: flex;
168
+ gap: 12px;
169
+ }
170
+
171
+ .theme-toggle {
172
+ background: rgba(255, 255, 255, 0.2);
173
+ backdrop-filter: blur(10px);
174
+ border: 1px solid rgba(255, 255, 255, 0.3);
175
+ color: var(--white);
176
+ width: 44px;
177
+ height: 44px;
178
+ border-radius: var(--radius-xs);
179
+ cursor: pointer;
180
+ display: flex;
181
+ align-items: center;
182
+ justify-content: center;
183
+ transition: var(--transition);
184
+ font-size: 1.1em;
185
+ }
186
+
187
+ .theme-toggle:hover {
188
+ background: rgba(255, 255, 255, 0.3);
189
+ transform: scale(1.05);
190
+ }
191
+
192
+ .theme-toggle:active {
193
+ transform: scale(0.95);
194
+ }
195
+
196
+ .stats {
197
+ display: grid;
198
+ grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
199
+ gap: 16px;
200
+ position: relative;
201
+ z-index: 1;
202
+ }
203
+
204
+ .stat-card {
205
+ background: rgba(255, 255, 255, 0.15);
206
+ backdrop-filter: blur(10px);
207
+ padding: 18px;
208
+ border-radius: var(--radius-sm);
209
+ text-align: center;
210
+ transition: var(--transition);
211
+ border: 1px solid rgba(255, 255, 255, 0.2);
212
+ }
213
+
214
+ .stat-card:hover {
215
+ background: rgba(255, 255, 255, 0.25);
216
+ transform: translateY(-2px);
217
+ }
218
+
219
+ .stat-value {
220
+ font-size: 2em;
221
+ font-weight: 600;
222
+ margin-bottom: 4px;
223
+ letter-spacing: -0.5px;
224
+ }
225
+
226
+ .stat-label {
227
+ font-size: 0.85em;
228
+ opacity: 0.9;
229
+ font-weight: 500;
230
+ text-transform: uppercase;
231
+ letter-spacing: 0.5px;
232
+ }
233
+
234
+ .progress-bar {
235
+ height: 4px;
236
+ background: rgba(255, 255, 255, 0.2);
237
+ border-radius: 2px;
238
+ overflow: hidden;
239
+ margin-top: 24px;
240
+ position: relative;
241
+ z-index: 1;
242
+ }
243
+
244
+ .progress-fill {
245
+ height: 100%;
246
+ background: linear-gradient(90deg, var(--success) 0%, #30D158 100%);
247
+ transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
248
+ border-radius: 2px;
249
+ box-shadow: 0 0 10px rgba(52, 199, 89, 0.5);
250
+ }
251
+
252
+ .add-todo-section {
253
+ padding: 32px;
254
+ background: var(--white);
255
+ border-bottom: 1px solid var(--gray-light);
256
+ }
257
+
258
+ [data-theme="dark"] .add-todo-section {
259
+ background: var(--white);
260
+ }
261
+
262
+ .add-todo-form {
263
+ display: flex;
264
+ flex-direction: column;
265
+ gap: 16px;
266
+ }
267
+
268
+ .input-group {
269
+ display: flex;
270
+ gap: 12px;
271
+ flex-wrap: wrap;
272
+ }
273
+
274
+ .todo-input {
275
+ flex: 1;
276
+ min-width: 240px;
277
+ padding: 14px 18px;
278
+ border: 1px solid var(--gray-light);
279
+ border-radius: var(--radius-sm);
280
+ font-size: 1em;
281
+ transition: var(--transition);
282
+ background: var(--light);
283
+ color: var(--dark);
284
+ font-weight: 500;
285
+ }
286
+
287
+ .todo-input:focus {
288
+ outline: none;
289
+ border-color: var(--primary);
290
+ background: var(--white);
291
+ box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
292
+ }
293
+
294
+ .select-input {
295
+ padding: 14px 18px;
296
+ border: 1px solid var(--gray-light);
297
+ border-radius: var(--radius-sm);
298
+ font-size: 1em;
299
+ background: var(--light);
300
+ color: var(--dark);
301
+ cursor: pointer;
302
+ transition: var(--transition);
303
+ font-weight: 500;
304
+ min-width: 140px;
305
+ }
306
+
307
+ .select-input:focus {
308
+ outline: none;
309
+ border-color: var(--primary);
310
+ background: var(--white);
311
+ }
312
+
313
+ .date-input {
314
+ padding: 14px 18px;
315
+ border: 1px solid var(--gray-light);
316
+ border-radius: var(--radius-sm);
317
+ font-size: 1em;
318
+ background: var(--light);
319
+ color: var(--dark);
320
+ transition: var(--transition);
321
+ font-weight: 500;
322
+ }
323
+
324
+ .add-btn {
325
+ background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
326
+ color: var(--white);
327
+ border: none;
328
+ padding: 14px 28px;
329
+ border-radius: var(--radius-sm);
330
+ font-size: 1em;
331
+ font-weight: 600;
332
+ cursor: pointer;
333
+ transition: var(--transition);
334
+ display: flex;
335
+ align-items: center;
336
+ gap: 8px;
337
+ box-shadow: var(--shadow);
338
+ }
339
+
340
+ .add-btn:hover {
341
+ transform: translateY(-2px);
342
+ box-shadow: 0 8px 20px rgba(0, 122, 255, 0.3);
343
+ }
344
+
345
+ .add-btn:active {
346
+ transform: translateY(0);
347
+ }
348
+
349
+ .controls-section {
350
+ padding: 24px 32px;
351
+ background: var(--white);
352
+ display: flex;
353
+ justify-content: space-between;
354
+ align-items: center;
355
+ flex-wrap: wrap;
356
+ gap: 16px;
357
+ border-bottom: 1px solid var(--gray-light);
358
+ }
359
+
360
+ [data-theme="dark"] .controls-section {
361
+ background: var(--white);
362
+ }
363
+
364
+ .search-box {
365
+ position: relative;
366
+ flex: 1;
367
+ max-width: 320px;
368
+ }
369
+
370
+ .search-input {
371
+ width: 100%;
372
+ padding: 12px 16px 12px 44px;
373
+ border: 1px solid var(--gray-light);
374
+ border-radius: var(--radius-sm);
375
+ font-size: 0.95em;
376
+ background: var(--light);
377
+ color: var(--dark);
378
+ transition: var(--transition);
379
+ font-weight: 500;
380
+ }
381
+
382
+ .search-input:focus {
383
+ outline: none;
384
+ border-color: var(--primary);
385
+ background: var(--white);
386
+ }
387
+
388
+ .search-icon {
389
+ position: absolute;
390
+ left: 16px;
391
+ top: 50%;
392
+ transform: translateY(-50%);
393
+ color: var(--gray);
394
+ }
395
+
396
+ .filter-tabs {
397
+ display: flex;
398
+ gap: 4px;
399
+ background: var(--light);
400
+ padding: 4px;
401
+ border-radius: var(--radius-sm);
402
+ }
403
+
404
+ .filter-tab {
405
+ padding: 10px 20px;
406
+ border: none;
407
+ background: transparent;
408
+ color: var(--gray);
409
+ font-size: 0.95em;
410
+ font-weight: 500;
411
+ cursor: pointer;
412
+ border-radius: var(--radius-xs);
413
+ transition: var(--transition);
414
+ }
415
+
416
+ .filter-tab.active {
417
+ background: var(--white);
418
+ color: var(--primary);
419
+ box-shadow: var(--shadow-sm);
420
+ }
421
+
422
+ .clear-btn {
423
+ background: var(--secondary);
424
+ color: var(--white);
425
+ border: none;
426
+ padding: 12px 20px;
427
+ border-radius: var(--radius-sm);
428
+ font-size: 0.95em;
429
+ font-weight: 600;
430
+ cursor: pointer;
431
+ transition: var(--transition);
432
+ display: flex;
433
+ align-items: center;
434
+ gap: 6px;
435
+ }
436
+
437
+ .clear-btn:hover {
438
+ background: #D70015;
439
+ transform: translateY(-1px);
440
+ }
441
+
442
+ .todos-section {
443
+ padding: 32px;
444
+ min-height: 300px;
445
+ background: var(--white);
446
+ }
447
+
448
+ [data-theme="dark"] .todos-section {
449
+ background: var(--white);
450
+ }
451
+
452
+ .todos-list {
453
+ display: flex;
454
+ flex-direction: column;
455
+ gap: 8px;
456
+ }
457
+
458
+ .todo-item {
459
+ background: var(--light);
460
+ border: 1px solid var(--gray-light);
461
+ border-radius: var(--radius-sm);
462
+ padding: 16px;
463
+ display: flex;
464
+ align-items: center;
465
+ gap: 14px;
466
+ transition: var(--transition);
467
+ cursor: move;
468
+ animation: fadeIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
469
+ }
470
+
471
+ @keyframes fadeIn {
472
+ from {
473
+ opacity: 0;
474
+ transform: translateY(10px);
475
+ }
476
+
477
+ to {
478
+ opacity: 1;
479
+ transform: translateY(0);
480
+ }
481
+ }
482
+
483
+ .todo-item:hover {
484
+ border-color: var(--primary);
485
+ box-shadow: var(--shadow);
486
+ transform: translateX(4px);
487
+ }
488
+
489
+ .todo-item.dragging {
490
+ opacity: 0.5;
491
+ transform: scale(1.02);
492
+ }
493
+
494
+ .todo-item.completed {
495
+ opacity: 0.6;
496
+ background: var(--gray-light);
497
+ }
498
+
499
+ .todo-item.completed .todo-text {
500
+ text-decoration: line-through;
501
+ color: var(--gray);
502
+ }
503
+
504
+ .todo-checkbox {
505
+ width: 24px;
506
+ height: 24px;
507
+ border: 2px solid var(--system-gray3);
508
+ border-radius: 50%;
509
+ cursor: pointer;
510
+ display: flex;
511
+ align-items: center;
512
+ justify-content: center;
513
+ transition: var(--transition);
514
+ flex-shrink: 0;
515
+ background: var(--white);
516
+ }
517
+
518
+ .todo-checkbox:hover {
519
+ border-color: var(--primary);
520
+ background: rgba(0, 122, 255, 0.05);
521
+ }
522
+
523
+ .todo-checkbox.checked {
524
+ background: var(--success);
525
+ border-color: var(--success);
526
+ }
527
+
528
+ .todo-checkbox.checked::after {
529
+ content: '✓';
530
+ color: var(--white);
531
+ font-weight: 600;
532
+ font-size: 14px;
533
+ }
534
+
535
+ .todo-content {
536
+ flex: 1;
537
+ display: flex;
538
+ flex-direction: column;
539
+ gap: 8px;
540
+ }
541
+
542
+ .todo-text {
543
+ font-size: 1em;
544
+ color: var(--dark);
545
+ word-break: break-word;
546
+ font-weight: 500;
547
+ line-height: 1.4;
548
+ }
549
+
550
+ .todo-meta {
551
+ display: flex;
552
+ gap: 10px;
553
+ flex-wrap: wrap;
554
+ align-items: center;
555
+ }
556
+
557
+ .todo-category,
558
+ .todo-priority,
559
+ .todo-date {
560
+ font-size: 0.82em;
561
+ padding: 5px 12px;
562
+ border-radius: 20px;
563
+ display: flex;
564
+ align-items: center;
565
+ gap: 4px;
566
+ font-weight: 600;
567
+ }
568
+
569
+ .category-work {
570
+ background: rgba(0, 122, 255, 0.1);
571
+ color: var(--primary);
572
+ }
573
+
574
+ .category-personal {
575
+ background: rgba(255, 59, 48, 0.1);
576
+ color: var(--secondary);
577
+ }
578
+
579
+ .category-shopping {
580
+ background: rgba(255, 149, 0, 0.1);
581
+ color: var(--warning);
582
+ }
583
+
584
+ .category-health {
585
+ background: rgba(52, 199, 89, 0.1);
586
+ color: var(--success);
587
+ }
588
+
589
+ .priority-high {
590
+ background: rgba(255, 59, 48, 0.1);
591
+ color: var(--secondary);
592
+ }
593
+
594
+ .priority-medium {
595
+ background: rgba(255, 149, 0, 0.1);
596
+ color: var(--warning);
597
+ }
598
+
599
+ .priority-low {
600
+ background: rgba(142, 142, 147, 0.1);
601
+ color: var(--gray);
602
+ }
603
+
604
+ .todo-date {
605
+ background: rgba(90, 200, 250, 0.1);
606
+ color: var(--info);
607
+ }
608
+
609
+ .todo-actions {
610
+ display: flex;
611
+ gap: 8px;
612
+ }
613
+
614
+ .action-btn {
615
+ width: 36px;
616
+ height: 36px;
617
+ border: 1px solid var(--gray-light);
618
+ background: var(--white);
619
+ color: var(--gray);
620
+ border-radius: var(--radius-xs);
621
+ cursor: pointer;
622
+ display: flex;
623
+ align-items: center;
624
+ justify-content: center;
625
+ transition: var(--transition);
626
+ font-size: 0.9em;
627
+ }
628
+
629
+ .action-btn:hover {
630
+ background: var(--primary);
631
+ color: var(--white);
632
+ border-color: var(--primary);
633
+ transform: scale(1.05);
634
+ }
635
+
636
+ .action-btn.delete:hover {
637
+ background: var(--secondary);
638
+ border-color: var(--secondary);
639
+ }
640
+
641
+ .empty-state {
642
+ text-align: center;
643
+ padding: 80px 20px;
644
+ color: var(--gray);
645
+ }
646
+
647
+ .empty-icon {
648
+ font-size: 4.5em;
649
+ margin-bottom: 24px;
650
+ opacity: 0.3;
651
+ color: var(--system-gray3);
652
+ }
653
+
654
+ .empty-text {
655
+ font-size: 1.3em;
656
+ margin-bottom: 8px;
657
+ font-weight: 600;
658
+ color: var(--dark);
659
+ }
660
+
661
+ [data-theme="dark"] .empty-text {
662
+ color: var(--white);
663
+ }
664
+
665
+ .empty-subtext {
666
+ font-size: 0.95em;
667
+ opacity: 0.7;
668
+ }
669
+
670
+ .edit-modal {
671
+ display: none;
672
+ position: fixed;
673
+ top: 0;
674
+ left: 0;
675
+ width: 100%;
676
+ height: 100%;
677
+ background: rgba(0, 0, 0, 0.4);
678
+ backdrop-filter: blur(20px);
679
+ -webkit-backdrop-filter: blur(20px);
680
+ z-index: 1000;
681
+ align-items: center;
682
+ justify-content: center;
683
+ animation: fadeIn 0.3s ease-out;
684
+ }
685
+
686
+ .edit-modal.active {
687
+ display: flex;
688
+ }
689
+
690
+ .modal-content {
691
+ background: var(--white);
692
+ border-radius: var(--radius);
693
+ padding: 32px;
694
+ width: 90%;
695
+ max-width: 520px;
696
+ animation: modalSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
697
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
698
+ }
699
+
700
+ @keyframes modalSlide {
701
+ from {
702
+ opacity: 0;
703
+ transform: translateY(30px) scale(0.95);
704
+ }
705
+
706
+ to {
707
+ opacity: 1;
708
+ transform: translateY(0) scale(1);
709
+ }
710
+ }
711
+
712
+ .modal-header {
713
+ margin-bottom: 24px;
714
+ }
715
+
716
+ .modal-title {
717
+ font-size: 1.6em;
718
+ color: var(--dark);
719
+ display: flex;
720
+ align-items: center;
721
+ gap: 12px;
722
+ font-weight: 600;
723
+ }
724
+
725
+ .modal-form {
726
+ display: flex;
727
+ flex-direction: column;
728
+ gap: 16px;
729
+ }
730
+
731
+ .modal-actions {
732
+ display: flex;
733
+ gap: 12px;
734
+ justify-content: flex-end;
735
+ margin-top: 24px;
736
+ }
737
+
738
+ .modal-btn {
739
+ padding: 12px 24px;
740
+ border: none;
741
+ border-radius: var(--radius-sm);
742
+ font-size: 1em;
743
+ font-weight: 600;
744
+ cursor: pointer;
745
+ transition: var(--transition);
746
+ }
747
+
748
+ .modal-btn.cancel {
749
+ background: var(--light);
750
+ color: var(--dark);
751
+ }
752
+
753
+ .modal-btn.save {
754
+ background: var(--primary);
755
+ color: var(--white);
756
+ }
757
+
758
+ .modal-btn:hover {
759
+ transform: translateY(-1px);
760
+ }
761
+
762
+ footer {
763
+ padding: 24px;
764
+ text-align: center;
765
+ background: var(--light);
766
+ border-top: 1px solid var(--gray-light);
767
+ }
768
+
769
+ .footer-link {
770
+ color: var(--primary);
771
+ text-decoration: none;
772
+ font-weight: 600;
773
+ transition: var(--transition);
774
+ }
775
+
776
+ .footer-link:hover {
777
+ color: var(--primary-dark);
778
+ text-decoration: underline;
779
+ }
780
+
781
+ @media (max-width: 768px) {
782
+ .container {
783
+ border-radius: var(--radius-sm);
784
+ }
785
+
786
+ header {
787
+ padding: 24px;
788
+ }
789
+
790
+ h1 {
791
+ font-size: 1.8em;
792
+ }
793
+
794
+ .stats {
795
+ grid-template-columns: repeat(2, 1fr);
796
+ }
797
+
798
+ .add-todo-section {
799
+ padding: 24px;
800
+ }
801
+
802
+ .input-group {
803
+ flex-direction: column;
804
+ }
805
+
806
+ .controls-section {
807
+ padding: 20px 24px;
808
+ }
809
+
810
+ .filter-tabs {
811
+ order: 3;
812
+ width: 100%;
813
+ }
814
+
815
+ .filter-tab {
816
+ flex: 1;
817
+ text-align: center;
818
+ }
819
+
820
+ .todos-section {
821
+ padding: 24px;
822
+ }
823
+
824
+ .todo-item {
825
+ padding: 14px;
826
+ }
827
+ }
828
+
829
+ @media (max-width: 480px) {
830
+ body {
831
+ padding: 12px;
832
+ }
833
+
834
+ .header-content {
835
+ flex-direction: column;
836
+ gap: 16px;
837
+ align-items: flex-start;
838
+ }
839
+
840
+ .stats {
841
+ grid-template-columns: 1fr;
842
+ }
843
+
844
+ .controls-section {
845
+ flex-direction: column;
846
+ align-items: stretch;
847
+ }
848
+
849
+ .search-box {
850
+ max-width: 100%;
851
+ }
852
+ }
853
+
854
+ .notification {
855
+ position: fixed;
856
+ bottom: 24px;
857
+ right: 24px;
858
+ background: var(--success);
859
+ color: var(--white);
860
+ padding: 16px 24px;
861
+ border-radius: var(--radius-sm);
862
+ box-shadow: var(--shadow-lg);
863
+ display: flex;
864
+ align-items: center;
865
+ gap: 10px;
866
+ transform: translateX(400px);
867
+ transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
868
+ z-index: 2000;
869
+ font-weight: 600;
870
+ }
871
+
872
+ .notification.show {
873
+ transform: translateX(0);
874
+ }
875
+ </style>
876
+ </head>
877
+
878
+ <body>
879
+ <div class="background-gradient"></div>
880
+
881
+ <div class="container">
882
+ <header>
883
+ <div class="header-content">
884
+ <h1>
885
+ <div class="logo">
886
+ <i class="fas fa-check-circle"></i>
887
+ </div>
888
+ Reminders
889
+ </h1>
890
+ <div class="header-actions">
891
+ <button class="theme-toggle" onclick="toggleTheme()">
892
+ <i class="fas fa-moon" id="theme-icon"></i>
893
+ </button>
894
+ </div>
895
+ </div>
896
+ <div class="stats">
897
+ <div class="stat-card">
898
+ <div class="stat-value" id="total-tasks">0</div>
899
+ <div class="stat-label">Total</div>
900
+ </div>
901
+ <div class="stat-card">
902
+ <div class="stat-value" id="completed-tasks">0</div>
903
+ <div class="stat-label">Done</div>
904
+ </div>
905
+ <div class="stat-card">
906
+ <div class="stat-value" id="pending-tasks">0</div>
907
+ <div class="stat-label">Pending</div>
908
+ </div>
909
+ <div class="stat-card">
910
+ <div class="stat-value" id="completion-rate">0%</div>
911
+ <div class="stat-label">Progress</div>
912
+ </div>
913
+ </div>
914
+ <div class="progress-bar">
915
+ <div class="progress-fill" id="progress-fill"></div>
916
+ </div>
917
+ </header>
918
+
919
+ <section class="add-todo-section">
920
+ <form class="add-todo-form" onsubmit="addTodo(event)">
921
+ <div class="input-group">
922
+ <input type="text" class="todo-input" id="todo-input" placeholder="New Reminder..." required>
923
+ <select class="select-input" id="category-select">
924
+ <option value="work">Work</option>
925
+ <option value="personal">Personal</option>
926
+ <option value="shopping">Shopping</option>
927
+ <option value="health">Health</option>
928
+ </select>
929
+ <select class="select-input" id="priority-select">
930
+ <option value="low">Low</option>
931
+ <option value="medium">Medium</option>
932
+ <option value="high">High</option>
933
+ </select>
934
+ <input type="date" class="date-input" id="due-date">
935
+ <button type="submit" class="add-btn">
936
+ <i class="fas fa-plus"></i>
937
+ Add
938
+ </button>
939
+ </div>
940
+ </form>
941
+ </section>
942
+
943
+ <section class="controls-section">
944
+ <div class="search-box">
945
+ <i class="fas fa-search search-icon"></i>
946
+ <input type="text" class="search-input" id="search-input" placeholder="Search reminders..." oninput="searchTodos()">
947
+ </div>
948
+ <div class="filter-tabs">
949
+ <button class="filter-tab active" onclick="filterTodos('all')">All</button>
950
+ <button class="filter-tab" onclick="filterTodos('active')">Active</button>
951
+ <button class="filter-tab" onclick="filterTodos('completed')">Done</button>
952
+ </div>
953
+ <button class="clear-btn" onclick="clearCompleted()">
954
+ <i class="fas fa-trash"></i>
955
+ Clear Done
956
+ </button>
957
+ </section>
958
+
959
+ <main class="todos-section">
960
+ <div class="todos-list" id="todos-list">
961
+ <div class="empty-state">
962
+ <div class="empty-icon">
963
+ <i class="fas fa-clipboard-list"></i>
964
+ </div>
965
+ <div class="empty-text">No reminders</div>
966
+ <div class="empty-subtext">Create your first reminder to get started!</div>
967
+ </div>
968
+ </div>
969
+ </main>
970
+
971
+ <footer>
972
+ <p>Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank"
973
+ class="footer-link">anycoder</a></p>
974
+ </footer>
975
+ </div>
976
+
977
+ <div class="edit-modal" id="edit-modal">
978
+ <div class="modal-content">
979
+ <div class="modal-header">
980
+ <h2 class="modal-title">
981
+ <i class="fas fa-edit"></i>
982
+ Edit Reminder
983
+ </h2>
984
+ </div>
985
+ <form class="modal-form" onsubmit="saveEdit(event)">
986
+ <input type="text" class="todo-input" id="edit-input" required>
987
+ <select class="select-input" id="edit-category">
988
+ <option value="work">Work</option>
989
+ <option value="personal">Personal</option>
990
+ <option value="shopping">Shopping</option>
991
+ <option value="health">Health</option>
992
+ </select>
993
+ <select class="select-input" id="edit-priority">
994
+ <option value="low">Low</option>
995
+ <option value="medium">Medium</option>
996
+ <option value="high">High</option>
997
+ </select>
998
+ <input type="date" class="date-input" id="edit-date">
999
+ <div class="modal-actions">
1000
+ <button type="button" class="modal-btn cancel" onclick="closeEditModal()">Cancel</button>
1001
+ <button type="submit" class="modal-btn save">Save</button>
1002
+ </div>
1003
+ </form>
1004
+ </div>
1005
+ </div>
1006
+
1007
+ <div class="notification" id="notification">
1008
+ <i class="fas fa-check-circle"></i>
1009
+ <span id="notification-text">Reminder added!</span>
1010
+ </div>
1011
+
1012
+ <script>
1013
+ let todos = JSON.parse(localStorage.getItem('todos')) || [];
1014
+ let currentFilter = 'all';
1015
+ let editingId = null;
1016
+ let draggedItem = null;
1017
+
1018
+ // Initialize app
1019
+ document.addEventListener('DOMContentLoaded', () => {
1020
+ loadTheme();
1021
+ renderTodos();
1022
+ updateStats();
1023
+ setMinDate();
1024
+ });
1025
+
1026
+ // Theme management
1027
+ function toggleTheme() {
1028
+ const html = document.documentElement;
1029
+ const themeIcon = document.getElementById('theme-icon');
1030
+
1031
+ if (html.getAttribute('data-theme') === 'dark') {
1032
+ html.removeAttribute('data-theme');
1033
+ themeIcon.className = 'fas fa-moon';
1034
+ localStorage.setItem('theme', 'light');
1035
+ } else {
1036
+ html.setAttribute('data-theme', 'dark');
1037
+ themeIcon.className = 'fas fa-sun';
1038
+ localStorage.setItem('theme', 'dark');
1039
+ }
1040
+ }
1041
+
1042
+ function loadTheme() {
1043
+ const theme = localStorage.getItem('theme');
1044
+ const themeIcon = document.getElementById('theme-icon');
1045
+
1046
+ if (theme === 'dark') {
1047
+ document.documentElement.setAttribute('data-theme', 'dark');
1048
+ themeIcon.className = 'fas fa-sun';
1049
+ }
1050
+ }
1051
+
1052
+ // Set minimum date to today
1053
+ function setMinDate() {
1054
+ const today = new Date().toISOString().split('T')[0];
1055
+ document.getElementById('due-date').setAttribute('min', today);
1056
+ document.getElementById('edit-date').setAttribute('min', today);
1057
+ }
1058
+
1059
+ // Add todo
1060
+ function addTodo(event) {
1061
+ event.preventDefault();
1062
+
1063
+ const input = document.getElementById('todo-input');
1064
+ const category = document.getElementById('category-select').value;
1065
+ const priority = document.getElementById('priority-select').value;
1066
+ const dueDate = document.getElementById('due-date').value;
1067
+
1068
+ const todo = {
1069
+ id: Date.now(),
1070
+ text: input.value.trim(),
1071
+ completed: false,
1072
+ category,
1073
+ priority,
1074
+ dueDate,
1075
+ createdAt: new Date().toISOString()
1076
+ };
1077
+
1078
+ todos.unshift(todo);
1079
+ saveTodos();
1080
+ renderTodos();
1081
+ updateStats();
1082
+
1083
+ // Reset form
1084
+ input.value = '';
1085
+ document.getElementById('due-date').value = '';
1086
+
1087
+ showNotification('Reminder added!');
1088
+ }
1089
+
1090
+ // Toggle todo completion
1091
+ function toggleTodo(id) {
1092
+ const todo = todos.find(t => t.id === id);
1093
+ if (todo) {
1094
+ todo.completed = !todo.completed;
1095
+ saveTodos();
1096
+ renderTodos();
1097
+ updateStats();
1098
+
1099
+ if (todo.completed) {
1100
+ showNotification('Great job! Task completed!');
1101
+ }
1102
+ }
1103
+ }
1104
+
1105
+ // Delete todo
1106
+ function deleteTodo(id) {
1107
+ todos = todos.filter(t => t.id !== id);
1108
+ saveTodos();
1109
+ renderTodos();
1110
+ updateStats();
1111
+ showNotification('Reminder deleted');
1112
+ }
1113
+
1114
+ // Edit todo
1115
+ function editTodo(id) {
1116
+ const todo = todos.find(t => t.id === id);
1117
+ if (todo) {
1118
+ editingId = id;
1119
+ document.getElementById('edit-input').value = todo.text;
1120
+ document.getElementById('edit-category').value = todo.category;
1121
+ document.getElementById('edit-priority').value = todo.priority;
1122
+ document.getElementById('edit-date').value = todo.dueDate;
1123
+ document.getElementById('edit-modal').classList.add('active');
1124
+ }
1125
+ }
1126
+
1127
+ // Save edit
1128
+ function saveEdit(event) {
1129
+ event.preventDefault();
1130
+
1131
+ const todo = todos.find(t => t.id === editingId);
1132
+ if (todo) {
1133
+ todo.text = document.getElementById('edit-input').value.trim();
1134
+ todo.category = document.getElementById('edit-category').value;
1135
+ todo.priority = document.getElementById('edit-priority').value;
1136
+ todo.dueDate = document.getElementById('edit-date').value;
1137
+
1138
+ saveTodos();
1139
+ renderTodos();
1140
+ updateStats();
1141
+ closeEditModal();
1142
+ showNotification('Reminder updated!');
1143
+ }
1144
+ }
1145
+
1146
+ // Close edit modal
1147
+ function closeEditModal() {
1148
+ document.getElementById('edit-modal').classList.remove('active');
1149
+ editingId = null;
1150
+ }
1151
+
1152
+ // Filter todos
1153
+ function filterTodos(filter) {
1154
+ currentFilter = filter;
1155
+
1156
+ // Update active tab
1157
+ document.querySelectorAll('.filter-tab').forEach(tab => {
1158
+ tab.classList.remove('active');
1159
+ });
1160
+ event.target.classList.add('active');
1161
+
1162
+ renderTodos();
1163
+ }
1164
+
1165
+ // Search todos
1166
+ function searchTodos() {
1167
+ renderTodos();
1168
+ }
1169
+
1170
+ // Clear completed todos
1171
+ function clearCompleted() {
1172
+ const completedCount = todos.filter(t => t.completed).length;
1173
+ if (completedCount > 0) {
1174
+ if (confirm(`Delete ${completedCount} completed reminder(s)?`)) {
1175
+ todos = todos.filter(t => !t.completed);
1176
+ saveTodos();
1177
+ renderTodos();
1178
+ updateStats();
1179
+ showNotification('Completed reminders cleared');
1180
+ }
1181
+ } else {
1182
+ showNotification('No completed reminders to clear');
1183
+ }
1184
+ }
1185
+
1186
+ // Render todos
1187
+ function renderTodos() {
1188
+ const list = document.getElementById('todos-list');
1189
+ const searchTerm = document.getElementById('search-input').value.toLowerCase();
1190
+
1191
+ let filteredTodos = todos;
1192
+
1193
+ // Apply filter
1194
+ if (currentFilter === 'active') {
1195
+ filteredTodos = filteredTodos.filter(t => !t.completed);
1196
+ } else if (currentFilter === 'completed') {
1197
+ filteredTodos = filteredTodos.filter(t => t.completed);
1198
+ }
1199
+
1200
+ // Apply search
1201
+ if (searchTerm) {
1202
+ filteredTodos = filteredTodos.filter(t =>
1203
+ t.text.toLowerCase().includes(searchTerm)
1204
+ );
1205
+ }
1206
+
1207
+ if (filteredTodos.length === 0) {
1208
+ list.innerHTML = `
1209
+ <div class="empty-state">
1210
+ <div class="empty-icon">
1211
+ <i class="fas fa-clipboard-list"></i>
1212
+ </div>
1213
+ <div class="empty-text">No reminders found</div>
1214
+ <div class="empty-subtext">
1215
+ ${searchTerm ? 'Try a different search term' : 'Create a new reminder to get started!'}
1216
+ </div>
1217
+ </div>
1218
+ `;
1219
+ return;
1220
+ }
1221
+
1222
+ list.innerHTML = filteredTodos.map(todo => `
1223
+ <div class="todo-item ${todo.completed ? 'completed' : ''}"
1224
+ draggable="true"
1225
+ ondragstart="handleDragStart(event, ${todo.id})"
1226
+ ondragover="handleDragOver(event)"
1227
+ ondrop="handleDrop(event, ${todo.id})"
1228
+ ondragend="handleDragEnd(event)">
1229
+ <div class="todo-checkbox ${todo.completed ? 'checked' : ''}"
1230
+ onclick="toggleTodo(${todo.id})"></div>
1231
+ <div class="todo-content">
1232
+ <div class="todo-text">${escapeHtml(todo.text)}</div>
1233
+ <div class="todo-meta">
1234
+ <span class="todo-category category-${todo.category}">
1235
+ <i class="fas fa-tag"></i>
1236
+ ${todo.category}
1237
+ </span>
1238
+ <span class="todo-priority priority-${todo.priority}">
1239
+ <i class="fas fa-flag"></i>
1240
+ ${todo.priority}
1241
+ </span>
1242
+ ${todo.dueDate ? `
1243
+ <span class="todo-date">
1244
+ <i class="fas fa-calendar"></i>
1245
+ ${formatDate(todo.dueDate)}
1246
+ </span>
1247
+ ` : ''}
1248
+ </div>
1249
+ </div>
1250
+ <div class="todo-actions">
1251
+ <button class="action-btn" onclick="editTodo(${todo.id})">
1252
+ <i class="fas fa-edit"></i>
1253
+ </button>
1254
+ <button class="action-btn delete" onclick="deleteTodo(${todo.id})">
1255
+ <i class="fas fa-trash"></i>
1256
+ </button>
1257
+ </div>
1258
+ </div>
1259
+ `).join('');
1260
+ }
1261
+
1262
+ // Drag and drop
1263
+ function handleDragStart(event, id) {
1264
+ draggedItem = id;
1265
+ event.target.classList.add('dragging');
1266
+ }
1267
+
1268
+ function handleDragOver(event) {
1269
+ event.preventDefault();
1270
+ }
1271
+
1272
+ function handleDrop(event, targetId) {
1273
+ event.preventDefault();
1274
+
1275
+ if (draggedItem !== targetId) {
1276
+ const draggedIndex = todos.findIndex(t => t.id === draggedItem);
1277
+ const targetIndex = todos.findIndex(t => t.id === targetId);
1278
+
1279
+ if (draggedIndex !== -1 && targetIndex !== -1) {
1280
+ const [removed] = todos.splice(draggedIndex, 1);
1281
+ todos.splice(targetIndex, 0, removed);
1282
+ saveTodos();
1283
+ renderTodos();
1284
+ }
1285
+ }
1286
+ }
1287
+
1288
+ function handleDragEnd(event) {
1289
+ event.target.classList.remove('dragging');
1290
+ }
1291
+
1292
+ // Update statistics
1293
+ function updateStats() {
1294
+ const total = todos.length;
1295
+ const completed = todos.filter(t => t.completed).length;
1296
+ const pending = total - completed;
1297
+ const rate = total > 0 ? Math.round((completed / total) * 100) : 0;
1298
+
1299
+ document.getElementById('total-tasks').textContent = total;
1300
+ document.getElementById('completed-tasks').textContent = completed;
1301
+ document.getElementById('pending-tasks').textContent = pending;
1302
+ document.getElementById('completion-rate').textContent = rate + '%';
1303
+ document.getElementById('progress-fill').style.width = rate + '%';
1304
+ }
1305
+
1306
+ // Save to localStorage
1307
+ function saveTodos() {
1308
+ localStorage.setItem('todos', JSON.stringify(todos));
1309
+ }
1310
+
1311
+ // Show notification
1312
+ function showNotification(message) {
1313
+ const notification = document.getElementById('notification');
1314
+ const text = document.getElementById('notification-text');
1315
+
1316
+ text.textContent = message;
1317
+ notification.classList.add('show');
1318
+
1319
+ setTimeout(() => {
1320
+ notification.classList.remove('show');
1321
+ }, 3000);
1322
+ }
1323
+
1324
+ // Utility functions
1325
+ function escapeHtml(text) {
1326
+ const div = document.createElement('div');
1327
+ div.textContent = text;
1328
+ return div.innerHTML;
1329
+ }
1330
+
1331
+ function formatDate(dateString) {
1332
+ const date = new Date(dateString);
1333
+ const today = new Date();
1334
+ const tomorrow = new Date(today);
1335
+ tomorrow.setDate(tomorrow.getDate() + 1);
1336
+
1337
+ if (date.toDateString() === today.toDateString()) {
1338
+ return 'Today';
1339
+ } else if (date.toDateString() === tomorrow.toDateString()) {
1340
+ return 'Tomorrow';
1341
+ } else {
1342
+ return date.toLocaleDateString('en-US', {
1343
+ month: 'short',
1344
+ day: 'numeric',
1345
+ year: date.getFullYear() !== today.getFullYear() ? 'numeric' : undefined
1346
+ });
1347
+ }
1348
+ }
1349
+
1350
+ // Close modal on escape key
1351
+ document.addEventListener('keydown', (e) => {
1352
+ if (e.key === 'Escape') {
1353
+ closeEditModal();
1354
+ }
1355
+ });
1356
+
1357
+ // Close modal on outside click
1358
+ document.getElementById('edit-modal').addEventListener('click', (e) => {
1359
+ if (e.target.id === 'edit-modal') {
1360
+ closeEditModal();
1361
+ }
1362
+ });
1363
+ </script>
1364
+ </body>
1365
+
1366
+ </html>