Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- index.html +743 -893
index.html
CHANGED
|
@@ -1,907 +1,757 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
-
|
| 4 |
<head>
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 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 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 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 |
-
|
| 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 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 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 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 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 |
-
.msg-input {
|
| 436 |
-
flex: 1;
|
| 437 |
-
background: transparent;
|
| 438 |
-
border: none;
|
| 439 |
-
outline: none;
|
| 440 |
-
font-family: inherit;
|
| 441 |
-
font-size: 0.95rem;
|
| 442 |
-
color: var(--text-main);
|
| 443 |
-
resize: none;
|
| 444 |
-
max-height: 100px;
|
| 445 |
-
overflow-y: auto;
|
| 446 |
-
padding: 0;
|
| 447 |
-
margin: 0;
|
| 448 |
-
line-height: 1.5;
|
| 449 |
-
}
|
| 450 |
-
|
| 451 |
-
.send-btn {
|
| 452 |
-
width: 44px;
|
| 453 |
-
height: 44px;
|
| 454 |
-
border-radius: 50%;
|
| 455 |
-
background: var(--accent-gradient);
|
| 456 |
-
border: none;
|
| 457 |
-
color: white;
|
| 458 |
-
display: flex;
|
| 459 |
-
align-items: center;
|
| 460 |
-
justify-content: center;
|
| 461 |
-
cursor: pointer;
|
| 462 |
-
box-shadow: var(--accent-glow);
|
| 463 |
-
transition: transform 0.2s, box-shadow 0.2s;
|
| 464 |
-
flex-shrink: 0;
|
| 465 |
-
}
|
| 466 |
-
|
| 467 |
-
.send-btn:hover {
|
| 468 |
-
transform: scale(1.05);
|
| 469 |
-
box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
|
| 470 |
-
}
|
| 471 |
-
|
| 472 |
-
.send-btn:active {
|
| 473 |
-
transform: scale(0.95);
|
| 474 |
-
}
|
| 475 |
-
|
| 476 |
-
/* --- 3. Members Sidebar (Right) --- */
|
| 477 |
-
.members-sidebar {
|
| 478 |
-
width: var(--members-width);
|
| 479 |
-
background: rgba(255, 255, 255, 0.2);
|
| 480 |
-
border-left: 1px solid var(--glass-border);
|
| 481 |
-
padding: 24px;
|
| 482 |
-
overflow-y: auto;
|
| 483 |
-
flex-shrink: 0;
|
| 484 |
-
display: flex;
|
| 485 |
-
flex-direction: column;
|
| 486 |
-
}
|
| 487 |
-
|
| 488 |
-
.member-card {
|
| 489 |
-
display: flex;
|
| 490 |
-
align-items: center;
|
| 491 |
-
padding: 10px;
|
| 492 |
-
border-radius: 12px;
|
| 493 |
-
margin-bottom: 8px;
|
| 494 |
-
cursor: pointer;
|
| 495 |
-
transition: background 0.2s;
|
| 496 |
-
}
|
| 497 |
-
|
| 498 |
-
.member-card:hover {
|
| 499 |
-
background: rgba(255, 255, 255, 0.4);
|
| 500 |
-
}
|
| 501 |
-
|
| 502 |
-
.member-avatar {
|
| 503 |
-
width: 32px;
|
| 504 |
-
height: 32px;
|
| 505 |
-
border-radius: 50%;
|
| 506 |
-
background-size: cover;
|
| 507 |
-
margin-right: 12px;
|
| 508 |
-
position: relative;
|
| 509 |
-
}
|
| 510 |
-
|
| 511 |
-
.online-indicator {
|
| 512 |
-
position: absolute;
|
| 513 |
-
bottom: 0;
|
| 514 |
-
right: 0;
|
| 515 |
-
width: 8px;
|
| 516 |
-
height: 8px;
|
| 517 |
-
background: #00b894;
|
| 518 |
-
border-radius: 50%;
|
| 519 |
-
border: 2px solid rgba(255, 255, 255, 0.5);
|
| 520 |
-
}
|
| 521 |
-
|
| 522 |
-
.member-name {
|
| 523 |
-
font-size: 0.9rem;
|
| 524 |
-
font-weight: 500;
|
| 525 |
-
color: var(--text-main);
|
| 526 |
-
}
|
| 527 |
-
|
| 528 |
-
/* Mandatory Link */
|
| 529 |
-
.anycoder-link {
|
| 530 |
-
font-size: 0.8rem;
|
| 531 |
-
color: var(--text-secondary);
|
| 532 |
-
text-decoration: none;
|
| 533 |
-
margin-left: 8px;
|
| 534 |
-
opacity: 0.7;
|
| 535 |
-
transition: opacity 0.2s;
|
| 536 |
-
}
|
| 537 |
-
|
| 538 |
-
.anycoder-link:hover {
|
| 539 |
-
opacity: 1;
|
| 540 |
-
color: var(--accent-color);
|
| 541 |
-
}
|
| 542 |
-
|
| 543 |
-
/* --- Responsive Design --- */
|
| 544 |
-
.mobile-menu-btn {
|
| 545 |
-
display: none;
|
| 546 |
-
background: none;
|
| 547 |
-
border: none;
|
| 548 |
-
font-size: 1.5rem;
|
| 549 |
-
color: var(--text-main);
|
| 550 |
-
cursor: pointer;
|
| 551 |
-
}
|
| 552 |
-
|
| 553 |
-
@media (max-width: 1024px) {
|
| 554 |
-
.members-sidebar {
|
| 555 |
-
display: none;
|
| 556 |
-
}
|
| 557 |
-
}
|
| 558 |
-
|
| 559 |
-
@media (max-width: 768px) {
|
| 560 |
-
.app-container {
|
| 561 |
-
width: 100vw;
|
| 562 |
-
height: 100vh;
|
| 563 |
-
border-radius: 0;
|
| 564 |
-
border: none;
|
| 565 |
-
}
|
| 566 |
-
|
| 567 |
-
.mobile-menu-btn {
|
| 568 |
-
display: block;
|
| 569 |
-
}
|
| 570 |
-
|
| 571 |
-
.sidebar {
|
| 572 |
-
position: absolute;
|
| 573 |
-
left: 0;
|
| 574 |
-
top: 0;
|
| 575 |
-
height: 100%;
|
| 576 |
-
z-index: 100;
|
| 577 |
-
transform: translateX(-100%);
|
| 578 |
-
background: rgba(255, 255, 255, 0.95);
|
| 579 |
-
backdrop-filter: blur(20px);
|
| 580 |
-
}
|
| 581 |
-
|
| 582 |
-
.sidebar.open {
|
| 583 |
-
transform: translateX(0);
|
| 584 |
-
box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
|
| 585 |
-
}
|
| 586 |
-
|
| 587 |
-
.overlay {
|
| 588 |
-
position: absolute;
|
| 589 |
-
top: 0;
|
| 590 |
-
left: 0;
|
| 591 |
-
width: 100%;
|
| 592 |
-
height: 100%;
|
| 593 |
-
background: rgba(0, 0, 0, 0.2);
|
| 594 |
-
z-index: 90;
|
| 595 |
-
opacity: 0;
|
| 596 |
-
pointer-events: none;
|
| 597 |
-
transition: opacity 0.3s;
|
| 598 |
-
}
|
| 599 |
-
|
| 600 |
-
.overlay.open {
|
| 601 |
-
opacity: 1;
|
| 602 |
-
pointer-events: auto;
|
| 603 |
-
}
|
| 604 |
-
|
| 605 |
-
.chat-header {
|
| 606 |
-
padding: 0 16px;
|
| 607 |
-
}
|
| 608 |
-
|
| 609 |
-
.input-area {
|
| 610 |
-
padding: 16px;
|
| 611 |
-
}
|
| 612 |
-
}
|
| 613 |
-
</style>
|
| 614 |
-
</head>
|
| 615 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 616 |
<body>
|
| 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 |
-
<i class="ri-hashtag"></i> show-and-tell
|
| 644 |
-
</div>
|
| 645 |
-
|
| 646 |
-
<div class="nav-section-title" style="margin-top: 24px;">Direct Messages</div>
|
| 647 |
-
<div class="nav-item">
|
| 648 |
-
<i class="ri-user-smile-line"></i> Sarah Connor
|
| 649 |
-
</div>
|
| 650 |
-
<div class="nav-item">
|
| 651 |
-
<i class="ri-robot-line"></i> DesignBot
|
| 652 |
-
</div>
|
| 653 |
-
|
| 654 |
-
<div class="user-mini-profile">
|
| 655 |
-
<div class="mini-avatar"></div>
|
| 656 |
-
<div class="mini-info">
|
| 657 |
-
<h4>My User</h4>
|
| 658 |
-
<span>#9821</span>
|
| 659 |
-
</div>
|
| 660 |
-
<i class="ri-settings-3-line" style="margin-left: auto; cursor: pointer; color: var(--text-secondary);"></i>
|
| 661 |
-
</div>
|
| 662 |
-
</aside>
|
| 663 |
-
|
| 664 |
-
<!-- 2. Main Chat Area -->
|
| 665 |
-
<main class="chat-area">
|
| 666 |
-
<header class="chat-header">
|
| 667 |
-
<div class="chat-title">
|
| 668 |
-
<button class="mobile-menu-btn" id="menuBtn">
|
| 669 |
-
<i class="ri-menu-line"></i>
|
| 670 |
-
</button>
|
| 671 |
-
<i class="ri-hashtag" style="color: var(--text-secondary); font-size: 1.2rem;"></i>
|
| 672 |
-
<h2>general</h2>
|
| 673 |
-
<div class="chat-status">
|
| 674 |
-
<div class="status-dot"></div>
|
| 675 |
-
<span>12 Online</span>
|
| 676 |
-
</div>
|
| 677 |
-
</div>
|
| 678 |
-
|
| 679 |
-
<div class="header-actions">
|
| 680 |
-
<button class="icon-btn"><i class="ri-phone-line"></i></button>
|
| 681 |
-
<button class="icon-btn"><i class="ri-vidicon-line"></i></button>
|
| 682 |
-
<button class="icon-btn"><i class="ri-information-line"></i></button>
|
| 683 |
-
<span style="font-size: 0.8rem; color: var(--text-light); align-self: center; margin-left: 8px;">
|
| 684 |
-
Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">anycoder</a>
|
| 685 |
-
</span>
|
| 686 |
-
</div>
|
| 687 |
-
</header>
|
| 688 |
-
|
| 689 |
-
<div class="messages-container" id="messagesContainer">
|
| 690 |
-
<!-- Date Separator -->
|
| 691 |
-
<div
|
| 692 |
-
style="text-align: center; font-size: 0.75rem; color: var(--text-secondary); margin: 10px 0; position: relative;">
|
| 693 |
-
<span style="background: rgba(255,255,255,0.4); padding: 4px 12px; border-radius: 10px; backdrop-filter: blur(4px);">Today</span>
|
| 694 |
-
</div>
|
| 695 |
-
|
| 696 |
-
<!-- Message 1 -->
|
| 697 |
-
<div class="message incoming">
|
| 698 |
-
<div class="msg-avatar" style="background-image: url('https://picsum.photos/seed/sarah/50/50');"></div>
|
| 699 |
-
<div>
|
| 700 |
-
<div class="msg-bubble">
|
| 701 |
-
Hey! Have you seen the new glassmorphism trend? It's absolutely beautiful. 😍
|
| 702 |
</div>
|
| 703 |
-
|
| 704 |
-
|
| 705 |
-
|
| 706 |
-
|
| 707 |
-
|
| 708 |
-
|
| 709 |
-
|
| 710 |
-
|
| 711 |
-
|
| 712 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 713 |
</div>
|
| 714 |
-
|
| 715 |
-
|
| 716 |
-
<
|
| 717 |
-
|
| 718 |
-
|
| 719 |
-
|
| 720 |
-
|
| 721 |
-
|
| 722 |
-
|
| 723 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 724 |
</div>
|
| 725 |
-
|
| 726 |
-
|
| 727 |
-
|
| 728 |
-
|
| 729 |
-
|
| 730 |
-
|
| 731 |
-
|
| 732 |
-
|
| 733 |
-
|
| 734 |
-
|
| 735 |
-
|
| 736 |
-
|
| 737 |
-
|
| 738 |
-
</
|
| 739 |
-
|
| 740 |
-
|
| 741 |
-
|
| 742 |
-
|
| 743 |
-
|
| 744 |
-
|
| 745 |
-
|
| 746 |
-
|
| 747 |
-
|
| 748 |
-
|
| 749 |
-
|
| 750 |
-
|
| 751 |
-
|
| 752 |
-
|
| 753 |
-
|
| 754 |
-
|
| 755 |
-
|
| 756 |
-
|
| 757 |
-
|
| 758 |
-
|
| 759 |
-
|
| 760 |
-
|
| 761 |
-
|
| 762 |
-
|
| 763 |
-
|
| 764 |
-
|
| 765 |
-
|
| 766 |
-
|
| 767 |
-
|
| 768 |
-
|
| 769 |
-
|
| 770 |
-
|
| 771 |
-
|
| 772 |
-
|
| 773 |
-
|
| 774 |
-
|
| 775 |
-
|
| 776 |
-
|
| 777 |
-
|
| 778 |
-
|
| 779 |
-
|
| 780 |
-
|
| 781 |
-
|
| 782 |
-
|
| 783 |
-
|
| 784 |
-
|
| 785 |
-
|
| 786 |
-
|
| 787 |
-
|
| 788 |
-
|
| 789 |
-
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
| 794 |
-
|
| 795 |
-
|
| 796 |
-
|
| 797 |
-
|
| 798 |
-
|
| 799 |
-
|
| 800 |
-
|
| 801 |
-
|
| 802 |
-
|
| 803 |
-
|
| 804 |
-
|
| 805 |
-
|
| 806 |
-
|
| 807 |
-
|
| 808 |
-
|
| 809 |
-
|
| 810 |
-
|
| 811 |
-
|
| 812 |
-
|
| 813 |
-
|
| 814 |
-
|
| 815 |
-
|
| 816 |
-
|
| 817 |
-
|
| 818 |
-
|
| 819 |
-
|
| 820 |
-
|
| 821 |
-
|
| 822 |
-
<div class="msg-meta">You • ${timeString}</div>
|
| 823 |
-
</div>
|
| 824 |
-
`;
|
| 825 |
-
|
| 826 |
-
messagesContainer.appendChild(msgDiv);
|
| 827 |
|
| 828 |
-
|
| 829 |
-
|
| 830 |
-
|
| 831 |
-
|
| 832 |
-
|
| 833 |
-
|
| 834 |
-
|
| 835 |
-
|
| 836 |
-
|
| 837 |
-
|
| 838 |
-
// Show "typing" state logic could go here
|
| 839 |
-
const replies = [
|
| 840 |
-
"That looks great! 👍",
|
| 841 |
-
"I love the transparency effect.",
|
| 842 |
-
"Can you share the CSS for that?",
|
| 843 |
-
"Glassmorphism is definitely the future of UI.",
|
| 844 |
-
"Nice! How did you handle the blur?"
|
| 845 |
-
];
|
| 846 |
|
| 847 |
-
|
| 848 |
-
|
| 849 |
-
|
| 850 |
-
|
| 851 |
-
|
| 852 |
-
|
| 853 |
-
replyDiv.classList.add('message', 'incoming');
|
| 854 |
-
replyDiv.innerHTML = `
|
| 855 |
-
<div class="msg-avatar" style="background-image: url('https://picsum.photos/seed/sarah/50/50');"></div>
|
| 856 |
-
<div>
|
| 857 |
-
<div class="msg-bubble">${randomReply}</div>
|
| 858 |
-
<div class="msg-meta">Sarah Connor • ${timeString}</div>
|
| 859 |
-
</div>
|
| 860 |
-
`;
|
| 861 |
-
messagesContainer.appendChild(replyDiv);
|
| 862 |
-
messagesContainer.scrollTo({ top: messagesContainer.scrollHeight, behavior: 'smooth' });
|
| 863 |
-
}, 1500 + Math.random() * 1000);
|
| 864 |
-
}
|
| 865 |
-
|
| 866 |
-
function escapeHtml(text) {
|
| 867 |
-
const map = {
|
| 868 |
-
'&': '&',
|
| 869 |
-
'<': '<',
|
| 870 |
-
'>': '>',
|
| 871 |
-
'"': '"',
|
| 872 |
-
"'": '''
|
| 873 |
-
};
|
| 874 |
-
return text.replace(/[&<>"']/g, function(m) { return map[m]; });
|
| 875 |
-
}
|
| 876 |
-
|
| 877 |
-
// Event Listeners
|
| 878 |
-
sendBtn.addEventListener('click', sendMessage);
|
| 879 |
-
|
| 880 |
-
messageInput.addEventListener('keypress', (e) => {
|
| 881 |
-
if (e.key === 'Enter' && !e.shiftKey) {
|
| 882 |
-
e.preventDefault();
|
| 883 |
-
sendMessage();
|
| 884 |
-
}
|
| 885 |
-
});
|
| 886 |
-
|
| 887 |
-
// Simple interaction for Nav items
|
| 888 |
-
const navItems = document.querySelectorAll('.nav-item');
|
| 889 |
-
navItems.forEach(item => {
|
| 890 |
-
item.addEventListener('click', () => {
|
| 891 |
-
// Only remove active from channel items, not profile
|
| 892 |
-
if(!item.querySelector('.mini-avatar')) {
|
| 893 |
-
navItems.forEach(i => i.classList.remove('active'));
|
| 894 |
-
item.classList.add('active');
|
| 895 |
-
|
| 896 |
-
// On mobile, close menu after selection
|
| 897 |
-
if(window.innerWidth <= 768) {
|
| 898 |
-
toggleMenu();
|
| 899 |
-
}
|
| 900 |
-
}
|
| 901 |
});
|
| 902 |
-
});
|
| 903 |
-
});
|
| 904 |
-
</script>
|
| 905 |
-
</body>
|
| 906 |
|
|
|
|
|
|
|
| 907 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
| 3 |
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| 6 |
+
<title>Glassmorphism Chat</title>
|
| 7 |
+
|
| 8 |
+
<!-- Fonts: Outfit for a modern, airy feel -->
|
| 9 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 10 |
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 11 |
+
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap" rel="stylesheet">
|
| 12 |
+
|
| 13 |
+
<!-- Icons: Phosphor Icons for minimal, clean lines -->
|
| 14 |
+
<script src="https://unpkg.com/@phosphor-icons/web"></script>
|
| 15 |
+
|
| 16 |
+
<style>
|
| 17 |
+
/* --- CSS Reset & Variables --- */
|
| 18 |
+
:root {
|
| 19 |
+
--bg-gradient-1: #ff9a9e;
|
| 20 |
+
--bg-gradient-2: #fad0c4;
|
| 21 |
+
--bg-gradient-3: #a18cd1;
|
| 22 |
+
--bg-gradient-4: #fbc2eb;
|
| 23 |
+
|
| 24 |
+
--glass-bg: rgba(255, 255, 255, 0.25);
|
| 25 |
+
--glass-border: rgba(255, 255, 255, 0.5);
|
| 26 |
+
--glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
|
| 27 |
+
--glass-blur: blur(20px);
|
| 28 |
+
|
| 29 |
+
--text-primary: #2d3436;
|
| 30 |
+
--text-secondary: #636e72;
|
| 31 |
+
|
| 32 |
+
--bubble-sent: rgba(255, 255, 255, 0.6);
|
| 33 |
+
--bubble-received: rgba(255, 255, 255, 0.3);
|
| 34 |
+
|
| 35 |
+
--accent-color: #6c5ce7;
|
| 36 |
+
--accent-hover: #5649c0;
|
| 37 |
+
|
| 38 |
+
--font-main: 'Outfit', sans-serif;
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
* {
|
| 42 |
+
margin: 0;
|
| 43 |
+
padding: 0;
|
| 44 |
+
box-sizing: border-box;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
body {
|
| 48 |
+
font-family: var(--font-main);
|
| 49 |
+
height: 100vh;
|
| 50 |
+
width: 100vw;
|
| 51 |
+
overflow: hidden; /* Prevent body scroll, handle inside app */
|
| 52 |
+
display: flex;
|
| 53 |
+
justify-content: center;
|
| 54 |
+
align-items: center;
|
| 55 |
+
background: #f0f2f5;
|
| 56 |
+
position: relative;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
/* --- Animated Background Blobs --- */
|
| 60 |
+
.background-blobs {
|
| 61 |
+
position: absolute;
|
| 62 |
+
top: 0;
|
| 63 |
+
left: 0;
|
| 64 |
+
width: 100%;
|
| 65 |
+
height: 100%;
|
| 66 |
+
z-index: -1;
|
| 67 |
+
overflow: hidden;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.blob {
|
| 71 |
+
position: absolute;
|
| 72 |
+
border-radius: 50%;
|
| 73 |
+
filter: blur(60px);
|
| 74 |
+
opacity: 0.8;
|
| 75 |
+
animation: float 10s infinite ease-in-out alternate;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.blob-1 {
|
| 79 |
+
top: -10%;
|
| 80 |
+
left: -10%;
|
| 81 |
+
width: 500px;
|
| 82 |
+
height: 500px;
|
| 83 |
+
background: var(--bg-gradient-1);
|
| 84 |
+
animation-delay: 0s;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.blob-2 {
|
| 88 |
+
bottom: -10%;
|
| 89 |
+
right: -10%;
|
| 90 |
+
width: 600px;
|
| 91 |
+
height: 600px;
|
| 92 |
+
background: var(--bg-gradient-3);
|
| 93 |
+
animation-delay: -2s;
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
.blob-3 {
|
| 97 |
+
top: 40%;
|
| 98 |
+
left: 40%;
|
| 99 |
+
width: 300px;
|
| 100 |
+
height: 300px;
|
| 101 |
+
background: var(--bg-gradient-4);
|
| 102 |
+
animation-delay: -5s;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
@keyframes float {
|
| 106 |
+
0% { transform: translate(0, 0) scale(1); }
|
| 107 |
+
100% { transform: translate(20px, 40px) scale(1.1); }
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
/* --- Main App Container --- */
|
| 111 |
+
.app-container {
|
| 112 |
+
width: 90%;
|
| 113 |
+
max-width: 1200px; /* Wide desktop view */
|
| 114 |
+
height: 90vh;
|
| 115 |
+
background: var(--glass-bg);
|
| 116 |
+
backdrop-filter: var(--glass-blur);
|
| 117 |
+
-webkit-backdrop-filter: var(--glass-blur);
|
| 118 |
+
border-radius: 24px;
|
| 119 |
+
border: 1px solid var(--glass-border);
|
| 120 |
+
box-shadow: var(--glass-shadow);
|
| 121 |
+
display: flex;
|
| 122 |
+
overflow: hidden;
|
| 123 |
+
position: relative;
|
| 124 |
+
/* Inner glow for depth */
|
| 125 |
+
&::before {
|
| 126 |
+
content: '';
|
| 127 |
+
position: absolute;
|
| 128 |
+
top: 0;
|
| 129 |
+
left: 0;
|
| 130 |
+
right: 0;
|
| 131 |
+
height: 1px;
|
| 132 |
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
|
| 133 |
+
}
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
/* --- Sidebar (Contacts) --- */
|
| 137 |
+
.sidebar {
|
| 138 |
+
width: 300px;
|
| 139 |
+
border-right: 1px solid rgba(255, 255, 255, 0.3);
|
| 140 |
+
display: flex;
|
| 141 |
+
flex-direction: column;
|
| 142 |
+
background: rgba(255, 255, 255, 0.1);
|
| 143 |
+
transition: transform 0.3s ease;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.sidebar-header {
|
| 147 |
+
padding: 24px;
|
| 148 |
+
display: flex;
|
| 149 |
+
align-items: center;
|
| 150 |
+
justify-content: space-between;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
.brand-logo {
|
| 154 |
+
font-size: 1.2rem;
|
| 155 |
+
font-weight: 600;
|
| 156 |
+
color: var(--text-primary);
|
| 157 |
+
display: flex;
|
| 158 |
+
align-items: center;
|
| 159 |
+
gap: 8px;
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
.search-bar {
|
| 163 |
+
margin: 0 20px 20px;
|
| 164 |
+
position: relative;
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
.search-input {
|
| 168 |
+
width: 100%;
|
| 169 |
+
padding: 10px 16px 10px 40px;
|
| 170 |
+
border-radius: 12px;
|
| 171 |
+
border: 1px solid rgba(255, 255, 255, 0.4);
|
| 172 |
+
background: rgba(255, 255, 255, 0.2);
|
| 173 |
+
color: var(--text-primary);
|
| 174 |
+
font-family: var(--font-main);
|
| 175 |
+
outline: none;
|
| 176 |
+
transition: background 0.3s;
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
.search-input:focus {
|
| 180 |
+
background: rgba(255, 255, 255, 0.4);
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
.search-icon {
|
| 184 |
+
position: absolute;
|
| 185 |
+
left: 12px;
|
| 186 |
+
top: 50%;
|
| 187 |
+
transform: translateY(-50%);
|
| 188 |
+
color: var(--text-secondary);
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
.contact-list {
|
| 192 |
+
flex: 1;
|
| 193 |
+
overflow-y: auto;
|
| 194 |
+
padding: 10px;
|
| 195 |
+
}
|
| 196 |
+
|
| 197 |
+
/* Custom Scrollbar */
|
| 198 |
+
::-webkit-scrollbar {
|
| 199 |
+
width: 6px;
|
| 200 |
+
}
|
| 201 |
+
::-webkit-scrollbar-track {
|
| 202 |
+
background: transparent;
|
| 203 |
+
}
|
| 204 |
+
::-webkit-scrollbar-thumb {
|
| 205 |
+
background: rgba(255, 255, 255, 0.3);
|
| 206 |
+
border-radius: 10px;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
.contact-item {
|
| 210 |
+
display: flex;
|
| 211 |
+
align-items: center;
|
| 212 |
+
padding: 12px;
|
| 213 |
+
border-radius: 12px;
|
| 214 |
+
cursor: pointer;
|
| 215 |
+
transition: background 0.2s;
|
| 216 |
+
margin-bottom: 4px;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.contact-item:hover, .contact-item.active {
|
| 220 |
+
background: rgba(255, 255, 255, 0.3);
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
.avatar {
|
| 224 |
+
width: 48px;
|
| 225 |
+
height: 48px;
|
| 226 |
+
border-radius: 50%;
|
| 227 |
+
object-fit: cover;
|
| 228 |
+
border: 2px solid rgba(255, 255, 255, 0.5);
|
| 229 |
+
margin-right: 12px;
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
.contact-info {
|
| 233 |
+
flex: 1;
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
.contact-name {
|
| 237 |
+
font-weight: 500;
|
| 238 |
+
color: var(--text-primary);
|
| 239 |
+
margin-bottom: 2px;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
.last-message {
|
| 243 |
+
font-size: 0.85rem;
|
| 244 |
+
color: var(--text-secondary);
|
| 245 |
+
white-space: nowrap;
|
| 246 |
+
overflow: hidden;
|
| 247 |
+
text-overflow: ellipsis;
|
| 248 |
+
max-width: 160px;
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
.meta-time {
|
| 252 |
+
font-size: 0.75rem;
|
| 253 |
+
color: var(--text-secondary);
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
/* --- Chat Area --- */
|
| 257 |
+
.chat-area {
|
| 258 |
+
flex: 1;
|
| 259 |
+
display: flex;
|
| 260 |
+
flex-direction: column;
|
| 261 |
+
position: relative;
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
/* Chat Header */
|
| 265 |
+
.chat-header {
|
| 266 |
+
padding: 16px 24px;
|
| 267 |
+
display: flex;
|
| 268 |
+
align-items: center;
|
| 269 |
+
justify-content: space-between;
|
| 270 |
+
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
|
| 271 |
+
background: rgba(255, 255, 255, 0.15);
|
| 272 |
+
z-index: 10;
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
.chat-user-info {
|
| 276 |
+
display: flex;
|
| 277 |
+
align-items: center;
|
| 278 |
+
gap: 12px;
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
.user-status {
|
| 282 |
+
display: flex;
|
| 283 |
+
flex-direction: column;
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
.status-dot {
|
| 287 |
+
width: 8px;
|
| 288 |
+
height: 8px;
|
| 289 |
+
background-color: #00b894;
|
| 290 |
+
border-radius: 50%;
|
| 291 |
+
display: inline-block;
|
| 292 |
+
margin-right: 4px;
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
.status-text {
|
| 296 |
+
font-size: 0.8rem;
|
| 297 |
+
color: var(--text-secondary);
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
.header-actions {
|
| 301 |
+
display: flex;
|
| 302 |
+
gap: 16px;
|
| 303 |
+
}
|
| 304 |
+
|
| 305 |
+
.icon-btn {
|
| 306 |
+
background: transparent;
|
| 307 |
+
border: none;
|
| 308 |
+
color: var(--text-primary);
|
| 309 |
+
font-size: 1.2rem;
|
| 310 |
+
cursor: pointer;
|
| 311 |
+
transition: transform 0.2s, color 0.2s;
|
| 312 |
+
display: flex;
|
| 313 |
+
align-items: center;
|
| 314 |
+
justify-content: center;
|
| 315 |
+
}
|
| 316 |
+
|
| 317 |
+
.icon-btn:hover {
|
| 318 |
+
transform: scale(1.1);
|
| 319 |
+
color: var(--accent-color);
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
.mobile-menu-btn {
|
| 323 |
+
display: none;
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
/* Messages List */
|
| 327 |
+
.messages-container {
|
| 328 |
+
flex: 1;
|
| 329 |
+
padding: 24px;
|
| 330 |
+
overflow-y: auto;
|
| 331 |
+
display: flex;
|
| 332 |
+
flex-direction: column;
|
| 333 |
+
gap: 16px;
|
| 334 |
+
}
|
| 335 |
+
|
| 336 |
+
.message {
|
| 337 |
+
max-width: 70%;
|
| 338 |
+
padding: 12px 18px;
|
| 339 |
+
border-radius: 18px;
|
| 340 |
+
position: relative;
|
| 341 |
+
font-size: 0.95rem;
|
| 342 |
+
line-height: 1.5;
|
| 343 |
+
animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
| 344 |
+
word-wrap: break-word;
|
| 345 |
+
}
|
| 346 |
+
|
| 347 |
+
@keyframes popIn {
|
| 348 |
+
from { opacity: 0; transform: translateY(10px) scale(0.95); }
|
| 349 |
+
to { opacity: 1; transform: translateY(0) scale(1); }
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
.message.received {
|
| 353 |
+
align-self: flex-start;
|
| 354 |
+
background: var(--bubble-received);
|
| 355 |
+
backdrop-filter: blur(5px);
|
| 356 |
+
border-bottom-left-radius: 4px;
|
| 357 |
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
| 358 |
+
color: var(--text-primary);
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
.message.sent {
|
| 362 |
+
align-self: flex-end;
|
| 363 |
+
background: var(--bubble-sent);
|
| 364 |
+
backdrop-filter: blur(10px);
|
| 365 |
+
border-bottom-right-radius: 4px;
|
| 366 |
+
border: 1px solid rgba(255, 255, 255, 0.4);
|
| 367 |
+
color: var(--text-primary);
|
| 368 |
+
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
.message-time {
|
| 372 |
+
font-size: 0.7rem;
|
| 373 |
+
color: var(--text-secondary);
|
| 374 |
+
text-align: right;
|
| 375 |
+
margin-top: 4px;
|
| 376 |
+
opacity: 0.7;
|
| 377 |
+
}
|
| 378 |
+
|
| 379 |
+
/* Input Area */
|
| 380 |
+
.input-area {
|
| 381 |
+
padding: 20px;
|
| 382 |
+
background: rgba(255, 255, 255, 0.1);
|
| 383 |
+
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
| 384 |
+
display: flex;
|
| 385 |
+
align-items: center;
|
| 386 |
+
gap: 12px;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
.attach-btn {
|
| 390 |
+
background: rgba(255, 255, 255, 0.3);
|
| 391 |
+
border: 1px solid rgba(255, 255, 255, 0.4);
|
| 392 |
+
width: 44px;
|
| 393 |
+
height: 44px;
|
| 394 |
+
border-radius: 50%;
|
| 395 |
+
display: flex;
|
| 396 |
+
align-items: center;
|
| 397 |
+
justify-content: center;
|
| 398 |
+
cursor: pointer;
|
| 399 |
+
transition: all 0.2s;
|
| 400 |
+
color: var(--text-secondary);
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
.attach-btn:hover {
|
| 404 |
+
background: rgba(255, 255, 255, 0.5);
|
| 405 |
+
color: var(--text-primary);
|
| 406 |
+
}
|
| 407 |
+
|
| 408 |
+
.message-input-wrapper {
|
| 409 |
+
flex: 1;
|
| 410 |
+
position: relative;
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
.message-input {
|
| 414 |
+
width: 100%;
|
| 415 |
+
padding: 14px 20px;
|
| 416 |
+
border-radius: 24px;
|
| 417 |
+
border: 1px solid rgba(255, 255, 255, 0.4);
|
| 418 |
+
background: rgba(255, 255, 255, 0.4);
|
| 419 |
+
color: var(--text-primary);
|
| 420 |
+
font-family: var(--font-main);
|
| 421 |
+
font-size: 1rem;
|
| 422 |
+
outline: none;
|
| 423 |
+
transition: all 0.3s;
|
| 424 |
+
box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
.message-input:focus {
|
| 428 |
+
background: rgba(255, 255, 255, 0.8);
|
| 429 |
+
box-shadow: 0 4px 20px rgba(0,0,0,0.05);
|
| 430 |
+
border-color: rgba(255, 255, 255, 0.8);
|
| 431 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
|
| 433 |
+
.send-btn {
|
| 434 |
+
background: var(--accent-color);
|
| 435 |
+
color: white;
|
| 436 |
+
border: none;
|
| 437 |
+
width: 44px;
|
| 438 |
+
height: 44px;
|
| 439 |
+
border-radius: 50%;
|
| 440 |
+
display: flex;
|
| 441 |
+
align-items: center;
|
| 442 |
+
justify-content: center;
|
| 443 |
+
cursor: pointer;
|
| 444 |
+
transition: all 0.2s;
|
| 445 |
+
box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
|
| 446 |
+
}
|
| 447 |
+
|
| 448 |
+
.send-btn:hover {
|
| 449 |
+
background: var(--accent-hover);
|
| 450 |
+
transform: scale(1.05);
|
| 451 |
+
box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
|
| 452 |
+
}
|
| 453 |
+
|
| 454 |
+
.send-btn:active {
|
| 455 |
+
transform: scale(0.95);
|
| 456 |
+
}
|
| 457 |
+
|
| 458 |
+
/* Anycoder Link */
|
| 459 |
+
.anycoder-link {
|
| 460 |
+
font-size: 0.75rem;
|
| 461 |
+
color: var(--text-secondary);
|
| 462 |
+
text-decoration: none;
|
| 463 |
+
font-weight: 500;
|
| 464 |
+
opacity: 0.7;
|
| 465 |
+
transition: opacity 0.3s;
|
| 466 |
+
margin-left: auto;
|
| 467 |
+
margin-right: 10px;
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
.anycoder-link:hover {
|
| 471 |
+
opacity: 1;
|
| 472 |
+
color: var(--accent-color);
|
| 473 |
+
}
|
| 474 |
+
|
| 475 |
+
/* --- Responsive Design --- */
|
| 476 |
+
@media (max-width: 768px) {
|
| 477 |
+
.app-container {
|
| 478 |
+
width: 100%;
|
| 479 |
+
height: 100%;
|
| 480 |
+
border-radius: 0;
|
| 481 |
+
border: none;
|
| 482 |
+
}
|
| 483 |
+
|
| 484 |
+
.sidebar {
|
| 485 |
+
position: absolute;
|
| 486 |
+
left: 0;
|
| 487 |
+
top: 0;
|
| 488 |
+
bottom: 0;
|
| 489 |
+
z-index: 20;
|
| 490 |
+
transform: translateX(-100%);
|
| 491 |
+
background: rgba(255, 255, 255, 0.85);
|
| 492 |
+
backdrop-filter: blur(25px);
|
| 493 |
+
-webkit-backdrop-filter: blur(25px);
|
| 494 |
+
box-shadow: 10px 0 30px rgba(0,0,0,0.1);
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
.sidebar.open {
|
| 498 |
+
transform: translateX(0);
|
| 499 |
+
}
|
| 500 |
+
|
| 501 |
+
.mobile-menu-btn {
|
| 502 |
+
display: block;
|
| 503 |
+
margin-right: 10px;
|
| 504 |
+
}
|
| 505 |
+
|
| 506 |
+
.chat-header {
|
| 507 |
+
padding: 12px 16px;
|
| 508 |
+
}
|
| 509 |
+
|
| 510 |
+
.message {
|
| 511 |
+
max-width: 85%;
|
| 512 |
+
}
|
| 513 |
+
}
|
| 514 |
+
</style>
|
| 515 |
+
</head>
|
| 516 |
<body>
|
| 517 |
|
| 518 |
+
<!-- Background Elements -->
|
| 519 |
+
<div class="background-blobs">
|
| 520 |
+
<div class="blob blob-1"></div>
|
| 521 |
+
<div class="blob blob-2"></div>
|
| 522 |
+
<div class="blob blob-3"></div>
|
| 523 |
+
</div>
|
| 524 |
+
|
| 525 |
+
<!-- Main App -->
|
| 526 |
+
<div class="app-container">
|
| 527 |
+
|
| 528 |
+
<!-- Sidebar -->
|
| 529 |
+
<aside class="sidebar" id="sidebar">
|
| 530 |
+
<div class="sidebar-header">
|
| 531 |
+
<div class="brand-logo">
|
| 532 |
+
<i class="ph ph-chat-circle-dots" style="font-size: 1.5rem; color: var(--accent-color);"></i>
|
| 533 |
+
<span>GlassChat</span>
|
| 534 |
+
</div>
|
| 535 |
+
<button class="icon-btn" onclick="toggleSidebar()" style="display: none;" id="close-sidebar-btn">
|
| 536 |
+
<i class="ph ph-x"></i>
|
| 537 |
+
</button>
|
| 538 |
+
</div>
|
| 539 |
+
|
| 540 |
+
<div class="search-bar">
|
| 541 |
+
<i class="ph ph-magnifying-glass search-icon"></i>
|
| 542 |
+
<input type="text" class="search-input" placeholder="Search chats...">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 543 |
</div>
|
| 544 |
+
|
| 545 |
+
<div class="contact-list">
|
| 546 |
+
<!-- Contact 1 (Active) -->
|
| 547 |
+
<div class="contact-item active" onclick="selectContact(this)">
|
| 548 |
+
<img src="https://picsum.photos/seed/alex/100/100" alt="Avatar" class="avatar">
|
| 549 |
+
<div class="contact-info">
|
| 550 |
+
<div class="contact-name">Alex Morgan</div>
|
| 551 |
+
<div class="last-message">Sounds good! Let's meet later.</div>
|
| 552 |
+
</div>
|
| 553 |
+
<div class="meta-time">2m</div>
|
| 554 |
+
</div>
|
| 555 |
+
|
| 556 |
+
<!-- Contact 2 -->
|
| 557 |
+
<div class="contact-item" onclick="selectContact(this)">
|
| 558 |
+
<img src="https://picsum.photos/seed/sarah/100/100" alt="Avatar" class="avatar">
|
| 559 |
+
<div class="contact-info">
|
| 560 |
+
<div class="contact-name">Sarah Jenkins</div>
|
| 561 |
+
<div class="last-message">Can you send the design file?</div>
|
| 562 |
+
</div>
|
| 563 |
+
<div class="meta-time">1h</div>
|
| 564 |
+
</div>
|
| 565 |
+
|
| 566 |
+
<!-- Contact 3 -->
|
| 567 |
+
<div class="contact-item" onclick="selectContact(this)">
|
| 568 |
+
<img src="https://picsum.photos/seed/david/100/100" alt="Avatar" class="avatar">
|
| 569 |
+
<div class="contact-info">
|
| 570 |
+
<div class="contact-name">David Chen</div>
|
| 571 |
+
<div class="last-message">The project is almost done.</div>
|
| 572 |
+
</div>
|
| 573 |
+
<div class="meta-time">3h</div>
|
| 574 |
+
</div>
|
| 575 |
+
|
| 576 |
+
<!-- Contact 4 -->
|
| 577 |
+
<div class="contact-item" onclick="selectContact(this)">
|
| 578 |
+
<img src="https://picsum.photos/seed/emily/100/100" alt="Avatar" class="avatar">
|
| 579 |
+
<div class="contact-info">
|
| 580 |
+
<div class="contact-name">Emily Rose</div>
|
| 581 |
+
<div class="last-message">Are you coming to the party?</div>
|
| 582 |
+
</div>
|
| 583 |
+
<div class="meta-time">1d</div>
|
| 584 |
+
</div>
|
| 585 |
</div>
|
| 586 |
+
</aside>
|
| 587 |
+
|
| 588 |
+
<!-- Chat Interface -->
|
| 589 |
+
<main class="chat-area">
|
| 590 |
+
<!-- Header -->
|
| 591 |
+
<header class="chat-header">
|
| 592 |
+
<div class="chat-user-info">
|
| 593 |
+
<button class="icon-btn mobile-menu-btn" onclick="toggleSidebar()">
|
| 594 |
+
<i class="ph ph-list"></i>
|
| 595 |
+
</button>
|
| 596 |
+
<img src="https://picsum.photos/seed/alex/100/100" alt="User" class="avatar" id="current-chat-avatar">
|
| 597 |
+
<div class="user-status">
|
| 598 |
+
<span class="contact-name" id="current-chat-name">Alex Morgan</span>
|
| 599 |
+
<span class="status-text"><span class="status-dot"></span>Online</span>
|
| 600 |
+
</div>
|
| 601 |
+
</div>
|
| 602 |
+
|
| 603 |
+
<div class="header-actions">
|
| 604 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">Built with anycoder</a>
|
| 605 |
+
<button class="icon-btn"><i class="ph ph-phone"></i></button>
|
| 606 |
+
<button class="icon-btn"><i class="ph ph-video-camera"></i></button>
|
| 607 |
+
<button class="icon-btn"><i class="ph ph-dots-three-vertical"></i></button>
|
| 608 |
+
</div>
|
| 609 |
+
</header>
|
| 610 |
+
|
| 611 |
+
<!-- Messages -->
|
| 612 |
+
<div class="messages-container" id="messages-list">
|
| 613 |
+
<div class="message received">
|
| 614 |
+
Hey! How is the new design coming along?
|
| 615 |
+
<div class="message-time">10:30 AM</div>
|
| 616 |
+
</div>
|
| 617 |
+
|
| 618 |
+
<div class="message sent">
|
| 619 |
+
It's going great! I'm finalizing the glassmorphism effects right now.
|
| 620 |
+
<div class="message-time">10:32 AM</div>
|
| 621 |
+
</div>
|
| 622 |
+
|
| 623 |
+
<div class="message received">
|
| 624 |
+
Awesome. Can you show me a preview?
|
| 625 |
+
<div class="message-time">10:33 AM</div>
|
| 626 |
+
</div>
|
| 627 |
+
|
| 628 |
+
<div class="message sent">
|
| 629 |
+
Sure, I'm just polishing the responsiveness for mobile.
|
| 630 |
+
<div class="message-time">10:35 AM</div>
|
| 631 |
+
</div>
|
| 632 |
+
|
| 633 |
+
<div class="message received">
|
| 634 |
+
Sounds good! Let's meet later.
|
| 635 |
+
<div class="message-time">10:36 AM</div>
|
| 636 |
+
</div>
|
| 637 |
</div>
|
| 638 |
+
|
| 639 |
+
<!-- Input Area -->
|
| 640 |
+
<div class="input-area">
|
| 641 |
+
<button class="attach-btn" title="Attach file">
|
| 642 |
+
<i class="ph ph-plus"></i>
|
| 643 |
+
</button>
|
| 644 |
+
<div class="message-input-wrapper">
|
| 645 |
+
<input type="text" id="message-input" class="message-input" placeholder="Type a message..." autocomplete="off">
|
| 646 |
+
</div>
|
| 647 |
+
<button class="send-btn" id="send-btn" title="Send message">
|
| 648 |
+
<i class="ph ph-paper-plane-right"></i>
|
| 649 |
+
</button>
|
| 650 |
+
</div>
|
| 651 |
+
</main>
|
| 652 |
+
</div>
|
| 653 |
+
|
| 654 |
+
<script>
|
| 655 |
+
// DOM Elements
|
| 656 |
+
const messageInput = document.getElementById('message-input');
|
| 657 |
+
const sendBtn = document.getElementById('send-btn');
|
| 658 |
+
const messagesList = document.getElementById('messages-list');
|
| 659 |
+
const sidebar = document.getElementById('sidebar');
|
| 660 |
+
const closeSidebarBtn = document.getElementById('close-sidebar-btn');
|
| 661 |
+
|
| 662 |
+
// Toggle Sidebar for Mobile
|
| 663 |
+
function toggleSidebar() {
|
| 664 |
+
sidebar.classList.toggle('open');
|
| 665 |
+
if (sidebar.classList.contains('open')) {
|
| 666 |
+
closeSidebarBtn.style.display = 'flex';
|
| 667 |
+
} else {
|
| 668 |
+
closeSidebarBtn.style.display = 'none';
|
| 669 |
+
}
|
| 670 |
+
}
|
| 671 |
+
|
| 672 |
+
// Handle Contact Selection (Visual Only)
|
| 673 |
+
function selectContact(element) {
|
| 674 |
+
// Remove active class from all
|
| 675 |
+
document.querySelectorAll('.contact-item').forEach(item => {
|
| 676 |
+
item.classList.remove('active');
|
| 677 |
+
});
|
| 678 |
+
// Add active to clicked
|
| 679 |
+
element.classList.add('active');
|
| 680 |
+
|
| 681 |
+
// Update Header Info
|
| 682 |
+
const name = element.querySelector('.contact-name').innerText;
|
| 683 |
+
const img = element.querySelector('img').src;
|
| 684 |
+
|
| 685 |
+
document.getElementById('current-chat-name').innerText = name;
|
| 686 |
+
document.getElementById('current-chat-avatar').src = img;
|
| 687 |
+
|
| 688 |
+
// On mobile, close sidebar after selection
|
| 689 |
+
if (window.innerWidth <= 768) {
|
| 690 |
+
toggleSidebar();
|
| 691 |
+
}
|
| 692 |
+
}
|
| 693 |
+
|
| 694 |
+
// Send Message Functionality
|
| 695 |
+
function sendMessage() {
|
| 696 |
+
const text = messageInput.value.trim();
|
| 697 |
+
if (text === "") return;
|
| 698 |
+
|
| 699 |
+
// Create Sent Message
|
| 700 |
+
addMessageToDOM(text, 'sent');
|
| 701 |
+
messageInput.value = "";
|
| 702 |
+
|
| 703 |
+
// Simulate Reply
|
| 704 |
+
setTimeout(() => {
|
| 705 |
+
const replies = [
|
| 706 |
+
"That looks interesting!",
|
| 707 |
+
"Can you tell me more?",
|
| 708 |
+
"I totally agree with you.",
|
| 709 |
+
"Let's discuss this in the meeting.",
|
| 710 |
+
"Got it, thanks!"
|
| 711 |
+
];
|
| 712 |
+
const randomReply = replies[Math.floor(Math.random() * replies.length)];
|
| 713 |
+
addMessageToDOM(randomReply, 'received');
|
| 714 |
+
}, 1500 + Math.random() * 1000);
|
| 715 |
+
}
|
| 716 |
+
|
| 717 |
+
function addMessageToDOM(text, type) {
|
| 718 |
+
const time = new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
|
| 719 |
+
|
| 720 |
+
const messageDiv = document.createElement('div');
|
| 721 |
+
messageDiv.classList.add('message', type);
|
| 722 |
+
messageDiv.innerHTML = `
|
| 723 |
+
${text}
|
| 724 |
+
<div class="message-time">${time}</div>
|
| 725 |
+
`;
|
| 726 |
+
|
| 727 |
+
messagesList.appendChild(messageDiv);
|
| 728 |
+
|
| 729 |
+
// Scroll to bottom
|
| 730 |
+
messagesList.scrollTop = messagesList.scrollHeight;
|
| 731 |
+
}
|
| 732 |
+
|
| 733 |
+
// Event Listeners
|
| 734 |
+
sendBtn.addEventListener('click', sendMessage);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 735 |
|
| 736 |
+
messageInput.addEventListener('keypress', (e) => {
|
| 737 |
+
if (e.key === 'Enter') {
|
| 738 |
+
sendMessage();
|
| 739 |
+
}
|
| 740 |
+
});
|
| 741 |
+
|
| 742 |
+
// Initialize Sidebar Button state
|
| 743 |
+
if (window.innerWidth <= 768) {
|
| 744 |
+
closeSidebarBtn.style.display = 'none';
|
| 745 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 746 |
|
| 747 |
+
// Handle Resize
|
| 748 |
+
window.addEventListener('resize', () => {
|
| 749 |
+
if (window.innerWidth > 768) {
|
| 750 |
+
sidebar.classList.remove('open');
|
| 751 |
+
closeSidebarBtn.style.display = 'none';
|
| 752 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 753 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
| 754 |
|
| 755 |
+
</script>
|
| 756 |
+
</body>
|
| 757 |
</html>
|