Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- index.html +434 -428
index.html
CHANGED
|
@@ -1,438 +1,443 @@
|
|
| 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">
|
| 6 |
-
<title>Minimal Glass Chat</title>
|
| 7 |
-
<!-- Import Google Fonts: Nunito for that airy, soft feel -->
|
| 8 |
-
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 9 |
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
| 10 |
-
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600&display=swap" rel="stylesheet">
|
| 11 |
-
<!-- Import FontAwesome for Icons -->
|
| 12 |
-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 13 |
-
|
| 14 |
-
<style>
|
| 15 |
-
:root {
|
| 16 |
-
/* Palette: Soft Pastels & Glass */
|
| 17 |
-
--bg-gradient-start: #fdfbfb;
|
| 18 |
-
--bg-gradient-end: #ebedee;
|
| 19 |
-
|
| 20 |
-
/* Soft Blob Colors */
|
| 21 |
-
--blob-1: #e0c3fc;
|
| 22 |
-
--blob-2: #8ec5fc;
|
| 23 |
-
|
| 24 |
-
/* Glass Variables - Restrained */
|
| 25 |
-
--glass-bg: rgba(255, 255, 255, 0.45);
|
| 26 |
-
--glass-border: rgba(255, 255, 255, 0.4);
|
| 27 |
-
--glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
|
| 28 |
-
--glass-blur: blur(12px);
|
| 29 |
-
|
| 30 |
-
/* Typography */
|
| 31 |
-
--font-main: 'Nunito', sans-serif;
|
| 32 |
-
--text-primary: #4a4a4a; /* Darker gray for contrast but softer than black */
|
| 33 |
-
--text-secondary: #7a7a7a;
|
| 34 |
-
|
| 35 |
-
/* Message Bubbles */
|
| 36 |
-
--msg-sent-bg: rgba(179, 209, 255, 0.5); /* Very soft blue */
|
| 37 |
-
--msg-received-bg: rgba(255, 255, 255, 0.5);
|
| 38 |
-
--msg-text: #444;
|
| 39 |
-
|
| 40 |
-
/* Spacing */
|
| 41 |
-
--spacing-sm: 8px;
|
| 42 |
-
--spacing-md: 16px;
|
| 43 |
-
--spacing-lg: 24px;
|
| 44 |
-
}
|
| 45 |
-
|
| 46 |
-
* {
|
| 47 |
-
margin: 0;
|
| 48 |
-
padding: 0;
|
| 49 |
-
box-sizing: border-box;
|
| 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 |
</head>
|
|
|
|
| 384 |
<body>
|
| 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 |
<i class="fas fa-paper-plane"></i>
|
| 429 |
</button>
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
|
| 434 |
-
|
| 435 |
-
|
| 436 |
const contacts = [
|
| 437 |
{ id: 1, name: "Alice Moore", avatar: "https://picsum.photos/seed/alice/100/100", lastMsg: "See you tomorrow!", status: "Online" },
|
| 438 |
{ id: 2, name: "Bob Smith", avatar: "https://picsum.photos/seed/bob/100/100", lastMsg: "Is the project ready?", status: "Away" },
|
|
@@ -446,7 +451,7 @@
|
|
| 446 |
{ type: 'received', text: "Hey! How are you doing?", time: "10:00 AM" },
|
| 447 |
{ type: 'sent', text: "I'm doing great, thanks! Just redesigning this UI.", time: "10:02 AM" },
|
| 448 |
{ type: 'received', text: "Oh nice, is it the glassmorphism one?", time: "10:03 AM" },
|
| 449 |
-
{ type: 'sent', text: "Yeah, making it much
|
| 450 |
{ type: 'received', text: "See you tomorrow!", time: "10:06 AM" }
|
| 451 |
],
|
| 452 |
2: [
|
|
@@ -530,7 +535,7 @@
|
|
| 530 |
emptyState.style.textAlign = 'center';
|
| 531 |
emptyState.style.alignSelf = 'center';
|
| 532 |
emptyState.style.background = 'transparent';
|
| 533 |
-
emptyState.style.color = '
|
| 534 |
emptyState.textContent = "Start a conversation with " + contact.name;
|
| 535 |
messagesContainerEl.appendChild(emptyState);
|
| 536 |
} else {
|
|
@@ -620,6 +625,7 @@
|
|
| 620 |
// Start App
|
| 621 |
init();
|
| 622 |
|
| 623 |
-
|
| 624 |
</body>
|
|
|
|
| 625 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>Minimal Dark Glass Chat</title>
|
| 8 |
+
<!-- Import Google Fonts: Nunito for that airy, soft 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=Nunito:wght@300;400;500;600&display=swap" rel="stylesheet">
|
| 12 |
+
<!-- Import FontAwesome for Icons -->
|
| 13 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 14 |
+
|
| 15 |
+
<style>
|
| 16 |
+
:root {
|
| 17 |
+
/* Palette: Muted Dark Gradients & Dark Glass */
|
| 18 |
+
--bg-gradient-start: #1f2229;
|
| 19 |
+
--bg-gradient-end: #2c303a;
|
| 20 |
+
|
| 21 |
+
/* Muted Dark Blob Colors */
|
| 22 |
+
--blob-1: #2b3244;
|
| 23 |
+
--blob-2: #1e2536;
|
| 24 |
+
|
| 25 |
+
/* Dark Glass Variables */
|
| 26 |
+
--glass-bg: rgba(30, 35, 45, 0.4);
|
| 27 |
+
--glass-border: rgba(255, 255, 255, 0.08);
|
| 28 |
+
--glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
|
| 29 |
+
--glass-blur: blur(12px);
|
| 30 |
+
--sidebar-bg: rgba(0, 0, 0, 0.2);
|
| 31 |
+
|
| 32 |
+
/* Typography */
|
| 33 |
+
--font-main: 'Nunito', sans-serif;
|
| 34 |
+
--text-primary: #e0e0e0; /* Soft white/gray */
|
| 35 |
+
--text-secondary: #9aa0a6; /* Muted gray */
|
| 36 |
+
|
| 37 |
+
/* Message Bubbles - Brightness differentiation, no color change */
|
| 38 |
+
--msg-sent-bg: rgba(255, 255, 255, 0.12); /* Lighter glass */
|
| 39 |
+
--msg-received-bg: rgba(0, 0, 0, 0.2); /* Darker glass */
|
| 40 |
+
--msg-text: #f0f0f0;
|
| 41 |
+
|
| 42 |
+
/* Spacing */
|
| 43 |
+
--spacing-sm: 8px;
|
| 44 |
+
--spacing-md: 16px;
|
| 45 |
+
--spacing-lg: 24px;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
* {
|
| 49 |
+
margin: 0;
|
| 50 |
+
padding: 0;
|
| 51 |
+
box-sizing: border-box;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
body {
|
| 55 |
+
font-family: var(--font-main);
|
| 56 |
+
background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
|
| 57 |
+
height: 100vh;
|
| 58 |
+
width: 100vw;
|
| 59 |
+
overflow: hidden;
|
| 60 |
+
color: var(--text-primary);
|
| 61 |
+
position: relative;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/*
|
| 65 |
+
Background: Muted dark gradients
|
| 66 |
+
Removed animations, static only
|
| 67 |
*/
|
| 68 |
+
.ambient-bg {
|
| 69 |
+
position: absolute;
|
| 70 |
+
top: 0;
|
| 71 |
+
left: 0;
|
| 72 |
+
width: 100%;
|
| 73 |
+
height: 100%;
|
| 74 |
+
z-index: -1;
|
| 75 |
+
/* Deep, dark, static gradient blobs */
|
| 76 |
+
background: radial-gradient(circle at 10% 20%, rgba(43, 50, 68, 0.4) 0%, transparent 50%),
|
| 77 |
+
radial-gradient(circle at 90% 80%, rgba(30, 37, 54, 0.4) 0%, transparent 50%);
|
| 78 |
+
pointer-events: none;
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
/* Layout Container */
|
| 82 |
+
.app-container {
|
| 83 |
+
display: flex;
|
| 84 |
+
width: 95%;
|
| 85 |
+
height: 92%;
|
| 86 |
+
max-width: 1400px;
|
| 87 |
+
margin: 4vh auto;
|
| 88 |
+
background: var(--glass-bg);
|
| 89 |
+
backdrop-filter: var(--glass-blur);
|
| 90 |
+
-webkit-backdrop-filter: var(--glass-blur);
|
| 91 |
+
border: 1px solid var(--glass-border);
|
| 92 |
+
border-radius: 24px;
|
| 93 |
+
box-shadow: var(--glass-shadow);
|
| 94 |
+
overflow: hidden;
|
| 95 |
+
position: relative;
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
/* --- Sidebar --- */
|
| 99 |
+
.sidebar {
|
| 100 |
+
width: 280px;
|
| 101 |
+
min-width: 280px;
|
| 102 |
+
border-right: 1px solid var(--glass-border);
|
| 103 |
+
display: flex;
|
| 104 |
+
flex-direction: column;
|
| 105 |
+
padding: var(--spacing-md);
|
| 106 |
+
background: var(--sidebar-bg);
|
| 107 |
+
transition: transform 0.3s ease;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.contact-list {
|
| 111 |
+
list-style: none;
|
| 112 |
+
margin-top: var(--spacing-md);
|
| 113 |
+
overflow-y: auto;
|
| 114 |
+
flex-grow: 1;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
/* Dark Scrollbar */
|
| 118 |
+
.contact-list::-webkit-scrollbar {
|
| 119 |
+
width: 4px;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
.contact-list::-webkit-scrollbar-thumb {
|
| 123 |
+
background: rgba(255, 255, 255, 0.1);
|
| 124 |
+
border-radius: 4px;
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
.contact-item {
|
| 128 |
+
display: flex;
|
| 129 |
+
align-items: center;
|
| 130 |
+
padding: 10px;
|
| 131 |
+
margin-bottom: 4px;
|
| 132 |
+
border-radius: 12px;
|
| 133 |
+
cursor: pointer;
|
| 134 |
+
transition: background 0.2s ease;
|
| 135 |
+
position: relative;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
/* Subtle hover states - no strong contrast */
|
| 139 |
+
.contact-item:hover {
|
| 140 |
+
background: rgba(255, 255, 255, 0.05);
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.contact-item.active {
|
| 144 |
+
background: rgba(255, 255, 255, 0.08);
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
/* Smaller avatars */
|
| 148 |
+
.avatar {
|
| 149 |
+
width: 36px;
|
| 150 |
+
height: 36px;
|
| 151 |
+
border-radius: 50%;
|
| 152 |
+
object-fit: cover;
|
| 153 |
+
margin-right: 12px;
|
| 154 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 155 |
+
opacity: 0.9;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
.contact-info {
|
| 159 |
+
display: flex;
|
| 160 |
+
flex-direction: column;
|
| 161 |
+
overflow: hidden;
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
.contact-name {
|
| 165 |
+
font-size: 0.95rem;
|
| 166 |
+
font-weight: 500;
|
| 167 |
+
color: var(--text-primary);
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
.last-msg {
|
| 171 |
+
font-size: 0.8rem;
|
| 172 |
+
color: var(--text-secondary);
|
| 173 |
+
white-space: nowrap;
|
| 174 |
+
overflow: hidden;
|
| 175 |
+
text-overflow: ellipsis;
|
| 176 |
+
font-weight: 400; /* Reduced variation */
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
/* --- Main Chat Area --- */
|
| 180 |
+
.chat-area {
|
| 181 |
+
flex: 1;
|
| 182 |
+
display: flex;
|
| 183 |
+
flex-direction: column;
|
| 184 |
+
position: relative;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
/* --- Header --- */
|
| 188 |
+
header {
|
| 189 |
+
height: 56px; /* Reduced height */
|
| 190 |
+
min-height: 56px;
|
| 191 |
+
display: flex;
|
| 192 |
+
align-items: center;
|
| 193 |
+
justify-content: space-between;
|
| 194 |
+
padding: 0 var(--spacing-lg);
|
| 195 |
+
border-bottom: 1px solid var(--glass-border);
|
| 196 |
+
background: rgba(0, 0, 0, 0.15); /* Darker translucent background */
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
.chat-title h2 {
|
| 200 |
+
font-size: 1.1rem;
|
| 201 |
+
font-weight: 600;
|
| 202 |
+
color: var(--text-primary);
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
+
.chat-title span {
|
| 206 |
+
font-size: 0.8rem;
|
| 207 |
+
color: var(--text-secondary);
|
| 208 |
+
font-weight: 400;
|
| 209 |
+
margin-left: 8px;
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
/* Branding - Subtle */
|
| 213 |
+
.branding {
|
| 214 |
+
font-size: 0.75rem;
|
| 215 |
+
font-weight: 400;
|
| 216 |
+
opacity: 0.7;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.branding a {
|
| 220 |
+
text-decoration: none;
|
| 221 |
+
color: var(--text-secondary);
|
| 222 |
+
transition: color 0.2s;
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
.branding a:hover {
|
| 226 |
+
color: var(--text-primary);
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
/* --- Messages Area --- */
|
| 230 |
+
.messages-container {
|
| 231 |
+
flex: 1;
|
| 232 |
+
padding: var(--spacing-lg);
|
| 233 |
+
overflow-y: auto;
|
| 234 |
+
display: flex;
|
| 235 |
+
flex-direction: column;
|
| 236 |
+
gap: 12px;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
.message {
|
| 240 |
+
max-width: 70%;
|
| 241 |
+
padding: 10px 16px;
|
| 242 |
+
font-size: 0.95rem;
|
| 243 |
+
line-height: 1.5;
|
| 244 |
+
position: relative;
|
| 245 |
+
animation: slideUpFade 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
|
| 246 |
+
opacity: 0;
|
| 247 |
+
transform: translateY(10px);
|
| 248 |
+
/* No borders */
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
@keyframes slideUpFade {
|
| 252 |
+
to {
|
| 253 |
+
opacity: 1;
|
| 254 |
+
transform: translateY(0);
|
| 255 |
+
}
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
.message.received {
|
| 259 |
+
align-self: flex-start;
|
| 260 |
+
background: var(--msg-received-bg);
|
| 261 |
+
color: var(--msg-text);
|
| 262 |
+
border-radius: 18px 18px 18px 4px;
|
| 263 |
+
}
|
| 264 |
+
|
| 265 |
+
.message.sent {
|
| 266 |
+
align-self: flex-end;
|
| 267 |
+
background: var(--msg-sent-bg);
|
| 268 |
+
color: var(--msg-text);
|
| 269 |
+
border-radius: 18px 18px 4px 18px;
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
.message-time {
|
| 273 |
+
display: block;
|
| 274 |
+
font-size: 0.65rem;
|
| 275 |
+
margin-top: 4px;
|
| 276 |
+
text-align: right;
|
| 277 |
+
opacity: 0.5;
|
| 278 |
+
}
|
| 279 |
+
|
| 280 |
+
/* --- Input Area --- */
|
| 281 |
+
.input-area {
|
| 282 |
+
padding: var(--spacing-md) var(--spacing-lg);
|
| 283 |
+
background: rgba(0, 0, 0, 0.2);
|
| 284 |
+
border-top: 1px solid var(--glass-border);
|
| 285 |
+
display: flex;
|
| 286 |
+
align-items: center;
|
| 287 |
+
gap: 12px;
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
.input-wrapper {
|
| 291 |
+
flex: 1;
|
| 292 |
+
position: relative;
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
input[type="text"] {
|
| 296 |
+
width: 100%;
|
| 297 |
+
padding: 14px 20px;
|
| 298 |
+
border-radius: 30px;
|
| 299 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 300 |
+
background: rgba(0, 0, 0, 0.3);
|
| 301 |
+
font-family: var(--font-main);
|
| 302 |
+
font-size: 0.95rem;
|
| 303 |
+
color: var(--text-primary);
|
| 304 |
+
outline: none;
|
| 305 |
+
transition: all 0.2s ease;
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
input[type="text"]:focus {
|
| 309 |
+
background: rgba(0, 0, 0, 0.4);
|
| 310 |
+
border-color: rgba(255, 255, 255, 0.2);
|
| 311 |
+
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
input[type="text"]::placeholder {
|
| 315 |
+
color: rgba(255, 255, 255, 0.3);
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
.send-btn {
|
| 319 |
+
width: 46px;
|
| 320 |
+
height: 46px;
|
| 321 |
+
border-radius: 50%;
|
| 322 |
+
border: none;
|
| 323 |
+
background: #4a5568; /* Muted dark blue-grey */
|
| 324 |
+
color: white;
|
| 325 |
+
display: flex;
|
| 326 |
+
align-items: center;
|
| 327 |
+
justify-content: center;
|
| 328 |
+
cursor: pointer;
|
| 329 |
+
transition: background 0.2s;
|
| 330 |
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
| 331 |
+
/* No hover scaling */
|
| 332 |
+
}
|
| 333 |
+
|
| 334 |
+
.send-btn:hover {
|
| 335 |
+
background: #5a6578;
|
| 336 |
+
}
|
| 337 |
+
|
| 338 |
+
.send-btn:active {
|
| 339 |
+
transform: scale(0.95);
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
/* Responsive Design */
|
| 343 |
+
@media (max-width: 768px) {
|
| 344 |
+
.app-container {
|
| 345 |
+
width: 100%;
|
| 346 |
+
height: 100%;
|
| 347 |
+
border-radius: 0;
|
| 348 |
+
border: none;
|
| 349 |
+
margin: 0;
|
| 350 |
+
}
|
| 351 |
+
|
| 352 |
+
.sidebar {
|
| 353 |
+
position: absolute;
|
| 354 |
+
left: 0;
|
| 355 |
+
top: 0;
|
| 356 |
+
bottom: 0;
|
| 357 |
+
z-index: 10;
|
| 358 |
+
background: rgba(20, 24, 30, 0.95);
|
| 359 |
+
backdrop-filter: blur(20px);
|
| 360 |
+
transform: translateX(-100%);
|
| 361 |
+
box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
.sidebar.open {
|
| 365 |
+
transform: translateX(0);
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
header {
|
| 369 |
+
padding: 0 var(--spacing-md);
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
.mobile-menu-toggle {
|
| 373 |
+
display: block;
|
| 374 |
+
margin-right: 12px;
|
| 375 |
+
color: var(--text-primary);
|
| 376 |
+
cursor: pointer;
|
| 377 |
+
font-size: 1.2rem;
|
| 378 |
+
}
|
| 379 |
+
}
|
| 380 |
+
|
| 381 |
+
@media (min-width: 769px) {
|
| 382 |
+
.mobile-menu-toggle {
|
| 383 |
+
display: none;
|
| 384 |
+
}
|
| 385 |
+
}
|
| 386 |
+
</style>
|
| 387 |
</head>
|
| 388 |
+
|
| 389 |
<body>
|
| 390 |
|
| 391 |
+
<div class="ambient-bg"></div>
|
| 392 |
+
|
| 393 |
+
<div class="app-container">
|
| 394 |
+
<!-- Sidebar -->
|
| 395 |
+
<aside class="sidebar" id="sidebar">
|
| 396 |
+
<!-- Contacts -->
|
| 397 |
+
<ul class="contact-list" id="contactList">
|
| 398 |
+
<!-- Contacts generated by JS -->
|
| 399 |
+
</ul>
|
| 400 |
+
</aside>
|
| 401 |
+
|
| 402 |
+
<!-- Main Chat -->
|
| 403 |
+
<main class="chat-area">
|
| 404 |
+
<!-- Header -->
|
| 405 |
+
<header>
|
| 406 |
+
<div style="display: flex; align-items: center;">
|
| 407 |
+
<i class="fas fa-bars mobile-menu-toggle" id="menuToggle"></i>
|
| 408 |
+
<div class="chat-title">
|
| 409 |
+
<h2 id="activeChatName">Select a chat</h2>
|
| 410 |
+
<span id="activeChatStatus"></span>
|
| 411 |
+
</div>
|
| 412 |
+
</div>
|
| 413 |
+
|
| 414 |
+
<div class="branding">
|
| 415 |
+
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">Built with anycoder</a>
|
| 416 |
+
</div>
|
| 417 |
+
</header>
|
| 418 |
+
|
| 419 |
+
<!-- Messages -->
|
| 420 |
+
<div class="messages-container" id="messagesContainer">
|
| 421 |
+
<!-- Messages generated by JS -->
|
| 422 |
+
<div class="message received">
|
| 423 |
+
Hello! Select a friend to start chatting with the minimal dark glass interface.
|
| 424 |
+
</div>
|
| 425 |
+
</div>
|
| 426 |
+
|
| 427 |
+
<!-- Input -->
|
| 428 |
+
<div class="input-area">
|
| 429 |
+
<div class="input-wrapper">
|
| 430 |
+
<input type="text" id="messageInput" placeholder="Type a message..." autocomplete="off">
|
| 431 |
+
</div>
|
| 432 |
+
<button class="send-btn" id="sendBtn">
|
| 433 |
<i class="fas fa-paper-plane"></i>
|
| 434 |
</button>
|
| 435 |
+
</div>
|
| 436 |
+
</main>
|
| 437 |
+
</div>
|
| 438 |
|
| 439 |
+
<script>
|
| 440 |
+
// Data Mockup
|
| 441 |
const contacts = [
|
| 442 |
{ id: 1, name: "Alice Moore", avatar: "https://picsum.photos/seed/alice/100/100", lastMsg: "See you tomorrow!", status: "Online" },
|
| 443 |
{ id: 2, name: "Bob Smith", avatar: "https://picsum.photos/seed/bob/100/100", lastMsg: "Is the project ready?", status: "Away" },
|
|
|
|
| 451 |
{ type: 'received', text: "Hey! How are you doing?", time: "10:00 AM" },
|
| 452 |
{ type: 'sent', text: "I'm doing great, thanks! Just redesigning this UI.", time: "10:02 AM" },
|
| 453 |
{ type: 'received', text: "Oh nice, is it the glassmorphism one?", time: "10:03 AM" },
|
| 454 |
+
{ type: 'sent', text: "Yeah, making it much darker and quieter.", time: "10:05 AM" },
|
| 455 |
{ type: 'received', text: "See you tomorrow!", time: "10:06 AM" }
|
| 456 |
],
|
| 457 |
2: [
|
|
|
|
| 535 |
emptyState.style.textAlign = 'center';
|
| 536 |
emptyState.style.alignSelf = 'center';
|
| 537 |
emptyState.style.background = 'transparent';
|
| 538 |
+
emptyState.style.color = 'rgba(255, 255, 255, 0.3)';
|
| 539 |
emptyState.textContent = "Start a conversation with " + contact.name;
|
| 540 |
messagesContainerEl.appendChild(emptyState);
|
| 541 |
} else {
|
|
|
|
| 625 |
// Start App
|
| 626 |
init();
|
| 627 |
|
| 628 |
+
</script>
|
| 629 |
</body>
|
| 630 |
+
|
| 631 |
</html>
|