Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +843 -685
templates/index.html
CHANGED
|
@@ -1,685 +1,843 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8" />
|
| 5 |
-
<title>Modern Weather Dashboard</title>
|
| 6 |
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
-
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet" />
|
| 8 |
-
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
-
<style>
|
| 10 |
-
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
|
| 11 |
-
|
| 12 |
-
* {
|
| 13 |
-
margin: 0;
|
| 14 |
-
padding: 0;
|
| 15 |
-
box-sizing: border-box;
|
| 16 |
-
}
|
| 17 |
-
|
| 18 |
-
:root {
|
| 19 |
-
--primary-green: #10b981;
|
| 20 |
-
--light-green: #d1fae5;
|
| 21 |
-
--dark-green: #065f46;
|
| 22 |
-
--gradient-start: #059669;
|
| 23 |
-
--gradient-end: #047857;
|
| 24 |
-
}
|
| 25 |
-
|
| 26 |
-
body {
|
| 27 |
-
font-family: 'Plus Jakarta Sans', sans-serif;
|
| 28 |
-
background: #f0fdf4;
|
| 29 |
-
color: #1f2937;
|
| 30 |
-
line-height: 1.5;
|
| 31 |
-
}
|
| 32 |
-
|
| 33 |
-
/* Animations */
|
| 34 |
-
@keyframes fadeInUp {
|
| 35 |
-
from {
|
| 36 |
-
opacity: 0;
|
| 37 |
-
transform: translateY(20px);
|
| 38 |
-
}
|
| 39 |
-
to {
|
| 40 |
-
opacity: 1;
|
| 41 |
-
transform: translateY(0);
|
| 42 |
-
}
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
@keyframes slideInLeft {
|
| 46 |
-
from {
|
| 47 |
-
opacity: 0;
|
| 48 |
-
transform: translateX(-20px);
|
| 49 |
-
}
|
| 50 |
-
to {
|
| 51 |
-
opacity: 1;
|
| 52 |
-
transform: translateX(0);
|
| 53 |
-
}
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
@keyframes pulse {
|
| 57 |
-
0% { transform: scale(1); }
|
| 58 |
-
50% { transform: scale(1.05); }
|
| 59 |
-
100% { transform: scale(1); }
|
| 60 |
-
}
|
| 61 |
-
|
| 62 |
-
/* Layout */
|
| 63 |
-
.container {
|
| 64 |
-
display: flex;
|
| 65 |
-
min-height: 100vh;
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
}
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
font-
|
| 187 |
-
color: var(--dark-green);
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
gap:
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
.
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
}
|
| 232 |
-
|
| 233 |
-
.highlight-card
|
| 234 |
-
|
| 235 |
-
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
color: #6b7280;
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
.
|
| 338 |
-
margin-top:
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
}
|
| 368 |
-
.current-temp {
|
| 369 |
-
font-size:
|
| 370 |
-
}
|
| 371 |
-
.weather-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
}
|
| 384 |
-
|
| 385 |
-
/*
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
| 529 |
-
|
| 530 |
-
|
| 531 |
-
|
| 532 |
-
|
| 533 |
-
|
| 534 |
-
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
|
| 541 |
-
|
| 542 |
-
|
| 543 |
-
|
| 544 |
-
|
| 545 |
-
|
| 546 |
-
|
| 547 |
-
|
| 548 |
-
|
| 549 |
-
|
| 550 |
-
|
| 551 |
-
|
| 552 |
-
|
| 553 |
-
|
| 554 |
-
|
| 555 |
-
|
| 556 |
-
|
| 557 |
-
|
| 558 |
-
|
| 559 |
-
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
| 576 |
-
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
|
| 593 |
-
|
| 594 |
-
|
| 595 |
-
|
| 596 |
-
|
| 597 |
-
|
| 598 |
-
|
| 599 |
-
|
| 600 |
-
|
| 601 |
-
|
| 602 |
-
|
| 603 |
-
|
| 604 |
-
|
| 605 |
-
|
| 606 |
-
<
|
| 607 |
-
|
| 608 |
-
|
| 609 |
-
|
| 610 |
-
|
| 611 |
-
|
| 612 |
-
|
| 613 |
-
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
|
| 639 |
-
|
| 640 |
-
|
| 641 |
-
|
| 642 |
-
|
| 643 |
-
|
| 644 |
-
|
| 645 |
-
|
| 646 |
-
|
| 647 |
-
|
| 648 |
-
|
| 649 |
-
|
| 650 |
-
|
| 651 |
-
|
| 652 |
-
|
| 653 |
-
|
| 654 |
-
}
|
| 655 |
-
|
| 656 |
-
|
| 657 |
-
|
| 658 |
-
|
| 659 |
-
|
| 660 |
-
|
| 661 |
-
|
| 662 |
-
|
| 663 |
-
|
| 664 |
-
|
| 665 |
-
|
| 666 |
-
|
| 667 |
-
|
| 668 |
-
|
| 669 |
-
|
| 670 |
-
|
| 671 |
-
|
| 672 |
-
|
| 673 |
-
|
| 674 |
-
|
| 675 |
-
|
| 676 |
-
|
| 677 |
-
|
| 678 |
-
|
| 679 |
-
|
| 680 |
-
|
| 681 |
-
|
| 682 |
-
|
| 683 |
-
|
| 684 |
-
</
|
| 685 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<title>Modern Weather Dashboard</title>
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet" />
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<style>
|
| 10 |
+
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');
|
| 11 |
+
|
| 12 |
+
* {
|
| 13 |
+
margin: 0;
|
| 14 |
+
padding: 0;
|
| 15 |
+
box-sizing: border-box;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
:root {
|
| 19 |
+
--primary-green: #10b981;
|
| 20 |
+
--light-green: #d1fae5;
|
| 21 |
+
--dark-green: #065f46;
|
| 22 |
+
--gradient-start: #059669;
|
| 23 |
+
--gradient-end: #047857;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
body {
|
| 27 |
+
font-family: 'Plus Jakarta Sans', sans-serif;
|
| 28 |
+
background: #f0fdf4;
|
| 29 |
+
color: #1f2937;
|
| 30 |
+
line-height: 1.5;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
/* Animations */
|
| 34 |
+
@keyframes fadeInUp {
|
| 35 |
+
from {
|
| 36 |
+
opacity: 0;
|
| 37 |
+
transform: translateY(20px);
|
| 38 |
+
}
|
| 39 |
+
to {
|
| 40 |
+
opacity: 1;
|
| 41 |
+
transform: translateY(0);
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
@keyframes slideInLeft {
|
| 46 |
+
from {
|
| 47 |
+
opacity: 0;
|
| 48 |
+
transform: translateX(-20px);
|
| 49 |
+
}
|
| 50 |
+
to {
|
| 51 |
+
opacity: 1;
|
| 52 |
+
transform: translateX(0);
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
@keyframes pulse {
|
| 57 |
+
0% { transform: scale(1); }
|
| 58 |
+
50% { transform: scale(1.05); }
|
| 59 |
+
100% { transform: scale(1); }
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
/* Layout */
|
| 63 |
+
.container {
|
| 64 |
+
display: flex;
|
| 65 |
+
min-height: 100vh;
|
| 66 |
+
flex-direction: row; /* Default for larger screens */
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
/* Sidebar */
|
| 70 |
+
.sidebar {
|
| 71 |
+
width: 300px;
|
| 72 |
+
background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
|
| 73 |
+
padding: 2rem;
|
| 74 |
+
color: white;
|
| 75 |
+
position: fixed; /* Fixed for larger screens */
|
| 76 |
+
height: 100vh;
|
| 77 |
+
overflow-y: auto;
|
| 78 |
+
animation: slideInLeft 0.5s ease-out;
|
| 79 |
+
box-shadow: 4px 0 15px rgba(0,0,0,0.1);
|
| 80 |
+
z-index: 10; /* Ensure sidebar is above main content if needed */
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.sidebar-header {
|
| 84 |
+
display: flex;
|
| 85 |
+
align-items: center;
|
| 86 |
+
gap: 0.75rem;
|
| 87 |
+
margin-bottom: 2rem;
|
| 88 |
+
padding-bottom: 1rem;
|
| 89 |
+
border-bottom: 1px solid rgba(255,255,255,0.2);
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
.sidebar-header i {
|
| 93 |
+
font-size: 1.5rem;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.input-group {
|
| 97 |
+
margin-bottom: 1.5rem;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
.input-group label {
|
| 101 |
+
display: block;
|
| 102 |
+
margin-bottom: 0.5rem;
|
| 103 |
+
font-weight: 500;
|
| 104 |
+
font-size: 0.9rem;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.input-field {
|
| 108 |
+
width: 100%;
|
| 109 |
+
padding: 0.75rem;
|
| 110 |
+
border-radius: 8px;
|
| 111 |
+
border: 1px solid rgba(255,255,255,0.2);
|
| 112 |
+
background: rgba(255,255,255,0.1);
|
| 113 |
+
color: white;
|
| 114 |
+
transition: all 0.3s ease;
|
| 115 |
+
}
|
| 116 |
+
.input-field::placeholder {
|
| 117 |
+
color: rgba(255,255,255,0.7);
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
.input-field:focus {
|
| 121 |
+
outline: none;
|
| 122 |
+
border-color: rgba(255,255,255,0.5);
|
| 123 |
+
background: rgba(255,255,255,0.15);
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
.search-button {
|
| 127 |
+
width: 100%;
|
| 128 |
+
padding: 0.75rem;
|
| 129 |
+
border-radius: 8px;
|
| 130 |
+
background: white;
|
| 131 |
+
color: var(--dark-green);
|
| 132 |
+
font-weight: 600;
|
| 133 |
+
border: none;
|
| 134 |
+
cursor: pointer;
|
| 135 |
+
transition: all 0.3s ease;
|
| 136 |
+
display: flex;
|
| 137 |
+
align-items: center;
|
| 138 |
+
justify-content: center;
|
| 139 |
+
gap: 0.5rem;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
.search-button:hover {
|
| 143 |
+
transform: translateY(-2px);
|
| 144 |
+
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
/* Main Content */
|
| 148 |
+
.main-content {
|
| 149 |
+
flex: 1;
|
| 150 |
+
margin-left: 300px; /* Offset for sidebar */
|
| 151 |
+
padding: 2rem;
|
| 152 |
+
animation: fadeInUp 0.5s ease-out;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
/* Header: Current Conditions */
|
| 156 |
+
.header-card {
|
| 157 |
+
background: white;
|
| 158 |
+
border-radius: 16px;
|
| 159 |
+
padding: 2rem;
|
| 160 |
+
margin-bottom: 2rem;
|
| 161 |
+
box-shadow: 0 4px 20px rgba(0,0,0,0.05);
|
| 162 |
+
animation: fadeInUp 0.5s ease-out;
|
| 163 |
+
display: flex;
|
| 164 |
+
flex-wrap: wrap; /* Allow items to wrap */
|
| 165 |
+
justify-content: space-between;
|
| 166 |
+
align-items: center;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
.header-location {
|
| 170 |
+
font-size: 1.5rem;
|
| 171 |
+
font-weight: 700;
|
| 172 |
+
color: var(--dark-green);
|
| 173 |
+
display: flex;
|
| 174 |
+
align-items: center;
|
| 175 |
+
gap: 0.5rem;
|
| 176 |
+
margin-bottom: 1rem; /* Add margin for stacking */
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
.timestamp {
|
| 180 |
+
display: flex;
|
| 181 |
+
align-items: center;
|
| 182 |
+
gap: 0.5rem;
|
| 183 |
+
padding: 0.5rem 1rem;
|
| 184 |
+
background: var(--light-green);
|
| 185 |
+
border-radius: 8px;
|
| 186 |
+
font-size: 0.9rem;
|
| 187 |
+
color: var(--dark-green);
|
| 188 |
+
margin-bottom: 1rem; /* Add margin for stacking */
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
.current-temp {
|
| 192 |
+
font-size: 3.5rem;
|
| 193 |
+
font-weight: 700;
|
| 194 |
+
color: var(--dark-green);
|
| 195 |
+
display: flex;
|
| 196 |
+
align-items: center;
|
| 197 |
+
gap: 1rem;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
.weather-icon {
|
| 201 |
+
font-size: 3rem;
|
| 202 |
+
color: var(--primary-green);
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
.weather-details {
|
| 206 |
+
display: flex;
|
| 207 |
+
gap: 2rem;
|
| 208 |
+
margin-top: 1rem;
|
| 209 |
+
flex-wrap: wrap; /* Allow details to wrap */
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
.weather-detail {
|
| 213 |
+
display: flex;
|
| 214 |
+
align-items: center;
|
| 215 |
+
gap: 0.5rem;
|
| 216 |
+
color: var(--dark-green);
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
/* Alert Notification */
|
| 220 |
+
.alert-notification {
|
| 221 |
+
animation: fadeInUp 0.5s ease-out;
|
| 222 |
+
border-radius: 8px; /* Added border-radius */
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
/* Highlights Grid */
|
| 226 |
+
.highlights {
|
| 227 |
+
display: grid;
|
| 228 |
+
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
| 229 |
+
gap: 1.5rem;
|
| 230 |
+
margin-bottom: 2rem;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
.highlight-card {
|
| 234 |
+
background: white;
|
| 235 |
+
border-radius: 16px;
|
| 236 |
+
padding: 1.5rem;
|
| 237 |
+
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
|
| 238 |
+
transition: all 0.3s ease;
|
| 239 |
+
animation: fadeInUp 0.5s ease-out;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
.highlight-card:hover {
|
| 243 |
+
transform: translateY(-5px);
|
| 244 |
+
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
.highlight-icon {
|
| 248 |
+
font-size: 2rem;
|
| 249 |
+
color: var(--primary-green);
|
| 250 |
+
margin-bottom: 1rem;
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
.highlight-title {
|
| 254 |
+
font-size: 1rem;
|
| 255 |
+
font-weight: 600;
|
| 256 |
+
color: var(--dark-green);
|
| 257 |
+
margin-bottom: 0.5rem;
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
.highlight-value {
|
| 261 |
+
font-size: 1.75rem;
|
| 262 |
+
font-weight: 700;
|
| 263 |
+
color: var(--primary-green);
|
| 264 |
+
}
|
| 265 |
+
|
| 266 |
+
/* Forecast Section */
|
| 267 |
+
.forecast-section {
|
| 268 |
+
margin-top: 2rem;
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
.section-title {
|
| 272 |
+
font-size: 1.5rem;
|
| 273 |
+
font-weight: 700;
|
| 274 |
+
color: var(--dark-green);
|
| 275 |
+
margin-bottom: 1.5rem;
|
| 276 |
+
display: flex;
|
| 277 |
+
align-items: center;
|
| 278 |
+
gap: 0.75rem;
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
.forecast-grid {
|
| 282 |
+
display: grid;
|
| 283 |
+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
| 284 |
+
gap: 1.5rem;
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
.forecast-card {
|
| 288 |
+
background: white;
|
| 289 |
+
border-radius: 16px;
|
| 290 |
+
padding: 1.5rem;
|
| 291 |
+
text-align: center;
|
| 292 |
+
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
|
| 293 |
+
transition: all 0.3s ease;
|
| 294 |
+
animation: fadeInUp 0.5s ease-out;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
.forecast-card:hover {
|
| 298 |
+
transform: translateY(-5px);
|
| 299 |
+
box-shadow: 0 8px 25px rgba(0,0,0,0.1);
|
| 300 |
+
cursor: pointer;
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
.forecast-day {
|
| 304 |
+
font-weight: 700;
|
| 305 |
+
color: var(--dark-green);
|
| 306 |
+
font-size: 1.1rem;
|
| 307 |
+
margin-bottom: 0.5rem;
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
.forecast-date {
|
| 311 |
+
color: #6b7280;
|
| 312 |
+
font-size: 0.9rem;
|
| 313 |
+
margin-bottom: 1rem;
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
/* Conditional Forecast Icon */
|
| 317 |
+
.forecast-icon {
|
| 318 |
+
font-size: 2.5rem;
|
| 319 |
+
margin: 1rem 0;
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
.forecast-temp {
|
| 323 |
+
font-size: 1.5rem;
|
| 324 |
+
font-weight: 700;
|
| 325 |
+
color: var(--primary-green);
|
| 326 |
+
margin: 0.5rem 0;
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
.temp-range {
|
| 330 |
+
display: flex;
|
| 331 |
+
justify-content: center;
|
| 332 |
+
gap: 1rem;
|
| 333 |
+
color: #6b7280;
|
| 334 |
+
font-size: 0.9rem;
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
.sunrise-sunset {
|
| 338 |
+
margin-top: 1rem;
|
| 339 |
+
padding-top: 1rem;
|
| 340 |
+
border-top: 1px solid #e5e7eb;
|
| 341 |
+
font-size: 0.9rem;
|
| 342 |
+
color: #6b7280;
|
| 343 |
+
}
|
| 344 |
+
|
| 345 |
+
/* Footer */
|
| 346 |
+
.footer-note {
|
| 347 |
+
margin-top: 2rem;
|
| 348 |
+
color: #777;
|
| 349 |
+
font-size: 0.8rem;
|
| 350 |
+
text-align: center;
|
| 351 |
+
}
|
| 352 |
+
|
| 353 |
+
/* --- Responsive Design --- */
|
| 354 |
+
|
| 355 |
+
/* Medium screens (e.g., small laptops, large tablets) */
|
| 356 |
+
@media (max-width: 1024px) {
|
| 357 |
+
.sidebar {
|
| 358 |
+
width: 260px;
|
| 359 |
+
padding: 1.5rem;
|
| 360 |
+
}
|
| 361 |
+
.main-content {
|
| 362 |
+
margin-left: 260px;
|
| 363 |
+
padding: 1.5rem;
|
| 364 |
+
}
|
| 365 |
+
.header-location {
|
| 366 |
+
font-size: 1.3rem;
|
| 367 |
+
}
|
| 368 |
+
.current-temp {
|
| 369 |
+
font-size: 3rem;
|
| 370 |
+
}
|
| 371 |
+
.weather-icon {
|
| 372 |
+
font-size: 2.5rem;
|
| 373 |
+
}
|
| 374 |
+
.highlight-value {
|
| 375 |
+
font-size: 1.5rem;
|
| 376 |
+
}
|
| 377 |
+
.section-title {
|
| 378 |
+
font-size: 1.3rem;
|
| 379 |
+
}
|
| 380 |
+
.forecast-temp {
|
| 381 |
+
font-size: 1.3rem;
|
| 382 |
+
}
|
| 383 |
+
}
|
| 384 |
+
|
| 385 |
+
/* Small screens (e.g., tablets in portrait, large phones) */
|
| 386 |
+
@media (max-width: 768px) {
|
| 387 |
+
.container {
|
| 388 |
+
flex-direction: column; /* Stack sidebar and main content vertically */
|
| 389 |
+
}
|
| 390 |
+
.sidebar {
|
| 391 |
+
width: 100%; /* Full width */
|
| 392 |
+
height: auto; /* Auto height */
|
| 393 |
+
position: relative; /* No longer fixed */
|
| 394 |
+
padding: 1.5rem 1rem; /* Adjust padding */
|
| 395 |
+
box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Add bottom shadow */
|
| 396 |
+
border-bottom-left-radius: 0;
|
| 397 |
+
border-bottom-right-radius: 0;
|
| 398 |
+
}
|
| 399 |
+
.main-content {
|
| 400 |
+
margin-left: 0; /* Remove sidebar offset */
|
| 401 |
+
padding: 1.5rem 1rem; /* Adjust padding */
|
| 402 |
+
}
|
| 403 |
+
.sidebar-header {
|
| 404 |
+
margin-bottom: 1.5rem;
|
| 405 |
+
justify-content: center; /* Center header on mobile */
|
| 406 |
+
}
|
| 407 |
+
.input-group {
|
| 408 |
+
margin-bottom: 1rem;
|
| 409 |
+
}
|
| 410 |
+
.search-button {
|
| 411 |
+
margin-top: 1rem; /* Add some spacing */
|
| 412 |
+
}
|
| 413 |
+
.header-card {
|
| 414 |
+
flex-direction: column; /* Stack items in header card */
|
| 415 |
+
align-items: flex-start; /* Align left */
|
| 416 |
+
padding: 1.5rem;
|
| 417 |
+
}
|
| 418 |
+
.header-location, .timestamp {
|
| 419 |
+
margin-bottom: 0.75rem; /* Adjust spacing */
|
| 420 |
+
width: 100%; /* Full width for better stacking */
|
| 421 |
+
}
|
| 422 |
+
.header-location {
|
| 423 |
+
font-size: 1.2rem;
|
| 424 |
+
}
|
| 425 |
+
.current-temp {
|
| 426 |
+
font-size: 2.5rem;
|
| 427 |
+
gap: 0.75rem;
|
| 428 |
+
margin-top: 1rem;
|
| 429 |
+
flex-wrap: wrap; /* Allow temp and icon to wrap if needed */
|
| 430 |
+
}
|
| 431 |
+
.weather-icon {
|
| 432 |
+
font-size: 2.2rem;
|
| 433 |
+
}
|
| 434 |
+
.header-card .flex.items-center.gap-4 { /* Target the div containing current temp and description */
|
| 435 |
+
flex-direction: column; /* Stack current temp and description */
|
| 436 |
+
align-items: flex-start;
|
| 437 |
+
width: 100%;
|
| 438 |
+
margin-top: 1rem;
|
| 439 |
+
}
|
| 440 |
+
.header-card .text-right { /* Adjust description alignment */
|
| 441 |
+
text-align: left;
|
| 442 |
+
width: 100%;
|
| 443 |
+
margin-top: 0.5rem;
|
| 444 |
+
}
|
| 445 |
+
.weather-details {
|
| 446 |
+
flex-direction: column;
|
| 447 |
+
gap: 0.75rem;
|
| 448 |
+
margin-top: 0.75rem;
|
| 449 |
+
}
|
| 450 |
+
.highlights {
|
| 451 |
+
grid-template-columns: 1fr; /* Single column for highlights on smaller screens */
|
| 452 |
+
gap: 1rem;
|
| 453 |
+
}
|
| 454 |
+
.forecast-grid {
|
| 455 |
+
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Adjust minwidth for forecast */
|
| 456 |
+
gap: 1rem;
|
| 457 |
+
}
|
| 458 |
+
.highlight-icon {
|
| 459 |
+
font-size: 1.75rem;
|
| 460 |
+
margin-bottom: 0.75rem;
|
| 461 |
+
}
|
| 462 |
+
.highlight-value {
|
| 463 |
+
font-size: 1.4rem;
|
| 464 |
+
}
|
| 465 |
+
.section-title {
|
| 466 |
+
font-size: 1.2rem;
|
| 467 |
+
margin-bottom: 1rem;
|
| 468 |
+
}
|
| 469 |
+
.forecast-card {
|
| 470 |
+
padding: 1rem;
|
| 471 |
+
}
|
| 472 |
+
.forecast-icon {
|
| 473 |
+
font-size: 2rem;
|
| 474 |
+
}
|
| 475 |
+
.forecast-day {
|
| 476 |
+
font-size: 1rem;
|
| 477 |
+
}
|
| 478 |
+
.forecast-temp {
|
| 479 |
+
font-size: 1.2rem;
|
| 480 |
+
}
|
| 481 |
+
.footer-note {
|
| 482 |
+
margin-top: 1.5rem;
|
| 483 |
+
}
|
| 484 |
+
}
|
| 485 |
+
|
| 486 |
+
/* Extra small screens (e.g., mobile phones) */
|
| 487 |
+
@media (max-width: 480px) {
|
| 488 |
+
.sidebar {
|
| 489 |
+
padding: 1rem;
|
| 490 |
+
}
|
| 491 |
+
.main-content {
|
| 492 |
+
padding: 1rem;
|
| 493 |
+
}
|
| 494 |
+
.sidebar-header {
|
| 495 |
+
margin-bottom: 1rem;
|
| 496 |
+
}
|
| 497 |
+
.sidebar-header h1 {
|
| 498 |
+
font-size: 1.2rem;
|
| 499 |
+
}
|
| 500 |
+
.header-location {
|
| 501 |
+
font-size: 1rem;
|
| 502 |
+
}
|
| 503 |
+
.timestamp {
|
| 504 |
+
font-size: 0.8rem;
|
| 505 |
+
padding: 0.4rem 0.8rem;
|
| 506 |
+
}
|
| 507 |
+
.current-temp {
|
| 508 |
+
font-size: 2rem;
|
| 509 |
+
}
|
| 510 |
+
.weather-icon {
|
| 511 |
+
font-size: 1.8rem;
|
| 512 |
+
}
|
| 513 |
+
.header-card .text-right .text-lg { /* Current description text */
|
| 514 |
+
font-size: 1rem;
|
| 515 |
+
}
|
| 516 |
+
.weather-detail {
|
| 517 |
+
font-size: 0.9rem;
|
| 518 |
+
}
|
| 519 |
+
.highlight-card {
|
| 520 |
+
padding: 1.2rem;
|
| 521 |
+
}
|
| 522 |
+
.highlight-icon {
|
| 523 |
+
font-size: 1.5rem;
|
| 524 |
+
}
|
| 525 |
+
.highlight-title {
|
| 526 |
+
font-size: 0.9rem;
|
| 527 |
+
}
|
| 528 |
+
.highlight-value {
|
| 529 |
+
font-size: 1.2rem;
|
| 530 |
+
}
|
| 531 |
+
.section-title {
|
| 532 |
+
font-size: 1.1rem;
|
| 533 |
+
}
|
| 534 |
+
.forecast-grid {
|
| 535 |
+
grid-template-columns: 1fr; /* Single column for forecast on very small screens */
|
| 536 |
+
}
|
| 537 |
+
.forecast-icon {
|
| 538 |
+
font-size: 1.8rem;
|
| 539 |
+
}
|
| 540 |
+
.forecast-temp {
|
| 541 |
+
font-size: 1.1rem;
|
| 542 |
+
}
|
| 543 |
+
.temp-range, .sunrise-sunset {
|
| 544 |
+
font-size: 0.85rem;
|
| 545 |
+
}
|
| 546 |
+
.footer-note {
|
| 547 |
+
font-size: 0.75rem;
|
| 548 |
+
margin-top: 1rem;
|
| 549 |
+
}
|
| 550 |
+
}
|
| 551 |
+
|
| 552 |
+
/* Loading Animation */
|
| 553 |
+
.loading {
|
| 554 |
+
animation: pulse 1.5s infinite;
|
| 555 |
+
}
|
| 556 |
+
|
| 557 |
+
/* Custom Scrollbar for sidebar */
|
| 558 |
+
.sidebar::-webkit-scrollbar {
|
| 559 |
+
width: 8px;
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
.sidebar::-webkit-scrollbar-track {
|
| 563 |
+
background: rgba(255,255,255,0.1);
|
| 564 |
+
border-radius: 4px;
|
| 565 |
+
}
|
| 566 |
+
|
| 567 |
+
.sidebar::-webkit-scrollbar-thumb {
|
| 568 |
+
background: rgba(255,255,255,0.3);
|
| 569 |
+
border-radius: 4px;
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
.sidebar::-webkit-scrollbar-thumb:hover {
|
| 573 |
+
background: rgba(255,255,255,0.4);
|
| 574 |
+
}
|
| 575 |
+
</style>
|
| 576 |
+
</head>
|
| 577 |
+
<body>
|
| 578 |
+
<div class="container">
|
| 579 |
+
<!-- Sidebar -->
|
| 580 |
+
<aside class="sidebar">
|
| 581 |
+
<div class="sidebar-header">
|
| 582 |
+
<i class="fas fa-cloud-sun"></i>
|
| 583 |
+
<h1 class="text-xl font-bold">Weather Dashboard</h1>
|
| 584 |
+
</div>
|
| 585 |
+
<form method="POST" action="/">
|
| 586 |
+
<div class="input-group">
|
| 587 |
+
<label for="lat">Latitude</label>
|
| 588 |
+
<input type="number" step="any" id="lat" name="lat" class="input-field" value="{{ lat }}" placeholder="Enter latitude..." />
|
| 589 |
+
</div>
|
| 590 |
+
<div class="input-group">
|
| 591 |
+
<label for="lon">Longitude</label>
|
| 592 |
+
<input type="number" step="any" id="lon" name="lon" class="input-field" value="{{ lon }}" placeholder="Enter longitude..." />
|
| 593 |
+
</div>
|
| 594 |
+
<button type="submit" class="search-button">
|
| 595 |
+
<i class="fas fa-search"></i>
|
| 596 |
+
Get Weather
|
| 597 |
+
</button>
|
| 598 |
+
</form>
|
| 599 |
+
</aside>
|
| 600 |
+
|
| 601 |
+
<!-- Main Content -->
|
| 602 |
+
<main class="main-content">
|
| 603 |
+
<!-- Header: Current Weather & Location -->
|
| 604 |
+
<section class="header-card">
|
| 605 |
+
<div>
|
| 606 |
+
<div class="header-location">
|
| 607 |
+
<i class="fas fa-map-marker-alt"></i>
|
| 608 |
+
{{ location_address }}
|
| 609 |
+
</div>
|
| 610 |
+
<div class="timestamp">
|
| 611 |
+
<i class="far fa-clock"></i>
|
| 612 |
+
{{ current_time }}
|
| 613 |
+
<span class="text-sm opacity-75">{{ timezone }}</span>
|
| 614 |
+
</div>
|
| 615 |
+
</div>
|
| 616 |
+
<div class="flex items-center gap-4">
|
| 617 |
+
<div class="current-temp">
|
| 618 |
+
{{ current_temp }}°C
|
| 619 |
+
{% if current_icon == "☀️" %}
|
| 620 |
+
<i class="fas fa-sun weather-icon"></i>
|
| 621 |
+
{% elif current_icon == "⛅" %}
|
| 622 |
+
<i class="fas fa-cloud-sun weather-icon"></i>
|
| 623 |
+
{% elif current_icon == "🌫️" %}
|
| 624 |
+
<i class="fas fa-smog weather-icon"></i>
|
| 625 |
+
{% elif current_icon == "🌦️" %}
|
| 626 |
+
<i class="fas fa-cloud-showers-heavy weather-icon"></i>
|
| 627 |
+
{% elif current_icon == "🌧️" %}
|
| 628 |
+
<i class="fas fa-cloud-rain weather-icon"></i>
|
| 629 |
+
{% elif current_icon == "❄️" %}
|
| 630 |
+
<i class="fas fa-snowflake weather-icon"></i>
|
| 631 |
+
{% elif current_icon == "⛈️" %}
|
| 632 |
+
<i class="fas fa-bolt weather-icon"></i>
|
| 633 |
+
{% else %}
|
| 634 |
+
<i class="fas fa-question weather-icon"></i>
|
| 635 |
+
{% endif %}
|
| 636 |
+
</div>
|
| 637 |
+
<div class="text-right">
|
| 638 |
+
<div class="text-lg font-medium text-green-700">{{ current_desc }}</div>
|
| 639 |
+
<div class="weather-details">
|
| 640 |
+
<div class="weather-detail">
|
| 641 |
+
<i class="fas fa-temperature-low"></i>
|
| 642 |
+
Feels like: {{ feels_like }}°C
|
| 643 |
+
</div>
|
| 644 |
+
<div class="weather-detail">
|
| 645 |
+
<i class="fas fa-wind"></i>
|
| 646 |
+
{{ current_wind_speed }} km/h
|
| 647 |
+
</div>
|
| 648 |
+
</div>
|
| 649 |
+
</div>
|
| 650 |
+
</div>
|
| 651 |
+
</section>
|
| 652 |
+
|
| 653 |
+
<!-- Alert Notification (if alerts were sent) -->
|
| 654 |
+
{% if alerts_sent %}
|
| 655 |
+
<div class="alert-notification bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700 p-4 mb-4" role="alert">
|
| 656 |
+
<p class="font-bold"><i class="fas fa-exclamation-triangle"></i> Weather Alert Sent</p>
|
| 657 |
+
<p>Alerts for upcoming hazardous weather conditions Near Your Farm have been sent to your WhatsApp.</p>
|
| 658 |
+
</div>
|
| 659 |
+
{% endif %}
|
| 660 |
+
|
| 661 |
+
<!-- Today's Highlights -->
|
| 662 |
+
<section>
|
| 663 |
+
<h2 class="section-title">
|
| 664 |
+
<i class="fas fa-chart-line"></i>
|
| 665 |
+
Today's Highlights
|
| 666 |
+
</h2>
|
| 667 |
+
<div class="highlights">
|
| 668 |
+
<!-- Humidity -->
|
| 669 |
+
<div class="highlight-card">
|
| 670 |
+
<i class="fas fa-tint highlight-icon"></i>
|
| 671 |
+
<div class="highlight-title">Humidity</div>
|
| 672 |
+
<div class="highlight-value">{{ today_highlights.humidity }}%</div>
|
| 673 |
+
</div>
|
| 674 |
+
<!-- Wind Speed -->
|
| 675 |
+
<div class="highlight-card">
|
| 676 |
+
<i class="fas fa-wind highlight-icon"></i>
|
| 677 |
+
<div class="highlight-title">Wind Speed</div>
|
| 678 |
+
<div class="highlight-value">{{ today_highlights.windspeed }} km/h</div>
|
| 679 |
+
</div>
|
| 680 |
+
<!-- UV Index -->
|
| 681 |
+
<div class="highlight-card">
|
| 682 |
+
<i class="fas fa-sun highlight-icon"></i>
|
| 683 |
+
<div class="highlight-title">UV Index</div>
|
| 684 |
+
<div class="highlight-value">{{ today_highlights.uv_index }}</div>
|
| 685 |
+
</div>
|
| 686 |
+
<!-- Pressure -->
|
| 687 |
+
<div class="highlight-card">
|
| 688 |
+
<i class="fas fa-compress-alt highlight-icon"></i>
|
| 689 |
+
<div class="highlight-title">Pressure</div>
|
| 690 |
+
<div class="highlight-value">{{ today_highlights.pressure|round(1) }} hPa</div>
|
| 691 |
+
</div>
|
| 692 |
+
<!-- Cloud Cover -->
|
| 693 |
+
<div class="highlight-card">
|
| 694 |
+
<i class="fas fa-cloud highlight-icon"></i>
|
| 695 |
+
<div class="highlight-title">Cloud Cover</div>
|
| 696 |
+
<div class="highlight-value">{{ today_highlights.clouds }}%</div>
|
| 697 |
+
</div>
|
| 698 |
+
<!-- Precipitation -->
|
| 699 |
+
<div class="highlight-card">
|
| 700 |
+
<i class="fas fa-cloud-rain highlight-icon"></i>
|
| 701 |
+
<div class="highlight-title">Precipitation</div>
|
| 702 |
+
<div class="highlight-value">{{ today_highlights.precipitation|round(2) }} mm</div>
|
| 703 |
+
</div>
|
| 704 |
+
<!-- Soil Moisture -->
|
| 705 |
+
<div class="highlight-card">
|
| 706 |
+
<i class="fas fa-water highlight-icon"></i>
|
| 707 |
+
<div class="highlight-title">Soil Moisture</div>
|
| 708 |
+
<div class="highlight-value">{{ today_highlights.soil_moisture|round(3) }} m³/m³</div>
|
| 709 |
+
</div>
|
| 710 |
+
<!-- Sun Timing -->
|
| 711 |
+
<div class="highlight-card">
|
| 712 |
+
<div class="flex justify-between items-center">
|
| 713 |
+
<div class="text-center flex-1">
|
| 714 |
+
<i class="fas fa-sunrise highlight-icon"></i>
|
| 715 |
+
<div class="highlight-title">Sunrise</div>
|
| 716 |
+
<div class="highlight-value text-lg">{{ today_highlights.sunrise }}</div>
|
| 717 |
+
</div>
|
| 718 |
+
<div class="border-r border-gray-200 h-16 mx-4"></div>
|
| 719 |
+
<div class="text-center flex-1">
|
| 720 |
+
<i class="fas fa-sunset highlight-icon"></i>
|
| 721 |
+
<div class="highlight-title">Sunset</div>
|
| 722 |
+
<div class="highlight-value text-lg">{{ today_highlights.sunset }}</div>
|
| 723 |
+
</div>
|
| 724 |
+
</div>
|
| 725 |
+
</div>
|
| 726 |
+
</div>
|
| 727 |
+
</section>
|
| 728 |
+
|
| 729 |
+
<!-- 14-Day Forecast -->
|
| 730 |
+
<section class="forecast-section">
|
| 731 |
+
<h2 class="section-title">
|
| 732 |
+
<i class="fas fa-calendar-alt"></i>
|
| 733 |
+
14-Day Forecast
|
| 734 |
+
</h2>
|
| 735 |
+
<div class="forecast-grid">
|
| 736 |
+
{% for day in forecast_list %}
|
| 737 |
+
<div class="forecast-card">
|
| 738 |
+
<div class="forecast-day">{{ day.day_name }}</div>
|
| 739 |
+
<div class="forecast-date">{{ day.date_str }}</div>
|
| 740 |
+
<!-- Conditional Forecast Icon -->
|
| 741 |
+
{% if day.icon == "☀️" %}
|
| 742 |
+
<i class="fas fa-sun forecast-icon"></i>
|
| 743 |
+
{% elif day.icon == "⛅" %}
|
| 744 |
+
<i class="fas fa-cloud-sun forecast-icon"></i>
|
| 745 |
+
{% elif day.icon == "🌫️" %}
|
| 746 |
+
<i class="fas fa-smog forecast-icon"></i>
|
| 747 |
+
{% elif day.icon == "🌦️" %}
|
| 748 |
+
<i class="fas fa-cloud-showers-heavy forecast-icon"></i>
|
| 749 |
+
{% elif day.icon == "🌧️" %}
|
| 750 |
+
<i class="fas fa-cloud-rain forecast-icon"></i>
|
| 751 |
+
{% elif day.icon == "❄️" %}
|
| 752 |
+
<i class="fas fa-snowflake forecast-icon"></i>
|
| 753 |
+
{% elif day.icon == "⛈️" %}
|
| 754 |
+
<i class="fas fa-bolt forecast-icon"></i>
|
| 755 |
+
{% else %}
|
| 756 |
+
<i class="fas fa-question forecast-icon"></i>
|
| 757 |
+
{% endif %}
|
| 758 |
+
<div class="text-sm text-green-700 font-medium">{{ day.desc }}</div>
|
| 759 |
+
<div class="forecast-temp">{{ day.avg_temp }}°C</div>
|
| 760 |
+
<div class="temp-range">
|
| 761 |
+
<span><i class="fas fa-arrow-down text-blue-500"></i> {{ day.tmin }}°C</span>
|
| 762 |
+
<span><i class="fas fa-arrow-up text-red-500"></i> {{ day.tmax }}°C</span>
|
| 763 |
+
</div>
|
| 764 |
+
<div class="mt-3">
|
| 765 |
+
<div class="text-sm font-medium mb-1">Day Temperatures</div>
|
| 766 |
+
<div class="text-sm">Morning: {{ day.morning_temp }}°C</div>
|
| 767 |
+
<div class="text-sm">Evening: {{ day.evening_temp }}°C</div>
|
| 768 |
+
</div>
|
| 769 |
+
<div class="sunrise-sunset">
|
| 770 |
+
<div class="flex items-center justify-center gap-1 mb-1">
|
| 771 |
+
<i class="fas fa-sun text-yellow-500"></i>
|
| 772 |
+
{{ day.sunrise }}
|
| 773 |
+
</div>
|
| 774 |
+
<div class="flex items-center justify-center gap-1">
|
| 775 |
+
<i class="fas fa-moon text-gray-600"></i>
|
| 776 |
+
{{ day.sunset }}
|
| 777 |
+
</div>
|
| 778 |
+
</div>
|
| 779 |
+
</div>
|
| 780 |
+
{% endfor %}
|
| 781 |
+
</div>
|
| 782 |
+
</section>
|
| 783 |
+
|
| 784 |
+
<!-- Footer -->
|
| 785 |
+
<footer class="footer-note">
|
| 786 |
+
<p>Last updated: {{ current_time }}</p>
|
| 787 |
+
</footer>
|
| 788 |
+
</main>
|
| 789 |
+
</div>
|
| 790 |
+
|
| 791 |
+
<!-- Scripts -->
|
| 792 |
+
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
| 793 |
+
<script>
|
| 794 |
+
// Initialize interactive behaviors
|
| 795 |
+
$(document).ready(function() {
|
| 796 |
+
// Add loading animation on form submission
|
| 797 |
+
$('form').on('submit', function() {
|
| 798 |
+
$('.main-content').addClass('loading');
|
| 799 |
+
});
|
| 800 |
+
|
| 801 |
+
// Animate cards on scroll using IntersectionObserver
|
| 802 |
+
const observerOptions = {
|
| 803 |
+
threshold: 0.1,
|
| 804 |
+
rootMargin: '0px 0px -50px 0px'
|
| 805 |
+
};
|
| 806 |
+
const observer = new IntersectionObserver((entries) => {
|
| 807 |
+
entries.forEach(entry => {
|
| 808 |
+
if (entry.isIntersecting) {
|
| 809 |
+
entry.target.style.opacity = '1';
|
| 810 |
+
entry.target.style.transform = 'translateY(0)';
|
| 811 |
+
}
|
| 812 |
+
});
|
| 813 |
+
}, observerOptions);
|
| 814 |
+
document.querySelectorAll('.highlight-card, .forecast-card').forEach(card => {
|
| 815 |
+
card.style.opacity = '0';
|
| 816 |
+
card.style.transform = 'translateY(20px)';
|
| 817 |
+
observer.observe(card);
|
| 818 |
+
});
|
| 819 |
+
|
| 820 |
+
// Real-time input validation for latitude and longitude
|
| 821 |
+
const validateInput = (input) => {
|
| 822 |
+
const value = parseFloat(input.value);
|
| 823 |
+
if (input.id === 'lat') {
|
| 824 |
+
if (value < -90 || value > 90) {
|
| 825 |
+
input.setCustomValidity('Latitude must be between -90 and 90 degrees');
|
| 826 |
+
} else {
|
| 827 |
+
input.setCustomValidity('');
|
| 828 |
+
}
|
| 829 |
+
} else if (input.id === 'lon') {
|
| 830 |
+
if (value < -180 || value > 180) {
|
| 831 |
+
input.setCustomValidity('Longitude must be between -180 and 180 degrees');
|
| 832 |
+
} else {
|
| 833 |
+
input.setCustomValidity('');
|
| 834 |
+
}
|
| 835 |
+
}
|
| 836 |
+
};
|
| 837 |
+
document.querySelectorAll('.input-field').forEach(input => {
|
| 838 |
+
input.addEventListener('input', () => validateInput(input));
|
| 839 |
+
});
|
| 840 |
+
});
|
| 841 |
+
</script>
|
| 842 |
+
</body>
|
| 843 |
+
</html>
|