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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="ru">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Добро пожаловать | Привет Dashboard</title>
|
| 7 |
+
<!-- Importing FontAwesome for Icons -->
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
|
| 10 |
+
<style>
|
| 11 |
+
/* --- CSS Variables & Reset --- */
|
| 12 |
+
:root {
|
| 13 |
+
--primary-color: #6366f1;
|
| 14 |
+
--secondary-color: #a855f7;
|
| 15 |
+
--accent-color: #ec4899;
|
| 16 |
+
--bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
|
| 17 |
+
--glass-bg: rgba(255, 255, 255, 0.05);
|
| 18 |
+
--glass-border: rgba(255, 255, 255, 0.1);
|
| 19 |
+
--text-main: #f8fafc;
|
| 20 |
+
--text-muted: #94a3b8;
|
| 21 |
+
--card-radius: 16px;
|
| 22 |
+
--shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
|
| 23 |
+
--font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
* {
|
| 27 |
+
margin: 0;
|
| 28 |
+
padding: 0;
|
| 29 |
+
box-sizing: border-box;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
body {
|
| 33 |
+
font-family: var(--font-family);
|
| 34 |
+
background: var(--bg-gradient);
|
| 35 |
+
color: var(--text-main);
|
| 36 |
+
min-height: 100vh;
|
| 37 |
+
display: flex;
|
| 38 |
+
flex-direction: column;
|
| 39 |
+
overflow-x: hidden;
|
| 40 |
+
position: relative;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
/* --- Background Animated Blobs --- */
|
| 44 |
+
.blob {
|
| 45 |
+
position: absolute;
|
| 46 |
+
border-radius: 50%;
|
| 47 |
+
filter: blur(80px);
|
| 48 |
+
opacity: 0.4;
|
| 49 |
+
z-index: -1;
|
| 50 |
+
animation: float 10s infinite alternate;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--primary-color); animation-delay: 0s; }
|
| 54 |
+
.blob-2 { bottom: -10%; right: -10%; width: 400px; height: 400px; background: var(--secondary-color); animation-delay: 2s; }
|
| 55 |
+
.blob-3 { top: 40%; left: 40%; width: 300px; height: 300px; background: var(--accent-color); animation-delay: 4s; }
|
| 56 |
+
|
| 57 |
+
@keyframes float {
|
| 58 |
+
0% { transform: translate(0, 0) scale(1); }
|
| 59 |
+
100% { transform: translate(30px, 50px) scale(1.1); }
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
/* --- Header --- */
|
| 63 |
+
header {
|
| 64 |
+
display: flex;
|
| 65 |
+
justify-content: space-between;
|
| 66 |
+
align-items: center;
|
| 67 |
+
padding: 1.5rem 2rem;
|
| 68 |
+
backdrop-filter: blur(10px);
|
| 69 |
+
border-bottom: 1px solid var(--glass-border);
|
| 70 |
+
position: sticky;
|
| 71 |
+
top: 0;
|
| 72 |
+
z-index: 100;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.logo {
|
| 76 |
+
font-size: 1.5rem;
|
| 77 |
+
font-weight: 700;
|
| 78 |
+
background: linear-gradient(to right, #818cf8, #c084fc);
|
| 79 |
+
-webkit-background-clip: text;
|
| 80 |
+
-webkit-text-fill-color: transparent;
|
| 81 |
+
display: flex;
|
| 82 |
+
align-items: center;
|
| 83 |
+
gap: 10px;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.anycoder-link {
|
| 87 |
+
font-size: 0.9rem;
|
| 88 |
+
color: var(--text-muted);
|
| 89 |
+
text-decoration: none;
|
| 90 |
+
padding: 8px 16px;
|
| 91 |
+
border: 1px solid var(--glass-border);
|
| 92 |
+
border-radius: 20px;
|
| 93 |
+
transition: all 0.3s ease;
|
| 94 |
+
background: rgba(255,255,255,0.05);
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.anycoder-link:hover {
|
| 98 |
+
background: var(--primary-color);
|
| 99 |
+
color: white;
|
| 100 |
+
border-color: var(--primary-color);
|
| 101 |
+
transform: translateY(-2px);
|
| 102 |
+
box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
/* --- Main Layout --- */
|
| 106 |
+
main {
|
| 107 |
+
flex: 1;
|
| 108 |
+
max-width: 1200px;
|
| 109 |
+
margin: 0 auto;
|
| 110 |
+
padding: 2rem;
|
| 111 |
+
width: 100%;
|
| 112 |
+
display: grid;
|
| 113 |
+
grid-template-columns: 2fr 1fr;
|
| 114 |
+
gap: 2rem;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
/* --- Hero Section (Greeting) --- */
|
| 118 |
+
.hero-section {
|
| 119 |
+
grid-column: 1 / -1;
|
| 120 |
+
display: flex;
|
| 121 |
+
flex-direction: column;
|
| 122 |
+
justify-content: center;
|
| 123 |
+
min-height: 300px;
|
| 124 |
+
text-align: center;
|
| 125 |
+
background: var(--glass-bg);
|
| 126 |
+
border: 1px solid var(--glass-border);
|
| 127 |
+
border-radius: var(--card-radius);
|
| 128 |
+
padding: 3rem;
|
| 129 |
+
position: relative;
|
| 130 |
+
overflow: hidden;
|
| 131 |
+
box-shadow: var(--shadow);
|
| 132 |
+
backdrop-filter: blur(20px);
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
.hero-content {
|
| 136 |
+
z-index: 2;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.greeting-title {
|
| 140 |
+
font-size: 4rem;
|
| 141 |
+
font-weight: 800;
|
| 142 |
+
margin-bottom: 1rem;
|
| 143 |
+
background: linear-gradient(to right, #fff, #cbd5e1);
|
| 144 |
+
-webkit-background-clip: text;
|
| 145 |
+
-webkit-text-fill-color: transparent;
|
| 146 |
+
letter-spacing: -1px;
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
.time-display {
|
| 150 |
+
font-size: 2rem;
|
| 151 |
+
font-weight: 300;
|
| 152 |
+
color: var(--text-muted);
|
| 153 |
+
font-family: 'Courier New', monospace;
|
| 154 |
+
margin-bottom: 1.5rem;
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
.date-display {
|
| 158 |
+
font-size: 1.1rem;
|
| 159 |
+
color: var(--primary-color);
|
| 160 |
+
font-weight: 600;
|
| 161 |
+
text-transform: uppercase;
|
| 162 |
+
letter-spacing: 2px;
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
/* --- Cards & Widgets --- */
|
| 166 |
+
.card {
|
| 167 |
+
background: var(--glass-bg);
|
| 168 |
+
border: 1px solid var(--glass-border);
|
| 169 |
+
border-radius: var(--card-radius);
|
| 170 |
+
padding: 1.5rem;
|
| 171 |
+
backdrop-filter: blur(20px);
|
| 172 |
+
box-shadow: var(--shadow);
|
| 173 |
+
transition: transform 0.3s ease;
|
| 174 |
+
display: flex;
|
| 175 |
+
flex-direction: column;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
.card:hover {
|
| 179 |
+
transform: translateY(-5px);
|
| 180 |
+
border-color: rgba(255, 255, 255, 0.2);
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
.card-header {
|
| 184 |
+
display: flex;
|
| 185 |
+
justify-content: space-between;
|
| 186 |
+
align-items: center;
|
| 187 |
+
margin-bottom: 1.5rem;
|
| 188 |
+
border-bottom: 1px solid var(--glass-border);
|
| 189 |
+
padding-bottom: 0.8rem;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
.card-title {
|
| 193 |
+
font-size: 1.2rem;
|
| 194 |
+
font-weight: 600;
|
| 195 |
+
color: var(--text-main);
|
| 196 |
+
display: flex;
|
| 197 |
+
align-items: center;
|
| 198 |
+
gap: 10px;
|
| 199 |
+
}
|
| 200 |
+
|
| 201 |
+
/* --- Focus Timer Styles --- */
|
| 202 |
+
.timer-display {
|
| 203 |
+
font-size: 3.5rem;
|
| 204 |
+
font-weight: 700;
|
| 205 |
+
text-align: center;
|
| 206 |
+
margin: 1rem 0;
|
| 207 |
+
color: var(--text-main);
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
.timer-controls {
|
| 211 |
+
display: flex;
|
| 212 |
+
justify-content: center;
|
| 213 |
+
gap: 1rem;
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
.btn {
|
| 217 |
+
padding: 0.6rem 1.2rem;
|
| 218 |
+
border: none;
|
| 219 |
+
border-radius: 8px;
|
| 220 |
+
cursor: pointer;
|
| 221 |
+
font-weight: 600;
|
| 222 |
+
transition: all 0.2s;
|
| 223 |
+
display: flex;
|
| 224 |
+
align-items: center;
|
| 225 |
+
gap: 8px;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
.btn-primary {
|
| 229 |
+
background: var(--primary-color);
|
| 230 |
+
color: white;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
.btn-primary:hover {
|
| 234 |
+
background: #4f46e5;
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
.btn-secondary {
|
| 238 |
+
background: rgba(255,255,255,0.1);
|
| 239 |
+
color: var(--text-main);
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
.btn-secondary:hover {
|
| 243 |
+
background: rgba(255,255,255,0.2);
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
/* --- Todo List Styles --- */
|
| 247 |
+
.todo-input-group {
|
| 248 |
+
display: flex;
|
| 249 |
+
gap: 10px;
|
| 250 |
+
margin-bottom: 1rem;
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
.todo-input {
|
| 254 |
+
flex: 1;
|
| 255 |
+
background: rgba(0,0,0,0.2);
|
| 256 |
+
border: 1px solid var(--glass-border);
|
| 257 |
+
padding: 0.8rem;
|
| 258 |
+
border-radius: 8px;
|
| 259 |
+
color: white;
|
| 260 |
+
outline: none;
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
.todo-input:focus {
|
| 264 |
+
border-color: var(--primary-color);
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
.todo-list {
|
| 268 |
+
list-style: none;
|
| 269 |
+
overflow-y: auto;
|
| 270 |
+
max-height: 250px;
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
.todo-item {
|
| 274 |
+
background: rgba(255,255,255,0.03);
|
| 275 |
+
margin-bottom: 8px;
|
| 276 |
+
padding: 10px;
|
| 277 |
+
border-radius: 6px;
|
| 278 |
+
display: flex;
|
| 279 |
+
justify-content: space-between;
|
| 280 |
+
align-items: center;
|
| 281 |
+
animation: slideIn 0.3s ease;
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
@keyframes slideIn {
|
| 285 |
+
from { opacity: 0; transform: translateX(-10px); }
|
| 286 |
+
to { opacity: 1; transform: translateX(0); }
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
.todo-item.completed span {
|
| 290 |
+
text-decoration: line-through;
|
| 291 |
+
color: var(--text-muted);
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
.delete-btn {
|
| 295 |
+
background: none;
|
| 296 |
+
border: none;
|
| 297 |
+
color: #ef4444;
|
| 298 |
+
cursor: pointer;
|
| 299 |
+
opacity: 0.7;
|
| 300 |
+
transition: opacity 0.2s;
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
.delete-btn:hover {
|
| 304 |
+
opacity: 1;
|
| 305 |
+
}
|
| 306 |
+
|
| 307 |
+
/* --- Footer --- */
|
| 308 |
+
footer {
|
| 309 |
+
text-align: center;
|
| 310 |
+
padding: 2rem;
|
| 311 |
+
color: var(--text-muted);
|
| 312 |
+
font-size: 0.9rem;
|
| 313 |
+
border-top: 1px solid var(--glass-border);
|
| 314 |
+
background: rgba(15, 23, 42, 0.8);
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
/* --- Responsive Design --- */
|
| 318 |
+
@media (max-width: 768px) {
|
| 319 |
+
main {
|
| 320 |
+
grid-template-columns: 1fr;
|
| 321 |
+
padding: 1rem;
|
| 322 |
+
}
|
| 323 |
+
|
| 324 |
+
.greeting-title {
|
| 325 |
+
font-size: 2.5rem;
|
| 326 |
+
}
|
| 327 |
+
|
| 328 |
+
.timer-display {
|
| 329 |
+
font-size: 2.5rem;
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
header {
|
| 333 |
+
padding: 1rem;
|
| 334 |
+
}
|
| 335 |
+
}
|
| 336 |
+
</style>
|
| 337 |
+
</head>
|
| 338 |
+
<body>
|
| 339 |
+
|
| 340 |
+
<!-- Background Blobs -->
|
| 341 |
+
<div class="blob blob-1"></div>
|
| 342 |
+
<div class="blob blob-2"></div>
|
| 343 |
+
<div class="blob blob-3"></div>
|
| 344 |
+
|
| 345 |
+
<header>
|
| 346 |
+
<div class="logo">
|
| 347 |
+
<i class="fa-solid fa-layer-group"></i>
|
| 348 |
+
<span>MySpace</span>
|
| 349 |
+
</div>
|
| 350 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
|
| 351 |
+
Built with anycoder <i class="fa-solid fa-arrow-up-right-from-square" style="font-size: 0.7em; margin-left: 5px;"></i>
|
| 352 |
+
</a>
|
| 353 |
+
</header>
|
| 354 |
+
|
| 355 |
+
<main>
|
| 356 |
+
<!-- Hero / Greeting Section -->
|
| 357 |
+
<section class="hero-section">
|
| 358 |
+
<div class="hero-content">
|
| 359 |
+
<h1 class="greeting-title" id="greeting-text">Привет!</h1>
|
| 360 |
+
<div class="time-display" id="clock">00:00:00</div>
|
| 361 |
+
<div class="date-display" id="date">Загрузка даты...</div>
|
| 362 |
+
</div>
|
| 363 |
+
</section>
|
| 364 |
+
|
| 365 |
+
<!-- Widget 1: Focus Timer -->
|
| 366 |
+
<section class="card">
|
| 367 |
+
<div class="card-header">
|
| 368 |
+
<div class="card-title">
|
| 369 |
+
<i class="fa-solid fa-hourglass-half" style="color: var(--accent-color);"></i>
|
| 370 |
+
Фокус Таймер
|
| 371 |
+
</div>
|
| 372 |
+
<i class="fa-solid fa-ellipsis text-muted"></i>
|
| 373 |
+
</div>
|
| 374 |
+
<div class="timer-display" id="timer">25:00</div>
|
| 375 |
+
<div class="timer-controls">
|
| 376 |
+
<button class="btn btn-primary" id="start-timer" onclick="toggleTimer()">
|
| 377 |
+
<i class="fa-solid fa-play"></i> Старт
|
| 378 |
+
</button>
|
| 379 |
+
<button class="btn btn-secondary" onclick="resetTimer()">
|
| 380 |
+
<i class="fa-solid fa-rotate-right"></i> Сброс
|
| 381 |
+
</button>
|
| 382 |
+
</div>
|
| 383 |
+
</section>
|
| 384 |
+
|
| 385 |
+
<!-- Widget 2: Quick Tasks -->
|
| 386 |
+
<section class="card">
|
| 387 |
+
<div class="card-header">
|
| 388 |
+
<div class="card-title">
|
| 389 |
+
<i class="fa-solid fa-check-double" style="color: var(--secondary-color);"></i>
|
| 390 |
+
Задачи
|
| 391 |
+
</div>
|
| 392 |
+
<span id="task-count" style="background: rgba(255,255,255,0.1); padding: 2px 8px; border-radius: 10px; font-size: 0.8rem;">0</span>
|
| 393 |
+
</div>
|
| 394 |
+
<div class="todo-input-group">
|
| 395 |
+
<input type="text" id="todo-input" class="todo-input" placeholder="Добавить задачу..." onkeypress="handleEnter(event)">
|
| 396 |
+
<button class="btn btn-primary" onclick="addTodo()">
|
| 397 |
+
<i class="fa-solid fa-plus"></i>
|
| 398 |
+
</button>
|
| 399 |
+
</div>
|
| 400 |
+
<ul class="todo-list" id="todo-list">
|
| 401 |
+
<!-- Tasks will appear here -->
|
| 402 |
+
</ul>
|
| 403 |
+
</section>
|
| 404 |
+
</main>
|
| 405 |
+
|
| 406 |
+
<footer>
|
| 407 |
+
<p>© 2023 MySpace Dashboard. Дизайн создан с любовью и кодом.</p>
|
| 408 |
+
</footer>
|
| 409 |
+
|
| 410 |
+
<script>
|
| 411 |
+
// --- Greeting & Clock Logic ---
|
| 412 |
+
function updateTime() {
|
| 413 |
+
const now = new Date();
|
| 414 |
+
|
| 415 |
+
// Time Formatting
|
| 416 |
+
const hours = String(now.getHours()).padStart(2, '0');
|
| 417 |
+
const minutes = String(now.getMinutes()).padStart(2, '0');
|
| 418 |
+
const seconds = String(now.getSeconds()).padStart(2, '0');
|
| 419 |
+
document.getElementById('clock').textContent = `${hours}:${minutes}:${seconds}`;
|
| 420 |
+
|
| 421 |
+
// Date Formatting (Russian locale)
|
| 422 |
+
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
|
| 423 |
+
document.getElementById('date').textContent = now.toLocaleDateString('ru-RU', options);
|
| 424 |
+
|
| 425 |
+
// Dynamic Greeting
|
| 426 |
+
const hour = now.getHours();
|
| 427 |
+
const greetingElement = document.getElementById('greeting-text');
|
| 428 |
+
let greetingText = 'Привет!';
|
| 429 |
+
|
| 430 |
+
if (hour >= 5 && hour < 12) greetingText = 'Доброе утро!';
|
| 431 |
+
else if (hour >= 12 && hour < 18) greetingText = 'Добрый день!';
|
| 432 |
+
else if (hour >= 18 && hour < 23) greetingText = 'Добрый вечер!';
|
| 433 |
+
else greetingText = 'Доброй ночи!';
|
| 434 |
+
|
| 435 |
+
// Only update DOM if text changes to prevent flicker/layout shift
|
| 436 |
+
if (greetingElement.textContent !== greetingText) {
|
| 437 |
+
greetingElement.textContent = greetingText;
|
| 438 |
+
}
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
setInterval(updateTime, 1000);
|
| 442 |
+
updateTime(); // Initial call
|
| 443 |
+
|
| 444 |
+
// --- Focus Timer Logic ---
|
| 445 |
+
let timerInterval;
|
| 446 |
+
let timeLeft = 25 * 60; // 25 minutes in seconds
|
| 447 |
+
let isRunning = false;
|
| 448 |
+
|
| 449 |
+
function formatTime(seconds) {
|
| 450 |
+
const m = Math.floor(seconds / 60);
|
| 451 |
+
const s = seconds % 60;
|
| 452 |
+
return `${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}`;
|
| 453 |
+
}
|
| 454 |
+
|
| 455 |
+
function updateTimerDisplay() {
|
| 456 |
+
document.getElementById('timer').textContent = formatTime(timeLeft);
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
function toggleTimer() {
|
| 460 |
+
const btn = document.getElementById('start-timer');
|
| 461 |
+
if (isRunning) {
|
| 462 |
+
clearInterval(timerInterval);
|
| 463 |
+
btn.innerHTML = '<i class="fa-solid fa-play"></i> Старт';
|
| 464 |
+
btn.classList.remove('btn-secondary');
|
| 465 |
+
btn.classList.add('btn-primary');
|
| 466 |
+
} else {
|
| 467 |
+
timerInterval = setInterval(() => {
|
| 468 |
+
if (timeLeft > 0) {
|
| 469 |
+
timeLeft--;
|
| 470 |
+
updateTimerDisplay();
|
| 471 |
+
} else {
|
| 472 |
+
clearInterval(timerInterval);
|
| 473 |
+
isRunning = false;
|
| 474 |
+
alert("Время вышло! Сделайте перерыв."); // Simple feedback
|
| 475 |
+
resetTimer();
|
| 476 |
+
}
|
| 477 |
+
}, 1000);
|
| 478 |
+
btn.innerHTML = '<i class="fa-solid fa-pause"></i> Пауза';
|
| 479 |
+
btn.classList.remove('btn-primary');
|
| 480 |
+
btn.classList.add('btn-secondary');
|
| 481 |
+
}
|
| 482 |
+
isRunning = !isRunning;
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
function resetTimer() {
|
| 486 |
+
clearInterval(timerInterval);
|
| 487 |
+
isRunning = false;
|
| 488 |
+
timeLeft = 25 * 60;
|
| 489 |
+
updateTimerDisplay();
|
| 490 |
+
const btn = document.getElementById('start-timer');
|
| 491 |
+
btn.innerHTML = '<i class="fa-solid fa-play"></i> Старт';
|
| 492 |
+
btn.classList.remove('btn-secondary');
|
| 493 |
+
btn.classList.add('btn-primary');
|
| 494 |
+
}
|
| 495 |
+
|
| 496 |
+
// --- Todo List Logic ---
|
| 497 |
+
const todoInput = document.getElementById('todo-input');
|
| 498 |
+
const todoList = document.getElementById('todo-list');
|
| 499 |
+
const taskCount = document.getElementById('task-count');
|
| 500 |
+
let todos = [];
|
| 501 |
+
|
| 502 |
+
function handleEnter(e) {
|
| 503 |
+
if (e.key === 'Enter') addTodo();
|
| 504 |
+
}
|
| 505 |
+
|
| 506 |
+
function addTodo() {
|
| 507 |
+
const text = todoInput.value.trim();
|
| 508 |
+
if (text === '') return;
|
| 509 |
+
|
| 510 |
+
const todo = {
|
| 511 |
+
id: Date.now(),
|
| 512 |
+
text: text,
|
| 513 |
+
completed: false
|
| 514 |
+
};
|
| 515 |
+
|
| 516 |
+
todos.push(todo);
|
| 517 |
+
renderTodos();
|
| 518 |
+
todoInput.value = '';
|
| 519 |
+
}
|
| 520 |
+
|
| 521 |
+
function toggleTodo(id) {
|
| 522 |
+
todos = todos.map(t => t.id === id ? {...t, completed: !t.completed} : t);
|
| 523 |
+
renderTodos();
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
function deleteTodo(id) {
|
| 527 |
+
todos = todos.filter(t => t.id !== id);
|
| 528 |
+
renderTodos();
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
function renderTodos() {
|
| 532 |
+
todoList.innerHTML = '';
|
| 533 |
+
taskCount.textContent = todos.filter(t => !t.completed).length;
|
| 534 |
+
|
| 535 |
+
todos.forEach(todo => {
|
| 536 |
+
const li = document.createElement('li');
|
| 537 |
+
li.className = `todo-item ${todo.completed ? 'completed' : ''}`;
|
| 538 |
+
li.innerHTML = `
|
| 539 |
+
<div style="display:flex; align-items:center; gap:10px; cursor:pointer;" onclick="toggleTodo(${todo.id})">
|
| 540 |
+
<i class="fa-regular ${todo.completed ? 'fa-circle-check' : 'fa-circle'}" style="color: var(--primary-color);"></i>
|
| 541 |
+
<span>${todo.text}</span>
|
| 542 |
+
</div>
|
| 543 |
+
<button class="delete-btn" onclick="deleteTodo(${todo.id})">
|
| 544 |
+
<i class="fa-solid fa-trash"></i>
|
| 545 |
+
</button>
|
| 546 |
+
`;
|
| 547 |
+
todoList.appendChild(li);
|
| 548 |
+
});
|
| 549 |
+
}
|
| 550 |
+
</script>
|
| 551 |
+
</body>
|
| 552 |
+
</html>
|