akhaliq HF Staff commited on
Commit
bb0832b
·
verified ·
1 Parent(s): b2c9266

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +458 -19
index.html CHANGED
@@ -1,19 +1,458 @@
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</title>
8
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
9
+ <style>
10
+ * {
11
+ margin: 0;
12
+ padding: 0;
13
+ box-sizing: border-box;
14
+ }
15
+
16
+ body {
17
+ font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', sans-serif;
18
+ min-height: 100vh;
19
+ background: linear-gradient(180deg, #1c1c1e 0%, #2c2c2e 100%);
20
+ display: flex;
21
+ justify-content: center;
22
+ align-items: flex-start;
23
+ padding: 40px 20px;
24
+ }
25
+
26
+ .container {
27
+ background: rgba(44, 44, 46, 0.8);
28
+ backdrop-filter: blur(40px);
29
+ -webkit-backdrop-filter: blur(40px);
30
+ border-radius: 20px;
31
+ padding: 0;
32
+ width: 100%;
33
+ max-width: 420px;
34
+ box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5),
35
+ inset 0 0 0 0.5px rgba(255, 255, 255, 0.1);
36
+ overflow: hidden;
37
+ }
38
+
39
+ header {
40
+ padding: 24px 24px 20px;
41
+ background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, transparent 100%);
42
+ }
43
+
44
+ header a {
45
+ font-size: 11px;
46
+ color: rgba(255, 255, 255, 0.4);
47
+ text-decoration: none;
48
+ letter-spacing: 0.3px;
49
+ display: block;
50
+ margin-bottom: 8px;
51
+ }
52
+
53
+ header a:hover {
54
+ color: rgba(255, 255, 255, 0.6);
55
+ }
56
+
57
+ h1 {
58
+ color: #fff;
59
+ font-size: 34px;
60
+ font-weight: 700;
61
+ letter-spacing: -0.5px;
62
+ display: flex;
63
+ align-items: center;
64
+ gap: 12px;
65
+ }
66
+
67
+ h1 i {
68
+ color: #0a84ff;
69
+ font-size: 28px;
70
+ }
71
+
72
+ .input-group {
73
+ display: flex;
74
+ gap: 12px;
75
+ padding: 0 20px 20px;
76
+ }
77
+
78
+ input[type="text"] {
79
+ flex: 1;
80
+ padding: 14px 18px;
81
+ background: rgba(118, 118, 128, 0.24);
82
+ border: none;
83
+ border-radius: 12px;
84
+ font-size: 17px;
85
+ color: #fff;
86
+ font-family: inherit;
87
+ transition: all 0.2s ease;
88
+ }
89
+
90
+ input[type="text"]::placeholder {
91
+ color: rgba(235, 235, 245, 0.3);
92
+ }
93
+
94
+ input[type="text"]:focus {
95
+ outline: none;
96
+ background: rgba(118, 118, 128, 0.36);
97
+ box-shadow: 0 0 0 4px rgba(10, 132, 255, 0.3);
98
+ }
99
+
100
+ .add-btn {
101
+ width: 50px;
102
+ height: 50px;
103
+ background: #0a84ff;
104
+ color: white;
105
+ border: none;
106
+ border-radius: 12px;
107
+ cursor: pointer;
108
+ font-size: 20px;
109
+ transition: all 0.2s ease;
110
+ display: flex;
111
+ align-items: center;
112
+ justify-content: center;
113
+ }
114
+
115
+ .add-btn:hover {
116
+ background: #409cff;
117
+ transform: scale(1.05);
118
+ }
119
+
120
+ .add-btn:active {
121
+ transform: scale(0.95);
122
+ }
123
+
124
+ .todo-list {
125
+ list-style: none;
126
+ max-height: 400px;
127
+ overflow-y: auto;
128
+ padding: 0 8px;
129
+ }
130
+
131
+ .todo-list::-webkit-scrollbar {
132
+ width: 6px;
133
+ }
134
+
135
+ .todo-list::-webkit-scrollbar-track {
136
+ background: transparent;
137
+ }
138
+
139
+ .todo-list::-webkit-scrollbar-thumb {
140
+ background: rgba(255, 255, 255, 0.2);
141
+ border-radius: 3px;
142
+ }
143
+
144
+ .todo-item {
145
+ display: flex;
146
+ align-items: center;
147
+ gap: 14px;
148
+ padding: 16px;
149
+ margin: 0 12px 2px;
150
+ background: transparent;
151
+ border-radius: 12px;
152
+ transition: all 0.2s ease;
153
+ animation: fadeIn 0.3s ease;
154
+ border-bottom: 0.5px solid rgba(84, 84, 88, 0.65);
155
+ }
156
+
157
+ .todo-item:last-of-type {
158
+ border-bottom: none;
159
+ }
160
+
161
+ @keyframes fadeIn {
162
+ from {
163
+ opacity: 0;
164
+ transform: translateY(-10px);
165
+ }
166
+ to {
167
+ opacity: 1;
168
+ transform: translateY(0);
169
+ }
170
+ }
171
+
172
+ .todo-item:hover {
173
+ background: rgba(255, 255, 255, 0.05);
174
+ }
175
+
176
+ .todo-item.completed span {
177
+ text-decoration: line-through;
178
+ color: rgba(235, 235, 245, 0.3);
179
+ }
180
+
181
+ .checkbox-wrapper {
182
+ position: relative;
183
+ width: 24px;
184
+ height: 24px;
185
+ }
186
+
187
+ .todo-item input[type="checkbox"] {
188
+ appearance: none;
189
+ -webkit-appearance: none;
190
+ width: 24px;
191
+ height: 24px;
192
+ border: 2px solid rgba(142, 142, 147, 0.6);
193
+ border-radius: 50%;
194
+ cursor: pointer;
195
+ transition: all 0.2s ease;
196
+ background: transparent;
197
+ }
198
+
199
+ .todo-item input[type="checkbox"]:checked {
200
+ background: #30d158;
201
+ border-color: #30d158;
202
+ }
203
+
204
+ .todo-item input[type="checkbox"]:checked::after {
205
+ content: '';
206
+ position: absolute;
207
+ top: 50%;
208
+ left: 50%;
209
+ transform: translate(-50%, -60%) rotate(45deg);
210
+ width: 6px;
211
+ height: 10px;
212
+ border: solid white;
213
+ border-width: 0 2px 2px 0;
214
+ }
215
+
216
+ .todo-item span {
217
+ flex: 1;
218
+ font-size: 17px;
219
+ color: #fff;
220
+ word-break: break-word;
221
+ line-height: 1.4;
222
+ letter-spacing: -0.2px;
223
+ }
224
+
225
+ .delete-btn {
226
+ background: transparent;
227
+ padding: 8px;
228
+ border-radius: 8px;
229
+ font-size: 16px;
230
+ color: rgba(235, 235, 245, 0.3);
231
+ opacity: 0;
232
+ transition: all 0.2s ease;
233
+ }
234
+
235
+ .todo-item:hover .delete-btn {
236
+ opacity: 1;
237
+ }
238
+
239
+ .delete-btn:hover {
240
+ color: #ff453a;
241
+ background: rgba(255, 69, 58, 0.15);
242
+ transform: none;
243
+ box-shadow: none;
244
+ }
245
+
246
+ .empty {
247
+ text-align: center;
248
+ color: rgba(235, 235, 245, 0.3);
249
+ padding: 60px 40px;
250
+ font-size: 17px;
251
+ line-height: 1.6;
252
+ }
253
+
254
+ .empty i {
255
+ font-size: 48px;
256
+ margin-bottom: 16px;
257
+ display: block;
258
+ color: rgba(235, 235, 245, 0.2);
259
+ }
260
+
261
+ .stats {
262
+ display: flex;
263
+ justify-content: space-between;
264
+ padding: 20px 24px;
265
+ background: rgba(0, 0, 0, 0.2);
266
+ color: rgba(235, 235, 245, 0.6);
267
+ font-size: 13px;
268
+ font-weight: 500;
269
+ letter-spacing: 0.2px;
270
+ }
271
+
272
+ .stats span {
273
+ display: flex;
274
+ align-items: center;
275
+ gap: 6px;
276
+ }
277
+
278
+ .stats .count {
279
+ background: rgba(118, 118, 128, 0.24);
280
+ padding: 4px 10px;
281
+ border-radius: 20px;
282
+ font-weight: 600;
283
+ color: #fff;
284
+ }
285
+
286
+ .completed-count .count {
287
+ background: rgba(48, 209, 88, 0.2);
288
+ color: #30d158;
289
+ }
290
+
291
+ /* Categories/Tags Section */
292
+ .categories {
293
+ display: flex;
294
+ gap: 8px;
295
+ padding: 0 20px 16px;
296
+ overflow-x: auto;
297
+ }
298
+
299
+ .category {
300
+ padding: 8px 16px;
301
+ background: rgba(118, 118, 128, 0.24);
302
+ border-radius: 20px;
303
+ font-size: 14px;
304
+ color: rgba(235, 235, 245, 0.6);
305
+ cursor: pointer;
306
+ transition: all 0.2s ease;
307
+ white-space: nowrap;
308
+ border: none;
309
+ }
310
+
311
+ .category.active {
312
+ background: #0a84ff;
313
+ color: #fff;
314
+ }
315
+
316
+ .category:hover:not(.active) {
317
+ background: rgba(118, 118, 128, 0.36);
318
+ }
319
+
320
+ @media (max-width: 480px) {
321
+ body {
322
+ padding: 0;
323
+ align-items: flex-start;
324
+ }
325
+
326
+ .container {
327
+ border-radius: 0;
328
+ min-height: 100vh;
329
+ max-width: 100%;
330
+ }
331
+
332
+ h1 {
333
+ font-size: 28px;
334
+ }
335
+
336
+ .todo-list {
337
+ max-height: calc(100vh - 320px);
338
+ }
339
+ }
340
+ </style>
341
+ </head>
342
+
343
+ <body>
344
+ <div class="container">
345
+ <header>
346
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">Built with anycoder</a>
347
+ <h1><i class="fas fa-list-check"></i> Reminders</h1>
348
+ </header>
349
+
350
+ <div class="categories">
351
+ <button class="category active" onclick="filterTodos('all')">All</button>
352
+ <button class="category" onclick="filterTodos('active')">Active</button>
353
+ <button class="category" onclick="filterTodos('completed')">Completed</button>
354
+ </div>
355
+
356
+ <div class="input-group">
357
+ <input type="text" id="todoInput" placeholder="Add a new reminder..." onkeypress="if(event.key==='Enter')addTodo()">
358
+ <button class="add-btn" onclick="addTodo()"><i class="fas fa-plus"></i></button>
359
+ </div>
360
+
361
+ <ul class="todo-list" id="todoList"></ul>
362
+
363
+ <div class="stats">
364
+ <span id="total">Total <span class="count">0</span></span>
365
+ <span id="completed" class="completed-count">Done <span class="count">0</span></span>
366
+ </div>
367
+ </div>
368
+
369
+ <script>
370
+ let todos = JSON.parse(localStorage.getItem('todos')) || [];
371
+ let currentFilter = 'all';
372
+
373
+ function saveTodos() {
374
+ localStorage.setItem('todos', JSON.stringify(todos));
375
+ }
376
+
377
+ function filterTodos(filter) {
378
+ currentFilter = filter;
379
+ document.querySelectorAll('.category').forEach(btn => btn.classList.remove('active'));
380
+ event.target.classList.add('active');
381
+ renderTodos();
382
+ }
383
+
384
+ function getFilteredTodos() {
385
+ switch(currentFilter) {
386
+ case 'active':
387
+ return todos.filter(t => !t.done);
388
+ case 'completed':
389
+ return todos.filter(t => t.done);
390
+ default:
391
+ return todos;
392
+ }
393
+ }
394
+
395
+ function renderTodos() {
396
+ const list = document.getElementById('todoList');
397
+ const filteredTodos = getFilteredTodos();
398
+
399
+ if (filteredTodos.length === 0) {
400
+ let emptyMessage = 'No reminders yet!';
401
+ if (currentFilter === 'active') emptyMessage = 'No active reminders';
402
+ if (currentFilter === 'completed') emptyMessage = 'No completed reminders';
403
+ list.innerHTML = `<li class="empty"><i class="fas fa-bell-slash"></i>${emptyMessage}</li>`;
404
+ } else {
405
+ list.innerHTML = '';
406
+ filteredTodos.forEach((todo) => {
407
+ const originalIndex = todos.indexOf(todo);
408
+ list.innerHTML += `
409
+ <li class="todo-item ${todo.done ? 'completed' : ''}">
410
+ <div class="checkbox-wrapper">
411
+ <input type="checkbox" ${todo.done ? 'checked' : ''} onchange="toggleTodo(${originalIndex})">
412
+ </div>
413
+ <span>${escapeHtml(todo.text)}</span>
414
+ <button class="delete-btn" onclick="deleteTodo(${originalIndex})">
415
+ <i class="fas fa-xmark"></i>
416
+ </button>
417
+ </li>`;
418
+ });
419
+ }
420
+
421
+ document.getElementById('total').innerHTML = `Total <span class="count">${todos.length}</span>`;
422
+ document.getElementById('completed').innerHTML = `Done <span class="count">${todos.filter(t => t.done).length}</span>`;
423
+ }
424
+
425
+ function escapeHtml(text) {
426
+ const div = document.createElement('div');
427
+ div.textContent = text;
428
+ return div.innerHTML;
429
+ }
430
+
431
+ function addTodo() {
432
+ const input = document.getElementById('todoInput');
433
+ const text = input.value.trim();
434
+ if (text) {
435
+ todos.unshift({ text, done: false, createdAt: Date.now() });
436
+ input.value = '';
437
+ saveTodos();
438
+ renderTodos();
439
+ }
440
+ }
441
+
442
+ function toggleTodo(i) {
443
+ todos[i].done = !todos[i].done;
444
+ saveTodos();
445
+ renderTodos();
446
+ }
447
+
448
+ function deleteTodo(i) {
449
+ todos.splice(i, 1);
450
+ saveTodos();
451
+ renderTodos();
452
+ }
453
+
454
+ renderTodos();
455
+ </script>
456
+ </body>
457
+
458
+ </html>