Update index.html
Browse files- index.html +654 -653
index.html
CHANGED
|
@@ -1,661 +1,662 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
-
|
| 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 |
</head>
|
| 256 |
-
<body>
|
| 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 |
-
</button>
|
| 294 |
-
|
| 295 |
-
<button class="neu-btn" style="width: 100%; margin-top: 10px;" onclick="app.downloadResult()">
|
| 296 |
-
Download Result
|
| 297 |
-
</button>
|
| 298 |
-
</div>
|
| 299 |
-
|
| 300 |
-
<div class="status-bar">
|
| 301 |
-
<span id="statusText">Ready</span>
|
| 302 |
-
<span id="imgInfo"></span>
|
| 303 |
-
</div>
|
| 304 |
-
</aside>
|
| 305 |
-
|
| 306 |
-
<!-- Main Canvas Area -->
|
| 307 |
-
<main class="neu-panel" style="position: relative; padding: 0; overflow: hidden;">
|
| 308 |
-
<div class="canvas-wrapper" id="canvasWrapper">
|
| 309 |
-
<div class="loading-overlay" id="loader">
|
| 310 |
-
<div class="spinner"></div>
|
| 311 |
-
</div>
|
| 312 |
-
|
| 313 |
-
<!-- Base Image -->
|
| 314 |
-
<img id="canvasBaseImg" src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='800' height='600' viewBox='0 0 800 600'%3E%3Crect width='800' height='600' fill='%23eee'/%3E%3Ctext x='50%25' y='50%25' dominant-baseline='middle' text-anchor='middle' font-family='sans-serif' font-size='24' fill='%23ccc'%3EUpload an Image%3C/text%3E%3C/svg%3E" crossorigin="anonymous">
|
| 315 |
-
|
| 316 |
-
<!-- SVG Masking Overlay -->
|
| 317 |
-
<svg id="maskSvg" xmlns="http://www.w3.org/2000/svg">
|
| 318 |
-
<defs>
|
| 319 |
-
<!-- Filter to slightly distort outside areas as requested -->
|
| 320 |
-
<filter id="blurDistort" x="-20%" y="-20%" width="140%" height="140%">
|
| 321 |
-
<feGaussianBlur stdDeviation="3" result="blur" />
|
| 322 |
-
<feTurbulence type="fractalNoise" baseFrequency="0.02" numOctaves="3" result="noise" />
|
| 323 |
-
<feDisplacementMap in="SourceGraphic" in2="noise" scale="5" xChannelSelector="R" yChannelSelector="G" />
|
| 324 |
-
</filter>
|
| 325 |
-
</defs>
|
| 326 |
-
<!-- The mask path will be drawn here -->
|
| 327 |
-
<path id="maskPath" d="" fill="rgba(255, 215, 0, 0.15)" stroke="#FFD700" stroke-width="2" stroke-dasharray="5,5" />
|
| 328 |
-
<!-- Points for visual feedback -->
|
| 329 |
-
<g id="pointsGroup"></g>
|
| 330 |
-
</svg>
|
| 331 |
-
|
| 332 |
-
<!-- Hidden canvas for processing -->
|
| 333 |
-
<canvas id="processCanvas" style="display:none;"></canvas>
|
| 334 |
-
</div>
|
| 335 |
-
</main>
|
| 336 |
</div>
|
| 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 |
-
syncPointsToUI: () => {
|
| 433 |
-
const layer = state.layers[state.currentLayerIndex];
|
| 434 |
-
state.points = JSON.parse(JSON.stringify(layer.points));
|
| 435 |
-
renderingManager.drawMask();
|
| 436 |
-
}
|
| 437 |
-
};
|
| 438 |
-
|
| 439 |
-
// --- Rendering Manager ---
|
| 440 |
-
const renderingManager = {
|
| 441 |
-
drawMask: () => {
|
| 442 |
-
if (!state.imageLoaded) return;
|
| 443 |
-
|
| 444 |
-
dom.pointsGroup.innerHTML = '';
|
| 445 |
-
|
| 446 |
-
if (state.points.length === 0) {
|
| 447 |
-
dom.maskPath.setAttribute('d', '');
|
| 448 |
-
return;
|
| 449 |
-
}
|
| 450 |
-
|
| 451 |
-
// Convert percentage points to absolute SVG coordinates
|
| 452 |
-
const rect = dom.wrapper.getBoundingClientRect();
|
| 453 |
-
const imgRect = dom.img.getBoundingClientRect();
|
| 454 |
-
|
| 455 |
-
// We need coordinates relative to the SVG container
|
| 456 |
-
// Since SVG is 100% width/height of wrapper
|
| 457 |
-
const svgRect = dom.svg.getBoundingClientRect();
|
| 458 |
-
|
| 459 |
-
let pathD = `M ${state.points[0].x} ${state.points[0].y}`;
|
| 460 |
-
|
| 461 |
-
state.points.forEach((p, i) => {
|
| 462 |
-
if (i === 0) return;
|
| 463 |
-
pathD += ` L ${p.x} ${p.y}`;
|
| 464 |
-
});
|
| 465 |
-
pathD += ' Z';
|
| 466 |
-
dom.maskPath.setAttribute('d', pathD);
|
| 467 |
-
|
| 468 |
-
// Draw points
|
| 469 |
-
state.points.forEach(p => {
|
| 470 |
-
const circle = document.createElementNS("http://www.w3.org/2000/svg", "circle");
|
| 471 |
-
circle.setAttribute("cx", p.x);
|
| 472 |
-
circle.setAttribute("cy", p.y);
|
| 473 |
-
circle.setAttribute("class", "pen-point");
|
| 474 |
-
dom.pointsGroup.appendChild(circle);
|
| 475 |
-
});
|
| 476 |
-
},
|
| 477 |
-
|
| 478 |
-
updateDistortion: () => {
|
| 479 |
-
// Apply the SVG filter to the image to show the "AI sees this" effect
|
| 480 |
-
// We want to blur/distort OUTSIDE the mask.
|
| 481 |
-
// Strategy:
|
| 482 |
-
// 1. Draw image to canvas.
|
| 483 |
-
// 2. Create a path from the mask points.
|
| 484 |
-
// 3. Invert the path (create a huge rectangle with a hole).
|
| 485 |
-
// 4. Fill the outside with blurred/distorted version.
|
| 486 |
-
// Note: CSS Filter on the IMG element is easier for preview.
|
| 487 |
-
|
| 488 |
-
// If points exist, apply filter to image
|
| 489 |
-
if (state.points.length > 0) {
|
| 490 |
-
dom.img.style.filter = `url(#blurDistort)`;
|
| 491 |
-
dom.svg.style.pointerEvents = "none";
|
| 492 |
-
} else {
|
| 493 |
-
dom.img.style.filter = `none`;
|
| 494 |
-
}
|
| 495 |
-
}
|
| 496 |
-
};
|
| 497 |
-
|
| 498 |
-
// --- Core Logic ---
|
| 499 |
-
const app = {
|
| 500 |
-
init: () => {
|
| 501 |
-
// Set default layer
|
| 502 |
-
layerManager.addLayer();
|
| 503 |
-
toolManager.init();
|
| 504 |
-
|
| 505 |
-
// Load a demo image initially (optional, removes empty state)
|
| 506 |
-
// Using a placeholder service
|
| 507 |
-
dom.img.src = "https://images.unsplash.com/photo-1493612276216-ee5927377257?q=80&w=1000&auto=format&fit=crop";
|
| 508 |
-
dom.img.onload = () => {
|
| 509 |
-
state.imageLoaded = true;
|
| 510 |
-
dom.imgInfo.innerText = `${dom.img.naturalWidth}x${dom.img.naturalHeight}`;
|
| 511 |
-
dom.status.innerText = "Image loaded. Draw a mask.";
|
| 512 |
-
renderingManager.updateDistortion();
|
| 513 |
-
};
|
| 514 |
-
},
|
| 515 |
-
|
| 516 |
-
handleImageUpload: (e) => {
|
| 517 |
-
const file = e.target.files[0];
|
| 518 |
-
if (!file) return;
|
| 519 |
-
|
| 520 |
-
const reader = new FileReader();
|
| 521 |
-
reader.onload = (event) => {
|
| 522 |
-
dom.img.src = event.target.result;
|
| 523 |
-
};
|
| 524 |
-
reader.readAsDataURL(file);
|
| 525 |
-
},
|
| 526 |
-
|
| 527 |
-
submitToAI: async () => {
|
| 528 |
-
if (!state.imageLoaded) {
|
| 529 |
-
alert("Please upload an image first.");
|
| 530 |
-
return;
|
| 531 |
-
}
|
| 532 |
-
if (state.points.length < 3) {
|
| 533 |
-
alert("Please draw a closed loop (at least 3 points).");
|
| 534 |
-
return;
|
| 535 |
-
}
|
| 536 |
-
|
| 537 |
-
dom.loader.style.display = 'flex';
|
| 538 |
-
dom.status.innerText = "Sending to AI...";
|
| 539 |
-
|
| 540 |
-
// 1. Prepare the mask data
|
| 541 |
-
const layer = state.layers[state.currentLayerIndex];
|
| 542 |
-
|
| 543 |
-
// 2. Simulate API Call
|
| 544 |
-
await new Promise(r => setTimeout(r, 1500));
|
| 545 |
-
|
| 546 |
-
// 3. Mock Result:
|
| 547 |
-
// In a real app, you'd upload the image + mask coordinates.
|
| 548 |
-
// Here we simulate the result by taking the original image,
|
| 549 |
-
// applying a hue rotation to the masked area (simulating edit),
|
| 550 |
-
// and compositing it.
|
| 551 |
-
|
| 552 |
-
const resultSrc = await processImageWithMask(dom.img.src, state.points, 45);
|
| 553 |
-
|
| 554 |
-
state.aiResultSrc = resultSrc;
|
| 555 |
-
dom.status.innerText = "Edit Complete!";
|
| 556 |
-
dom.loader.style.display = 'none';
|
| 557 |
-
|
| 558 |
-
// Display result
|
| 559 |
-
dom.img.src = resultSrc;
|
| 560 |
-
|
| 561 |
-
// Save state to layer
|
| 562 |
-
layer.aiResult = resultSrc;
|
| 563 |
-
},
|
| 564 |
-
|
| 565 |
-
downloadResult: () => {
|
| 566 |
-
if (!state.aiResultSrc) {
|
| 567 |
-
alert("No edit generated yet.");
|
| 568 |
-
return;
|
| 569 |
-
}
|
| 570 |
-
const link = document.createElement('a');
|
| 571 |
-
link.download = 'edited-image.png';
|
| 572 |
-
link.href = state.aiResultSrc;
|
| 573 |
-
link.click();
|
| 574 |
-
}
|
| 575 |
-
};
|
| 576 |
-
|
| 577 |
-
// --- Event Handling ---
|
| 578 |
-
function handleCanvasClick(e) {
|
| 579 |
-
if (state.mode !== 'pen') return;
|
| 580 |
-
if (!state.imageLoaded) return;
|
| 581 |
-
|
| 582 |
-
// Get coordinates relative to the SVG/Wrapper
|
| 583 |
-
const rect = dom.wrapper.getBoundingClientRect();
|
| 584 |
-
const x = ((e.clientX - rect.left) / rect.width) * 100;
|
| 585 |
-
const y = ((e.clientY - rect.top) / rect.height) * 100;
|
| 586 |
-
|
| 587 |
-
// Limit points
|
| 588 |
-
if (state.points.length >= CONFIG.maxPoints) {
|
| 589 |
-
state.points.shift();
|
| 590 |
-
}
|
| 591 |
-
|
| 592 |
-
state.points.push({ x, y });
|
| 593 |
-
renderingManager.drawMask();
|
| 594 |
-
|
| 595 |
-
// Auto-close if close enough (optional UX improvement)
|
| 596 |
-
if (state.points.length > 2) {
|
| 597 |
-
const first = state.points[0];
|
| 598 |
-
const last = state.points[state.points.length - 1];
|
| 599 |
-
const dist = Math.hypot(first.x - last.x, first.y - last.y);
|
| 600 |
-
if (dist < 2) { // If close to start
|
| 601 |
-
// Keep it open for now, user can click "Generate"
|
| 602 |
-
}
|
| 603 |
-
}
|
| 604 |
-
}
|
| 605 |
-
|
| 606 |
-
// --- Helper: Process Image for Mock AI ---
|
| 607 |
-
function processImageWithMask(src, points, hueRotate) {
|
| 608 |
-
return new Promise((resolve) => {
|
| 609 |
-
const img = new Image();
|
| 610 |
-
img.src = src;
|
| 611 |
-
img.onload = () => {
|
| 612 |
-
const canvas = document.createElement('canvas');
|
| 613 |
-
canvas.width = img.width;
|
| 614 |
-
canvas.height = img.height;
|
| 615 |
-
const ctx = canvas.getContext('2d');
|
| 616 |
-
|
| 617 |
-
// Draw original image
|
| 618 |
-
ctx.drawImage(img, 0, 0);
|
| 619 |
-
|
| 620 |
-
// Create mask path
|
| 621 |
-
// Convert percentages back to pixels
|
| 622 |
-
const w = img.width;
|
| 623 |
-
const h = img.height;
|
| 624 |
-
|
| 625 |
-
const pxPoints = points.map(p => ({
|
| 626 |
-
x: (p.x / 100) * w,
|
| 627 |
-
y: (p.y / 100) * h
|
| 628 |
-
}));
|
| 629 |
-
|
| 630 |
-
ctx.beginPath();
|
| 631 |
-
if (pxPoints.length > 0) {
|
| 632 |
-
ctx.moveTo(pxPoints[0].x, pxPoints[0].y);
|
| 633 |
-
for (let i = 1; i < pxPoints.length; i++) {
|
| 634 |
-
ctx.lineTo(pxPoints[i].x, pxPoints[i].y);
|
| 635 |
-
}
|
| 636 |
-
}
|
| 637 |
-
ctx.closePath();
|
| 638 |
-
|
| 639 |
-
// Save state
|
| 640 |
-
ctx.save();
|
| 641 |
-
|
| 642 |
-
// Clip to mask
|
| 643 |
-
ctx.clip();
|
| 644 |
-
|
| 645 |
-
// Apply "AI Edit" - Simple Hue Rotate for demonstration
|
| 646 |
-
ctx.filter = `hue-rotate(${hueRotate}deg) contrast(1.2)`;
|
| 647 |
-
ctx.drawImage(img, 0, 0);
|
| 648 |
-
|
| 649 |
-
ctx.restore();
|
| 650 |
-
|
| 651 |
-
resolve(canvas.toDataURL());
|
| 652 |
-
};
|
| 653 |
-
});
|
| 654 |
-
}
|
| 655 |
-
|
| 656 |
-
// Start
|
| 657 |
-
window.addEventListener('DOMContentLoaded', app.init);
|
| 658 |
-
|
| 659 |
-
</script>
|
| 660 |
</body>
|
| 661 |
-
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="en">
|
| 3 |
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<meta
|
| 6 |
+
name="viewport"
|
| 7 |
+
content="width=device-width, initial-scale=1, viewport-fit=cover"
|
| 8 |
+
/>
|
| 9 |
+
<meta name="theme-color" content="#050509" />
|
| 10 |
+
<title>ZENos Boot Screen</title>
|
| 11 |
+
|
| 12 |
+
<style>
|
| 13 |
+
:root {
|
| 14 |
+
--black: #050509;
|
| 15 |
+
--deep-black: #020205;
|
| 16 |
+
--white: #ffffff;
|
| 17 |
+
--soft-white: rgba(255, 255, 255, 0.7);
|
| 18 |
+
--red: #ff254f;
|
| 19 |
+
--lava-red: #ff3048;
|
| 20 |
+
--lava-orange: #ff8a21;
|
| 21 |
+
--lava-blue: #176fff;
|
| 22 |
+
--glass: rgba(255, 255, 255, 0.085);
|
| 23 |
+
--glass-border: rgba(255, 255, 255, 0.2);
|
| 24 |
+
--safe-top: env(safe-area-inset-top, 0px);
|
| 25 |
+
--safe-bottom: env(safe-area-inset-bottom, 0px);
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
* {
|
| 29 |
+
box-sizing: border-box;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
html,
|
| 33 |
+
body {
|
| 34 |
+
width: 100%;
|
| 35 |
+
min-height: 100%;
|
| 36 |
+
margin: 0;
|
| 37 |
+
overflow: hidden;
|
| 38 |
+
background: var(--deep-black);
|
| 39 |
+
color: var(--white);
|
| 40 |
+
font-family:
|
| 41 |
+
Inter,
|
| 42 |
+
ui-sans-serif,
|
| 43 |
+
system-ui,
|
| 44 |
+
-apple-system,
|
| 45 |
+
BlinkMacSystemFont,
|
| 46 |
+
"Segoe UI",
|
| 47 |
+
sans-serif;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
body {
|
| 51 |
+
min-height: 100svh;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
button {
|
| 55 |
+
font: inherit;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.app {
|
| 59 |
+
position: relative;
|
| 60 |
+
isolation: isolate;
|
| 61 |
+
width: 100%;
|
| 62 |
+
min-height: 100svh;
|
| 63 |
+
overflow: hidden;
|
| 64 |
+
background:
|
| 65 |
+
radial-gradient(circle at 50% 20%, rgba(36, 38, 68, 0.25), transparent 45%),
|
| 66 |
+
linear-gradient(145deg, #08080d, #020205 75%);
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
/* SVG noise and distortion filters */
|
| 70 |
+
.svg-filters {
|
| 71 |
+
position: absolute;
|
| 72 |
+
width: 0;
|
| 73 |
+
height: 0;
|
| 74 |
+
pointer-events: none;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.lava-world {
|
| 78 |
+
position: absolute;
|
| 79 |
+
inset: -12%;
|
| 80 |
+
z-index: -3;
|
| 81 |
+
overflow: hidden;
|
| 82 |
+
filter: saturate(1.3) contrast(1.15);
|
| 83 |
+
transform: scale(1.08);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.lava-world::before {
|
| 87 |
+
content: "";
|
| 88 |
+
position: absolute;
|
| 89 |
+
inset: 0;
|
| 90 |
+
background:
|
| 91 |
+
radial-gradient(
|
| 92 |
+
ellipse at 30% 35%,
|
| 93 |
+
rgba(255, 42, 64, 0.9) 0%,
|
| 94 |
+
rgba(255, 42, 64, 0.5) 14%,
|
| 95 |
+
transparent 37%
|
| 96 |
+
),
|
| 97 |
+
radial-gradient(
|
| 98 |
+
ellipse at 76% 28%,
|
| 99 |
+
rgba(255, 133, 28, 0.85) 0%,
|
| 100 |
+
rgba(255, 112, 24, 0.38) 17%,
|
| 101 |
+
transparent 42%
|
| 102 |
+
),
|
| 103 |
+
radial-gradient(
|
| 104 |
+
ellipse at 61% 82%,
|
| 105 |
+
rgba(20, 104, 255, 0.88) 0%,
|
| 106 |
+
rgba(20, 104, 255, 0.34) 19%,
|
| 107 |
+
transparent 44%
|
| 108 |
+
),
|
| 109 |
+
radial-gradient(
|
| 110 |
+
ellipse at 15% 84%,
|
| 111 |
+
rgba(255, 48, 75, 0.55) 0%,
|
| 112 |
+
transparent 35%
|
| 113 |
+
);
|
| 114 |
+
filter: blur(45px) url("#lavaDistortion");
|
| 115 |
+
animation: lavaShift 18s ease-in-out infinite alternate;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.lava-world::after {
|
| 119 |
+
content: "";
|
| 120 |
+
position: absolute;
|
| 121 |
+
inset: 0;
|
| 122 |
+
background:
|
| 123 |
+
linear-gradient(
|
| 124 |
+
115deg,
|
| 125 |
+
transparent 0%,
|
| 126 |
+
rgba(255, 255, 255, 0.05) 28%,
|
| 127 |
+
transparent 52%
|
| 128 |
+
),
|
| 129 |
+
radial-gradient(
|
| 130 |
+
ellipse at center,
|
| 131 |
+
transparent 0%,
|
| 132 |
+
rgba(0, 0, 0, 0.4) 66%,
|
| 133 |
+
rgba(0, 0, 0, 0.85) 100%
|
| 134 |
+
);
|
| 135 |
+
mix-blend-mode: screen;
|
| 136 |
+
opacity: 0.65;
|
| 137 |
+
pointer-events: none;
|
| 138 |
+
}
|
| 139 |
+
|
| 140 |
+
.lava-orb {
|
| 141 |
+
position: absolute;
|
| 142 |
+
border-radius: 999px;
|
| 143 |
+
opacity: 0.75;
|
| 144 |
+
mix-blend-mode: screen;
|
| 145 |
+
filter: blur(35px) url("#lavaDistortion");
|
| 146 |
+
will-change: transform;
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
.orb-red {
|
| 150 |
+
width: 38vw;
|
| 151 |
+
height: 38vw;
|
| 152 |
+
min-width: 220px;
|
| 153 |
+
min-height: 220px;
|
| 154 |
+
left: -8vw;
|
| 155 |
+
top: 8vh;
|
| 156 |
+
background: var(--lava-red);
|
| 157 |
+
animation: orbRed 14s ease-in-out infinite alternate;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
.orb-orange {
|
| 161 |
+
width: 34vw;
|
| 162 |
+
height: 34vw;
|
| 163 |
+
min-width: 190px;
|
| 164 |
+
min-height: 190px;
|
| 165 |
+
right: -5vw;
|
| 166 |
+
top: 4vh;
|
| 167 |
+
background: var(--lava-orange);
|
| 168 |
+
animation: orbOrange 17s ease-in-out infinite alternate;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
.orb-blue {
|
| 172 |
+
width: 46vw;
|
| 173 |
+
height: 46vw;
|
| 174 |
+
min-width: 260px;
|
| 175 |
+
min-height: 260px;
|
| 176 |
+
right: 12vw;
|
| 177 |
+
bottom: -16vh;
|
| 178 |
+
background: var(--lava-blue);
|
| 179 |
+
animation: orbBlue 19s ease-in-out infinite alternate;
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
.orb-red-small {
|
| 183 |
+
width: 24vw;
|
| 184 |
+
height: 24vw;
|
| 185 |
+
min-width: 140px;
|
| 186 |
+
min-height: 140px;
|
| 187 |
+
left: 18vw;
|
| 188 |
+
bottom: 1vh;
|
| 189 |
+
background: #ff183e;
|
| 190 |
+
animation: orbSmall 12s ease-in-out infinite alternate;
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
.grain {
|
| 194 |
+
position: absolute;
|
| 195 |
+
inset: 0;
|
| 196 |
+
z-index: -1;
|
| 197 |
+
pointer-events: none;
|
| 198 |
+
opacity: 0.08;
|
| 199 |
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
|
| 200 |
+
mix-blend-mode: soft-light;
|
| 201 |
+
}
|
| 202 |
+
|
| 203 |
+
.boot-screen,
|
| 204 |
+
.login-placeholder {
|
| 205 |
+
position: absolute;
|
| 206 |
+
inset: 0;
|
| 207 |
+
display: grid;
|
| 208 |
+
place-items: center;
|
| 209 |
+
padding:
|
| 210 |
+
calc(24px + var(--safe-top))
|
| 211 |
+
22px
|
| 212 |
+
calc(24px + var(--safe-bottom));
|
| 213 |
+
transition:
|
| 214 |
+
opacity 0.7s ease,
|
| 215 |
+
transform 0.7s ease,
|
| 216 |
+
visibility 0.7s ease;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
.boot-screen {
|
| 220 |
+
opacity: 1;
|
| 221 |
+
visibility: visible;
|
| 222 |
+
transform: scale(1);
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
.login-placeholder {
|
| 226 |
+
opacity: 0;
|
| 227 |
+
visibility: hidden;
|
| 228 |
+
transform: scale(1.04);
|
| 229 |
+
pointer-events: none;
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
.app.boot-complete .boot-screen {
|
| 233 |
+
opacity: 0;
|
| 234 |
+
visibility: hidden;
|
| 235 |
+
transform: scale(0.97);
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
.app.boot-complete .login-placeholder {
|
| 239 |
+
opacity: 1;
|
| 240 |
+
visibility: visible;
|
| 241 |
+
transform: scale(1);
|
| 242 |
+
pointer-events: auto;
|
| 243 |
+
}
|
| 244 |
+
|
| 245 |
+
.glass-panel {
|
| 246 |
+
width: min(88vw, 560px);
|
| 247 |
+
min-height: min(62svh, 580px);
|
| 248 |
+
padding: clamp(34px, 8vw, 72px) clamp(24px, 7vw, 60px);
|
| 249 |
+
display: flex;
|
| 250 |
+
flex-direction: column;
|
| 251 |
+
align-items: center;
|
| 252 |
+
justify-content: center;
|
| 253 |
+
text-align: center;
|
| 254 |
+
border: 1px solid var(--glass-border);
|
| 255 |
+
border-radius: clamp(28px, 6vw, 46px);
|
| 256 |
+
background:
|
| 257 |
+
linear-gradient(
|
| 258 |
+
145deg,
|
| 259 |
+
rgba(255, 255, 255, 0.15),
|
| 260 |
+
rgba(255, 255, 255, 0.045)
|
| 261 |
+
);
|
| 262 |
+
box-shadow:
|
| 263 |
+
0 30px 100px rgba(0, 0, 0, 0.48),
|
| 264 |
+
inset 0 1px 0 rgba(255, 255, 255, 0.18),
|
| 265 |
+
inset 0 -1px 0 rgba(255, 255, 255, 0.04);
|
| 266 |
+
backdrop-filter: blur(30px) saturate(145%);
|
| 267 |
+
-webkit-backdrop-filter: blur(30px) saturate(145%);
|
| 268 |
+
}
|
| 269 |
+
|
| 270 |
+
.logo-mark {
|
| 271 |
+
position: relative;
|
| 272 |
+
width: clamp(82px, 20vw, 118px);
|
| 273 |
+
aspect-ratio: 1;
|
| 274 |
+
margin-bottom: clamp(22px, 5vw, 34px);
|
| 275 |
+
display: grid;
|
| 276 |
+
place-items: center;
|
| 277 |
+
border-radius: 31%;
|
| 278 |
+
background:
|
| 279 |
+
linear-gradient(145deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.04));
|
| 280 |
+
border: 1px solid rgba(255, 255, 255, 0.35);
|
| 281 |
+
box-shadow:
|
| 282 |
+
0 0 0 1px rgba(255, 39, 73, 0.2),
|
| 283 |
+
0 0 38px rgba(255, 37, 79, 0.42),
|
| 284 |
+
inset 0 0 30px rgba(255, 255, 255, 0.1);
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
.logo-mark::before,
|
| 288 |
+
.logo-mark::after {
|
| 289 |
+
content: "";
|
| 290 |
+
position: absolute;
|
| 291 |
+
border-radius: 50%;
|
| 292 |
+
filter: blur(3px);
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
.logo-mark::before {
|
| 296 |
+
width: 42%;
|
| 297 |
+
height: 42%;
|
| 298 |
+
background: var(--red);
|
| 299 |
+
transform: translate(-22%, -22%);
|
| 300 |
+
box-shadow: 0 0 22px var(--red);
|
| 301 |
+
}
|
| 302 |
+
|
| 303 |
+
.logo-mark::after {
|
| 304 |
+
width: 29%;
|
| 305 |
+
height: 29%;
|
| 306 |
+
background: white;
|
| 307 |
+
transform: translate(35%, 35%);
|
| 308 |
+
box-shadow: 0 0 17px white;
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
.logo-letter {
|
| 312 |
+
position: relative;
|
| 313 |
+
z-index: 1;
|
| 314 |
+
font-size: clamp(2.7rem, 12vw, 5rem);
|
| 315 |
+
font-weight: 800;
|
| 316 |
+
line-height: 1;
|
| 317 |
+
letter-spacing: -0.13em;
|
| 318 |
+
transform: translateX(-0.08em);
|
| 319 |
+
text-shadow: 0 0 24px rgba(255, 255, 255, 0.35);
|
| 320 |
+
}
|
| 321 |
+
|
| 322 |
+
.brand-name {
|
| 323 |
+
margin: 0;
|
| 324 |
+
font-size: clamp(2.1rem, 9vw, 4.4rem);
|
| 325 |
+
font-weight: 700;
|
| 326 |
+
letter-spacing: -0.075em;
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
.brand-name span {
|
| 330 |
+
color: var(--red);
|
| 331 |
+
}
|
| 332 |
+
|
| 333 |
+
.tagline {
|
| 334 |
+
margin: 14px 0 0;
|
| 335 |
+
color: var(--soft-white);
|
| 336 |
+
font-size: clamp(0.75rem, 2.8vw, 1rem);
|
| 337 |
+
letter-spacing: 0.2em;
|
| 338 |
+
text-transform: uppercase;
|
| 339 |
+
}
|
| 340 |
+
|
| 341 |
+
.boot-status {
|
| 342 |
+
width: min(100%, 300px);
|
| 343 |
+
margin-top: clamp(42px, 9vw, 72px);
|
| 344 |
+
}
|
| 345 |
+
|
| 346 |
+
.status-row {
|
| 347 |
+
display: flex;
|
| 348 |
+
justify-content: space-between;
|
| 349 |
+
gap: 16px;
|
| 350 |
+
margin-bottom: 11px;
|
| 351 |
+
color: rgba(255, 255, 255, 0.75);
|
| 352 |
+
font-size: 0.72rem;
|
| 353 |
+
letter-spacing: 0.14em;
|
| 354 |
+
text-transform: uppercase;
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
.status-message {
|
| 358 |
+
color: white;
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
.status-message::after {
|
| 362 |
+
content: "";
|
| 363 |
+
display: inline-block;
|
| 364 |
+
width: 4px;
|
| 365 |
+
height: 13px;
|
| 366 |
+
margin-left: 6px;
|
| 367 |
+
vertical-align: -2px;
|
| 368 |
+
background: var(--red);
|
| 369 |
+
animation: blink 0.85s steps(2, start) infinite;
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
.progress-track {
|
| 373 |
+
height: 4px;
|
| 374 |
+
overflow: hidden;
|
| 375 |
+
border-radius: 20px;
|
| 376 |
+
background: rgba(255, 255, 255, 0.15);
|
| 377 |
+
}
|
| 378 |
+
|
| 379 |
+
.progress-bar {
|
| 380 |
+
width: 0%;
|
| 381 |
+
height: 100%;
|
| 382 |
+
border-radius: inherit;
|
| 383 |
+
background:
|
| 384 |
+
linear-gradient(90deg, white 0%, var(--red) 68%, var(--lava-orange) 100%);
|
| 385 |
+
box-shadow: 0 0 15px rgba(255, 37, 79, 0.8);
|
| 386 |
+
transition: width 0.12s linear;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
.version {
|
| 390 |
+
position: absolute;
|
| 391 |
+
bottom: calc(20px + var(--safe-bottom));
|
| 392 |
+
color: rgba(255, 255, 255, 0.38);
|
| 393 |
+
font-size: 0.68rem;
|
| 394 |
+
letter-spacing: 0.17em;
|
| 395 |
+
text-transform: uppercase;
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
.placeholder-card {
|
| 399 |
+
width: min(88vw, 520px);
|
| 400 |
+
min-height: 280px;
|
| 401 |
+
display: grid;
|
| 402 |
+
place-items: center;
|
| 403 |
+
padding: 32px;
|
| 404 |
+
border: 1px solid var(--glass-border);
|
| 405 |
+
border-radius: 34px;
|
| 406 |
+
background: rgba(255, 255, 255, 0.08);
|
| 407 |
+
backdrop-filter: blur(28px);
|
| 408 |
+
-webkit-backdrop-filter: blur(28px);
|
| 409 |
+
text-align: center;
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
.placeholder-card p {
|
| 413 |
+
margin: 0;
|
| 414 |
+
color: rgba(255, 255, 255, 0.65);
|
| 415 |
+
letter-spacing: 0.12em;
|
| 416 |
+
text-transform: uppercase;
|
| 417 |
+
font-size: 0.75rem;
|
| 418 |
+
}
|
| 419 |
+
|
| 420 |
+
@keyframes lavaShift {
|
| 421 |
+
0% {
|
| 422 |
+
transform: translate3d(-3%, -2%, 0) scale(1);
|
| 423 |
+
}
|
| 424 |
+
50% {
|
| 425 |
+
transform: translate3d(3%, 4%, 0) scale(1.1);
|
| 426 |
+
}
|
| 427 |
+
100% {
|
| 428 |
+
transform: translate3d(-1%, 5%, 0) scale(1.04);
|
| 429 |
+
}
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
@keyframes orbRed {
|
| 433 |
+
from {
|
| 434 |
+
transform: translate3d(-5vw, 3vh, 0) scale(0.9);
|
| 435 |
+
}
|
| 436 |
+
to {
|
| 437 |
+
transform: translate3d(23vw, 19vh, 0) scale(1.35);
|
| 438 |
+
}
|
| 439 |
+
}
|
| 440 |
+
|
| 441 |
+
@keyframes orbOrange {
|
| 442 |
+
from {
|
| 443 |
+
transform: translate3d(5vw, -4vh, 0) scale(0.88);
|
| 444 |
+
}
|
| 445 |
+
to {
|
| 446 |
+
transform: translate3d(-25vw, 25vh, 0) scale(1.3);
|
| 447 |
+
}
|
| 448 |
+
}
|
| 449 |
+
|
| 450 |
+
@keyframes orbBlue {
|
| 451 |
+
from {
|
| 452 |
+
transform: translate3d(10vw, 8vh, 0) scale(0.9);
|
| 453 |
+
}
|
| 454 |
+
to {
|
| 455 |
+
transform: translate3d(-25vw, -19vh, 0) scale(1.3);
|
| 456 |
+
}
|
| 457 |
+
}
|
| 458 |
+
|
| 459 |
+
@keyframes orbSmall {
|
| 460 |
+
from {
|
| 461 |
+
transform: translate3d(-9vw, -8vh, 0) scale(0.7);
|
| 462 |
+
}
|
| 463 |
+
to {
|
| 464 |
+
transform: translate3d(28vw, -19vh, 0) scale(1.25);
|
| 465 |
+
}
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
@keyframes blink {
|
| 469 |
+
50% {
|
| 470 |
+
opacity: 0;
|
| 471 |
+
}
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
@media (max-width: 380px) {
|
| 475 |
+
.glass-panel {
|
| 476 |
+
width: 92vw;
|
| 477 |
+
min-height: 68svh;
|
| 478 |
+
padding-inline: 20px;
|
| 479 |
+
}
|
| 480 |
+
|
| 481 |
+
.tagline {
|
| 482 |
+
letter-spacing: 0.13em;
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
.boot-status {
|
| 486 |
+
margin-top: 36px;
|
| 487 |
+
}
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
@media (min-width: 600px) {
|
| 491 |
+
.glass-panel {
|
| 492 |
+
min-height: 540px;
|
| 493 |
+
}
|
| 494 |
+
}
|
| 495 |
+
|
| 496 |
+
@media (orientation: landscape) and (max-height: 600px) {
|
| 497 |
+
.glass-panel {
|
| 498 |
+
min-height: 88svh;
|
| 499 |
+
padding-block: 24px;
|
| 500 |
+
}
|
| 501 |
+
|
| 502 |
+
.logo-mark {
|
| 503 |
+
width: 72px;
|
| 504 |
+
margin-bottom: 14px;
|
| 505 |
+
}
|
| 506 |
+
|
| 507 |
+
.brand-name {
|
| 508 |
+
font-size: 2.4rem;
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
.boot-status {
|
| 512 |
+
margin-top: 26px;
|
| 513 |
+
}
|
| 514 |
+
}
|
| 515 |
+
|
| 516 |
+
@media (prefers-reduced-motion: reduce) {
|
| 517 |
+
.lava-world::before,
|
| 518 |
+
.lava-orb,
|
| 519 |
+
.status-message::after {
|
| 520 |
+
animation: none;
|
| 521 |
+
}
|
| 522 |
+
|
| 523 |
+
.progress-bar,
|
| 524 |
+
.boot-screen,
|
| 525 |
+
.login-placeholder {
|
| 526 |
+
transition: none;
|
| 527 |
+
}
|
| 528 |
+
}
|
| 529 |
+
</style>
|
| 530 |
</head>
|
|
|
|
| 531 |
|
| 532 |
+
<body>
|
| 533 |
+
<main class="app" id="app">
|
| 534 |
+
<!-- SVG filters used by the animated lava background -->
|
| 535 |
+
<svg class="svg-filters" aria-hidden="true">
|
| 536 |
+
<filter id="lavaDistortion" x="-20%" y="-20%" width="140%" height="140%">
|
| 537 |
+
<feTurbulence
|
| 538 |
+
type="fractalNoise"
|
| 539 |
+
baseFrequency="0.008 0.018"
|
| 540 |
+
numOctaves="3"
|
| 541 |
+
seed="8"
|
| 542 |
+
result="noise"
|
| 543 |
+
>
|
| 544 |
+
<animate
|
| 545 |
+
attributeName="baseFrequency"
|
| 546 |
+
dur="16s"
|
| 547 |
+
values="0.008 0.018;0.016 0.009;0.008 0.018"
|
| 548 |
+
repeatCount="indefinite"
|
| 549 |
+
/>
|
| 550 |
+
</feTurbulence>
|
| 551 |
+
|
| 552 |
+
<feDisplacementMap
|
| 553 |
+
in="SourceGraphic"
|
| 554 |
+
in2="noise"
|
| 555 |
+
scale="90"
|
| 556 |
+
xChannelSelector="R"
|
| 557 |
+
yChannelSelector="B"
|
| 558 |
+
/>
|
| 559 |
+
</filter>
|
| 560 |
+
</svg>
|
| 561 |
+
|
| 562 |
+
<div class="lava-world" aria-hidden="true">
|
| 563 |
+
<div class="lava-orb orb-red"></div>
|
| 564 |
+
<div class="lava-orb orb-orange"></div>
|
| 565 |
+
<div class="lava-orb orb-blue"></div>
|
| 566 |
+
<div class="lava-orb orb-red-small"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 567 |
</div>
|
| 568 |
|
| 569 |
+
<div class="grain" aria-hidden="true"></div>
|
| 570 |
+
|
| 571 |
+
<!-- Boot screen -->
|
| 572 |
+
<section class="boot-screen" aria-label="ZENos boot screen">
|
| 573 |
+
<div class="glass-panel">
|
| 574 |
+
<div class="logo-mark" aria-hidden="true">
|
| 575 |
+
<span class="logo-letter">Z</span>
|
| 576 |
+
</div>
|
| 577 |
+
|
| 578 |
+
<h1 class="brand-name">ZEN<span>os</span></h1>
|
| 579 |
+
<p class="tagline">A calmer way forward</p>
|
| 580 |
+
|
| 581 |
+
<div class="boot-status">
|
| 582 |
+
<div class="status-row">
|
| 583 |
+
<span class="status-message" id="statusMessage">
|
| 584 |
+
Initializing system
|
| 585 |
+
</span>
|
| 586 |
+
<span id="progressValue">0%</span>
|
| 587 |
+
</div>
|
| 588 |
+
|
| 589 |
+
<div
|
| 590 |
+
class="progress-track"
|
| 591 |
+
role="progressbar"
|
| 592 |
+
aria-label="System boot progress"
|
| 593 |
+
aria-valuemin="0"
|
| 594 |
+
aria-valuemax="100"
|
| 595 |
+
aria-valuenow="0"
|
| 596 |
+
>
|
| 597 |
+
<div class="progress-bar" id="progressBar"></div>
|
| 598 |
+
</div>
|
| 599 |
+
</div>
|
| 600 |
+
</div>
|
| 601 |
+
|
| 602 |
+
<div class="version">ZENos • Core 01.00.00</div>
|
| 603 |
+
</section>
|
| 604 |
+
|
| 605 |
+
<!-- Login page placeholder only -->
|
| 606 |
+
<section class="login-placeholder" aria-label="Login page placeholder">
|
| 607 |
+
<div class="placeholder-card">
|
| 608 |
+
<p>Login interface goes here</p>
|
| 609 |
+
</div>
|
| 610 |
+
</section>
|
| 611 |
+
</main>
|
| 612 |
+
|
| 613 |
+
<script>
|
| 614 |
+
const app = document.getElementById("app");
|
| 615 |
+
const progressBar = document.getElementById("progressBar");
|
| 616 |
+
const progressValue = document.getElementById("progressValue");
|
| 617 |
+
const statusMessage = document.getElementById("statusMessage");
|
| 618 |
+
const progressTrack = document.querySelector('[role="progressbar"]');
|
| 619 |
+
|
| 620 |
+
const bootStages = [
|
| 621 |
+
{ progress: 14, message: "Initializing system" },
|
| 622 |
+
{ progress: 31, message: "Loading visual core" },
|
| 623 |
+
{ progress: 52, message: "Warming light engine" },
|
| 624 |
+
{ progress: 74, message: "Mounting ZENos shell" },
|
| 625 |
+
{ progress: 91, message: "Preparing workspace" },
|
| 626 |
+
{ progress: 100, message: "System ready" }
|
| 627 |
+
];
|
| 628 |
+
|
| 629 |
+
const reducedMotion = window.matchMedia(
|
| 630 |
+
"(prefers-reduced-motion: reduce)"
|
| 631 |
+
).matches;
|
| 632 |
+
|
| 633 |
+
let currentStage = 0;
|
| 634 |
+
|
| 635 |
+
function updateBootScreen() {
|
| 636 |
+
const stage = bootStages[currentStage];
|
| 637 |
+
|
| 638 |
+
progressBar.style.width = `${stage.progress}%`;
|
| 639 |
+
progressValue.textContent = `${stage.progress}%`;
|
| 640 |
+
statusMessage.textContent = stage.message;
|
| 641 |
+
progressTrack.setAttribute("aria-valuenow", stage.progress);
|
| 642 |
+
|
| 643 |
+
if (currentStage < bootStages.length - 1) {
|
| 644 |
+
currentStage++;
|
| 645 |
+
|
| 646 |
+
window.setTimeout(
|
| 647 |
+
updateBootScreen,
|
| 648 |
+
reducedMotion ? 220 : 520 + Math.random() * 340
|
| 649 |
+
);
|
| 650 |
+
} else {
|
| 651 |
+
window.setTimeout(() => {
|
| 652 |
+
app.classList.add("boot-complete");
|
| 653 |
+
}, reducedMotion ? 300 : 900);
|
| 654 |
+
}
|
| 655 |
+
}
|
| 656 |
+
|
| 657 |
+
window.addEventListener("load", () => {
|
| 658 |
+
window.setTimeout(updateBootScreen, reducedMotion ? 100 : 500);
|
| 659 |
+
});
|
| 660 |
+
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 661 |
</body>
|
| 662 |
+
</html>
|