akhaliq HF Staff commited on
Commit
47db126
·
verified ·
1 Parent(s): 53c45ad

Upload folder using huggingface_hub

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