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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
min-height: 100vh;
|
| 18 |
+
background: #f2f2f7;
|
| 19 |
+
font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
|
| 20 |
+
display: flex;
|
| 21 |
+
justify-content: center;
|
| 22 |
+
align-items: flex-start;
|
| 23 |
+
padding: 40px 20px;
|
| 24 |
+
-webkit-font-smoothing: antialiased;
|
| 25 |
+
-moz-osx-font-smoothing: grayscale;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.container {
|
| 29 |
+
background: white;
|
| 30 |
+
border-radius: 20px;
|
| 31 |
+
width: 100%;
|
| 32 |
+
max-width: 480px;
|
| 33 |
+
box-shadow:
|
| 34 |
+
0 0 0 0.5px rgba(0, 0, 0, 0.05),
|
| 35 |
+
0 2px 8px rgba(0, 0, 0, 0.08),
|
| 36 |
+
0 8px 30px rgba(0, 0, 0, 0.06);
|
| 37 |
+
overflow: hidden;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
header {
|
| 41 |
+
padding: 24px 24px 20px;
|
| 42 |
+
background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
|
| 43 |
+
border-bottom: 0.5px solid rgba(0, 0, 0, 0.1);
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
header a {
|
| 47 |
+
color: #007aff;
|
| 48 |
+
text-decoration: none;
|
| 49 |
+
font-size: 12px;
|
| 50 |
+
font-weight: 400;
|
| 51 |
+
letter-spacing: -0.01em;
|
| 52 |
+
display: inline-block;
|
| 53 |
+
margin-bottom: 8px;
|
| 54 |
+
transition: opacity 0.2s ease;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
header a:hover {
|
| 58 |
+
opacity: 0.7;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
h1 {
|
| 62 |
+
color: #1c1c1e;
|
| 63 |
+
font-size: 34px;
|
| 64 |
+
font-weight: 700;
|
| 65 |
+
letter-spacing: -0.5px;
|
| 66 |
+
display: flex;
|
| 67 |
+
align-items: center;
|
| 68 |
+
gap: 12px;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
h1 i {
|
| 72 |
+
color: #007aff;
|
| 73 |
+
font-size: 28px;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.input-group {
|
| 77 |
+
display: flex;
|
| 78 |
+
gap: 12px;
|
| 79 |
+
padding: 16px 20px;
|
| 80 |
+
background: #f9f9f9;
|
| 81 |
+
border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
input[type="text"] {
|
| 85 |
+
flex: 1;
|
| 86 |
+
padding: 12px 16px;
|
| 87 |
+
border: none;
|
| 88 |
+
border-radius: 12px;
|
| 89 |
+
font-size: 17px;
|
| 90 |
+
font-weight: 400;
|
| 91 |
+
background: white;
|
| 92 |
+
color: #1c1c1e;
|
| 93 |
+
box-shadow:
|
| 94 |
+
0 0 0 0.5px rgba(0, 0, 0, 0.08),
|
| 95 |
+
0 1px 3px rgba(0, 0, 0, 0.06);
|
| 96 |
+
transition: box-shadow 0.2s ease;
|
| 97 |
+
letter-spacing: -0.01em;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
input[type="text"]::placeholder {
|
| 101 |
+
color: #8e8e93;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
input[type="text"]:focus {
|
| 105 |
+
outline: none;
|
| 106 |
+
box-shadow:
|
| 107 |
+
0 0 0 3px rgba(0, 122, 255, 0.2),
|
| 108 |
+
0 1px 3px rgba(0, 0, 0, 0.06);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.add-btn {
|
| 112 |
+
width: 44px;
|
| 113 |
+
height: 44px;
|
| 114 |
+
background: #007aff;
|
| 115 |
+
color: white;
|
| 116 |
+
border: none;
|
| 117 |
+
border-radius: 12px;
|
| 118 |
+
cursor: pointer;
|
| 119 |
+
font-size: 20px;
|
| 120 |
+
display: flex;
|
| 121 |
+
align-items: center;
|
| 122 |
+
justify-content: center;
|
| 123 |
+
transition: all 0.2s ease;
|
| 124 |
+
flex-shrink: 0;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.add-btn:hover {
|
| 128 |
+
background: #0066d6;
|
| 129 |
+
transform: scale(1.02);
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
.add-btn:active {
|
| 133 |
+
transform: scale(0.98);
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
.todo-list {
|
| 137 |
+
list-style: none;
|
| 138 |
+
max-height: 450px;
|
| 139 |
+
overflow-y: auto;
|
| 140 |
+
padding: 8px 0;
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.todo-list::-webkit-scrollbar {
|
| 144 |
+
width: 6px;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
.todo-list::-webkit-scrollbar-track {
|
| 148 |
+
background: transparent;
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
.todo-list::-webkit-scrollbar-thumb {
|
| 152 |
+
background: rgba(0, 0, 0, 0.15);
|
| 153 |
+
border-radius: 3px;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
.todo-item {
|
| 157 |
+
display: flex;
|
| 158 |
+
align-items: center;
|
| 159 |
+
gap: 14px;
|
| 160 |
+
padding: 14px 20px;
|
| 161 |
+
margin: 0 12px 2px;
|
| 162 |
+
border-radius: 12px;
|
| 163 |
+
transition: all 0.2s ease;
|
| 164 |
+
animation: fadeIn 0.3s ease;
|
| 165 |
+
cursor: default;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
@keyframes fadeIn {
|
| 169 |
+
from {
|
| 170 |
+
opacity: 0;
|
| 171 |
+
transform: translateY(-8px);
|
| 172 |
+
}
|
| 173 |
+
to {
|
| 174 |
+
opacity: 1;
|
| 175 |
+
transform: translateY(0);
|
| 176 |
+
}
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
.todo-item:hover {
|
| 180 |
+
background: rgba(0, 0, 0, 0.03);
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
.todo-item.completed .todo-text {
|
| 184 |
+
color: #8e8e93;
|
| 185 |
+
text-decoration: line-through;
|
| 186 |
+
text-decoration-color: #c7c7cc;
|
| 187 |
+
}
|
| 188 |
+
|
| 189 |
+
.checkbox-wrapper {
|
| 190 |
+
position: relative;
|
| 191 |
+
width: 24px;
|
| 192 |
+
height: 24px;
|
| 193 |
+
flex-shrink: 0;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
.checkbox-wrapper input[type="checkbox"] {
|
| 197 |
+
position: absolute;
|
| 198 |
+
opacity: 0;
|
| 199 |
+
width: 100%;
|
| 200 |
+
height: 100%;
|
| 201 |
+
cursor: pointer;
|
| 202 |
+
z-index: 1;
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
.custom-checkbox {
|
| 206 |
+
position: absolute;
|
| 207 |
+
top: 0;
|
| 208 |
+
left: 0;
|
| 209 |
+
width: 24px;
|
| 210 |
+
height: 24px;
|
| 211 |
+
border: 2px solid #c7c7cc;
|
| 212 |
+
border-radius: 50%;
|
| 213 |
+
transition: all 0.2s ease;
|
| 214 |
+
display: flex;
|
| 215 |
+
align-items: center;
|
| 216 |
+
justify-content: center;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.custom-checkbox i {
|
| 220 |
+
color: white;
|
| 221 |
+
font-size: 12px;
|
| 222 |
+
opacity: 0;
|
| 223 |
+
transform: scale(0.5);
|
| 224 |
+
transition: all 0.2s ease;
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
.checkbox-wrapper input[type="checkbox"]:checked + .custom-checkbox {
|
| 228 |
+
background: #007aff;
|
| 229 |
+
border-color: #007aff;
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
.checkbox-wrapper input[type="checkbox"]:checked + .custom-checkbox i {
|
| 233 |
+
opacity: 1;
|
| 234 |
+
transform: scale(1);
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
.todo-text {
|
| 238 |
+
flex: 1;
|
| 239 |
+
font-size: 17px;
|
| 240 |
+
font-weight: 400;
|
| 241 |
+
color: #1c1c1e;
|
| 242 |
+
word-break: break-word;
|
| 243 |
+
line-height: 1.4;
|
| 244 |
+
letter-spacing: -0.01em;
|
| 245 |
+
transition: color 0.2s ease;
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
.delete-btn {
|
| 249 |
+
opacity: 0;
|
| 250 |
+
width: 32px;
|
| 251 |
+
height: 32px;
|
| 252 |
+
background: transparent;
|
| 253 |
+
border: none;
|
| 254 |
+
border-radius: 8px;
|
| 255 |
+
cursor: pointer;
|
| 256 |
+
color: #ff3b30;
|
| 257 |
+
font-size: 14px;
|
| 258 |
+
display: flex;
|
| 259 |
+
align-items: center;
|
| 260 |
+
justify-content: center;
|
| 261 |
+
transition: all 0.2s ease;
|
| 262 |
+
flex-shrink: 0;
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
.todo-item:hover .delete-btn {
|
| 266 |
+
opacity: 1;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
.delete-btn:hover {
|
| 270 |
+
background: rgba(255, 59, 48, 0.1);
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
.empty-state {
|
| 274 |
+
text-align: center;
|
| 275 |
+
padding: 60px 40px;
|
| 276 |
+
color: #8e8e93;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
.empty-state i {
|
| 280 |
+
font-size: 56px;
|
| 281 |
+
margin-bottom: 16px;
|
| 282 |
+
color: #c7c7cc;
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
.empty-state p {
|
| 286 |
+
font-size: 17px;
|
| 287 |
+
font-weight: 400;
|
| 288 |
+
letter-spacing: -0.01em;
|
| 289 |
+
}
|
| 290 |
+
|
| 291 |
+
.stats {
|
| 292 |
+
display: flex;
|
| 293 |
+
justify-content: space-around;
|
| 294 |
+
padding: 16px 20px;
|
| 295 |
+
background: #f9f9f9;
|
| 296 |
+
border-top: 0.5px solid rgba(0, 0, 0, 0.08);
|
| 297 |
+
}
|
| 298 |
+
|
| 299 |
+
.stat-item {
|
| 300 |
+
display: flex;
|
| 301 |
+
flex-direction: column;
|
| 302 |
+
align-items: center;
|
| 303 |
+
gap: 4px;
|
| 304 |
+
}
|
| 305 |
+
|
| 306 |
+
.stat-number {
|
| 307 |
+
font-size: 22px;
|
| 308 |
+
font-weight: 600;
|
| 309 |
+
color: #1c1c1e;
|
| 310 |
+
letter-spacing: -0.02em;
|
| 311 |
+
}
|
| 312 |
+
|
| 313 |
+
.stat-label {
|
| 314 |
+
font-size: 12px;
|
| 315 |
+
font-weight: 500;
|
| 316 |
+
color: #8e8e93;
|
| 317 |
+
text-transform: uppercase;
|
| 318 |
+
letter-spacing: 0.02em;
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
.stat-item.total .stat-number {
|
| 322 |
+
color: #007aff;
|
| 323 |
+
}
|
| 324 |
+
|
| 325 |
+
.stat-item.done .stat-number {
|
| 326 |
+
color: #34c759;
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
.stat-item.pending .stat-number {
|
| 330 |
+
color: #ff9500;
|
| 331 |
+
}
|
| 332 |
+
|
| 333 |
+
/* Responsive */
|
| 334 |
+
@media (max-width: 500px) {
|
| 335 |
+
body {
|
| 336 |
+
padding: 0;
|
| 337 |
+
align-items: flex-start;
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
.container {
|
| 341 |
+
border-radius: 0;
|
| 342 |
+
min-height: 100vh;
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
h1 {
|
| 346 |
+
font-size: 28px;
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
.todo-item {
|
| 350 |
+
margin: 0 8px 2px;
|
| 351 |
+
padding: 12px 16px;
|
| 352 |
+
}
|
| 353 |
+
|
| 354 |
+
.delete-btn {
|
| 355 |
+
opacity: 0.6;
|
| 356 |
+
}
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
/* Dark mode support */
|
| 360 |
+
@media (prefers-color-scheme: dark) {
|
| 361 |
+
body {
|
| 362 |
+
background: #000000;
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
.container {
|
| 366 |
+
background: #1c1c1e;
|
| 367 |
+
box-shadow: none;
|
| 368 |
+
}
|
| 369 |
+
|
| 370 |
+
header {
|
| 371 |
+
background: linear-gradient(180deg, #1c1c1e 0%, #1c1c1e 100%);
|
| 372 |
+
border-bottom-color: rgba(255, 255, 255, 0.1);
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
h1 {
|
| 376 |
+
color: #ffffff;
|
| 377 |
+
}
|
| 378 |
+
|
| 379 |
+
.input-group {
|
| 380 |
+
background: #2c2c2e;
|
| 381 |
+
border-bottom-color: rgba(255, 255, 255, 0.08);
|
| 382 |
+
}
|
| 383 |
+
|
| 384 |
+
input[type="text"] {
|
| 385 |
+
background: #3a3a3c;
|
| 386 |
+
color: #ffffff;
|
| 387 |
+
box-shadow: none;
|
| 388 |
+
}
|
| 389 |
+
|
| 390 |
+
input[type="text"]::placeholder {
|
| 391 |
+
color: #8e8e93;
|
| 392 |
+
}
|
| 393 |
+
|
| 394 |
+
.todo-item:hover {
|
| 395 |
+
background: rgba(255, 255, 255, 0.05);
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
.todo-text {
|
| 399 |
+
color: #ffffff;
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
.todo-item.completed .todo-text {
|
| 403 |
+
color: #636366;
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
.custom-checkbox {
|
| 407 |
+
border-color: #636366;
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
.empty-state {
|
| 411 |
+
color: #8e8e93;
|
| 412 |
+
}
|
| 413 |
+
|
| 414 |
+
.empty-state i {
|
| 415 |
+
color: #636366;
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
.stats {
|
| 419 |
+
background: #2c2c2e;
|
| 420 |
+
border-top-color: rgba(255, 255, 255, 0.08);
|
| 421 |
+
}
|
| 422 |
+
|
| 423 |
+
.stat-number {
|
| 424 |
+
color: #ffffff;
|
| 425 |
+
}
|
| 426 |
+
}
|
| 427 |
+
</style>
|
| 428 |
+
</head>
|
| 429 |
+
|
| 430 |
+
<body>
|
| 431 |
+
<div class="container">
|
| 432 |
+
<header>
|
| 433 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">Built with anycoder</a>
|
| 434 |
+
<h1><i class="fas fa-list-check"></i> Reminders</h1>
|
| 435 |
+
</header>
|
| 436 |
+
<div class="input-group">
|
| 437 |
+
<input type="text" id="todoInput" placeholder="Add a new reminder..." onkeypress="if(event.key==='Enter')addTodo()">
|
| 438 |
+
<button class="add-btn" onclick="addTodo()"><i class="fas fa-plus"></i></button>
|
| 439 |
+
</div>
|
| 440 |
+
<ul class="todo-list" id="todoList"></ul>
|
| 441 |
+
<div class="stats" id="stats"></div>
|
| 442 |
+
</div>
|
| 443 |
+
<script>
|
| 444 |
+
let todos = JSON.parse(localStorage.getItem('todos')) || [];
|
| 445 |
+
|
| 446 |
+
const render = () => {
|
| 447 |
+
const list = document.getElementById('todoList');
|
| 448 |
+
const stats = document.getElementById('stats');
|
| 449 |
+
|
| 450 |
+
if (todos.length === 0) {
|
| 451 |
+
list.innerHTML = `
|
| 452 |
+
<div class="empty-state">
|
| 453 |
+
<i class="fas fa-bell-slash"></i>
|
| 454 |
+
<p>No reminders yet</p>
|
| 455 |
+
</div>
|
| 456 |
+
`;
|
| 457 |
+
stats.style.display = 'none';
|
| 458 |
+
} else {
|
| 459 |
+
list.innerHTML = todos.map((t, i) => `
|
| 460 |
+
<li class="todo-item ${t.done ? 'completed' : ''}">
|
| 461 |
+
<div class="checkbox-wrapper">
|
| 462 |
+
<input type="checkbox" ${t.done ? 'checked' : ''} onchange="toggle(${i})">
|
| 463 |
+
<div class="custom-checkbox">
|
| 464 |
+
<i class="fas fa-check"></i>
|
| 465 |
+
</div>
|
| 466 |
+
</div>
|
| 467 |
+
<span class="todo-text">${escapeHtml(t.text)}</span>
|
| 468 |
+
<button class="delete-btn" onclick="remove(${i})"><i class="fas fa-trash-alt"></i></button>
|
| 469 |
+
</li>
|
| 470 |
+
`).join('');
|
| 471 |
+
|
| 472 |
+
const done = todos.filter(t => t.done).length;
|
| 473 |
+
const pending = todos.length - done;
|
| 474 |
+
|
| 475 |
+
stats.innerHTML = `
|
| 476 |
+
<div class="stat-item total">
|
| 477 |
+
<span class="stat-number">${todos.length}</span>
|
| 478 |
+
<span class="stat-label">Total</span>
|
| 479 |
+
</div>
|
| 480 |
+
<div class="stat-item done">
|
| 481 |
+
<span class="stat-number">${done}</span>
|
| 482 |
+
<span class="stat-label">Done</span>
|
| 483 |
+
</div>
|
| 484 |
+
<div class="stat-item pending">
|
| 485 |
+
<span class="stat-number">${pending}</span>
|
| 486 |
+
<span class="stat-label">Pending</span>
|
| 487 |
+
</div>
|
| 488 |
+
`;
|
| 489 |
+
stats.style.display = 'flex';
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
localStorage.setItem('todos', JSON.stringify(todos));
|
| 493 |
+
};
|
| 494 |
+
|
| 495 |
+
const escapeHtml = (text) => {
|
| 496 |
+
const div = document.createElement('div');
|
| 497 |
+
div.textContent = text;
|
| 498 |
+
return div.innerHTML;
|
| 499 |
+
};
|
| 500 |
+
|
| 501 |
+
const addTodo = () => {
|
| 502 |
+
const input = document.getElementById('todoInput');
|
| 503 |
+
if (input.value.trim()) {
|
| 504 |
+
todos.unshift({ text: input.value.trim(), done: false });
|
| 505 |
+
input.value = '';
|
| 506 |
+
render();
|
| 507 |
+
}
|
| 508 |
+
};
|
| 509 |
+
|
| 510 |
+
const toggle = (i) => {
|
| 511 |
+
todos[i].done = !todos[i].done;
|
| 512 |
+
render();
|
| 513 |
+
};
|
| 514 |
+
|
| 515 |
+
const remove = (i) => {
|
| 516 |
+
todos.splice(i, 1);
|
| 517 |
+
render();
|
| 518 |
+
};
|
| 519 |
+
|
| 520 |
+
render();
|
| 521 |
+
</script>
|
| 522 |
+
</body>
|
| 523 |
+
|
| 524 |
+
</html>
|