Spaces:
Running
Running
add glow wffect for orb - Follow Up Deployment
Browse files- index.html +181 -37
index.html
CHANGED
|
@@ -30,6 +30,8 @@
|
|
| 30 |
--space-gradient-alt: radial-gradient(ellipse at top left, var(--space-col), transparent),
|
| 31 |
radial-gradient(ellipse at bottom, var(--galaxy-col) 10%, transparent 60%),
|
| 32 |
radial-gradient(ellipse at bottom right, var(--bg-col), transparent);
|
|
|
|
|
|
|
| 33 |
--stars: radial-gradient(circle at 52% 54%, rgba(255, 255, 255, 0.582) 3px, transparent 4px),
|
| 34 |
radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.582) 2px, transparent 3px),
|
| 35 |
radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.582) 3px, transparent 8px),
|
|
@@ -55,9 +57,13 @@
|
|
| 55 |
radial-gradient(circle at 6% 59%, rgba(255, 255, 255, 0.336) 2px, transparent 10px),
|
| 56 |
radial-gradient(circle at 9% 57%, rgba(255, 255, 255, 0.336) 1px, transparent 2px),
|
| 57 |
radial-gradient(circle at 14% 61%, rgba(255, 255, 255, 0.336) 2px, transparent 6px);
|
| 58 |
-
|
| 59 |
-
|
|
|
|
| 60 |
border-radius: 2rem;
|
|
|
|
|
|
|
|
|
|
| 61 |
background-color: #010101;
|
| 62 |
background-image: var(--space-gradient), var(--stars);
|
| 63 |
background-size: 175% 200%;
|
|
@@ -72,8 +78,6 @@
|
|
| 72 |
z-index: 10;
|
| 73 |
cursor: grab;
|
| 74 |
user-select: none;
|
| 75 |
-
min-height: 300px;
|
| 76 |
-
min-width: 400px;
|
| 77 |
}
|
| 78 |
|
| 79 |
.heading {
|
|
@@ -237,6 +241,44 @@
|
|
| 237 |
display: inline-block;
|
| 238 |
margin-right: 0.15rem;
|
| 239 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
</style>
|
| 241 |
</head>
|
| 242 |
|
|
@@ -244,8 +286,11 @@
|
|
| 244 |
|
| 245 |
<canvas id="particleCanvas"></canvas>
|
| 246 |
|
|
|
|
|
|
|
|
|
|
| 247 |
<!-- From Uiverse.io by krokettenkoal -->
|
| 248 |
-
<div id="draggableCard" class="card relative flex flex-col min-w-0 w-full
|
| 249 |
|
| 250 |
<!-- Header -->
|
| 251 |
<header class="flex items-center justify-between px-4 py-2 border-b border-white/20">
|
|
@@ -354,11 +399,18 @@
|
|
| 354 |
</ul>
|
| 355 |
</div>
|
| 356 |
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 362 |
</div>
|
| 363 |
|
| 364 |
<!-- API Key Modal -->
|
|
@@ -410,16 +462,15 @@
|
|
| 410 |
<script>
|
| 411 |
/* ---------- DRAGGABLE & RESIZABLE CARD ---------- */
|
| 412 |
const card = document.getElementById('draggableCard');
|
| 413 |
-
const
|
| 414 |
|
| 415 |
// Dragging variables
|
| 416 |
let isDragging = false;
|
| 417 |
let isResizing = false;
|
| 418 |
-
let
|
| 419 |
-
let xOffset = 0, yOffset = 0;
|
| 420 |
|
| 421 |
// Resizing variables
|
| 422 |
-
let startWidth, startHeight, startX, startY;
|
| 423 |
|
| 424 |
const lockButton = document.getElementById('lockButton');
|
| 425 |
const lockIcon = document.getElementById('lockIcon');
|
|
@@ -427,68 +478,115 @@
|
|
| 427 |
let isLocked = false;
|
| 428 |
|
| 429 |
card.addEventListener('mousedown', dragStart);
|
| 430 |
-
|
| 431 |
document.addEventListener('mousemove', dragMove);
|
| 432 |
document.addEventListener('mouseup', dragEnd);
|
| 433 |
|
| 434 |
lockButton.addEventListener('click', () => {
|
| 435 |
isLocked = !isLocked;
|
|
|
|
| 436 |
if (isLocked) {
|
| 437 |
lockIcon.classList.add('hidden');
|
| 438 |
unlockIcon.classList.remove('hidden');
|
| 439 |
card.style.cursor = 'default';
|
| 440 |
-
|
| 441 |
} else {
|
| 442 |
lockIcon.classList.remove('hidden');
|
| 443 |
unlockIcon.classList.add('hidden');
|
| 444 |
card.style.cursor = 'grab';
|
| 445 |
-
|
| 446 |
}
|
| 447 |
});
|
| 448 |
|
| 449 |
function dragStart(e) {
|
| 450 |
if (isLocked || e.target.tagName === 'BUTTON') return;
|
| 451 |
-
|
| 452 |
-
initialX = e.clientX - xOffset;
|
| 453 |
-
initialY = e.clientY - yOffset;
|
| 454 |
|
| 455 |
-
|
| 456 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 457 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 458 |
}
|
| 459 |
|
| 460 |
function resizeStart(e) {
|
| 461 |
if (isLocked) return;
|
| 462 |
e.stopPropagation();
|
| 463 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 464 |
startX = e.clientX;
|
| 465 |
startY = e.clientY;
|
|
|
|
|
|
|
| 466 |
startWidth = parseInt(getComputedStyle(card).width, 10);
|
| 467 |
startHeight = parseInt(getComputedStyle(card).height, 10);
|
|
|
|
|
|
|
| 468 |
}
|
| 469 |
|
| 470 |
function dragMove(e) {
|
| 471 |
if (!isLocked && isDragging) {
|
| 472 |
e.preventDefault();
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
yOffset = currentY;
|
| 478 |
-
|
| 479 |
-
card.style.transform = `translate(calc(-50% + ${currentX}px), calc(-50% + ${currentY}px))`;
|
| 480 |
} else if (!isLocked && isResizing) {
|
| 481 |
e.preventDefault();
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 486 |
}
|
| 487 |
}
|
| 488 |
|
| 489 |
-
function dragEnd(
|
| 490 |
-
initialX = currentX;
|
| 491 |
-
initialY = currentY;
|
| 492 |
isDragging = false;
|
| 493 |
isResizing = false;
|
| 494 |
}
|
|
@@ -524,6 +622,16 @@
|
|
| 524 |
|
| 525 |
apiCancelBtn.addEventListener('click', () => apiModal.classList.add('hidden'));
|
| 526 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 527 |
/* ---------- CONFIG ---------- */
|
| 528 |
const CONFIG = {
|
| 529 |
particleCount: 120,
|
|
@@ -638,6 +746,42 @@
|
|
| 638 |
card.style.background = `linear-gradient(135deg, ${colour}, rgba(0,0,0,0.8))`;
|
| 639 |
}
|
| 640 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 641 |
</script>
|
| 642 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=basheer1414/aiui" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 643 |
</html>
|
|
|
|
| 30 |
--space-gradient-alt: radial-gradient(ellipse at top left, var(--space-col), transparent),
|
| 31 |
radial-gradient(ellipse at bottom, var(--galaxy-col) 10%, transparent 60%),
|
| 32 |
radial-gradient(ellipse at bottom right, var(--bg-col), transparent);
|
| 33 |
+
--default-left: 50%;
|
| 34 |
+
--default-top: 50%;
|
| 35 |
--stars: radial-gradient(circle at 52% 54%, rgba(255, 255, 255, 0.582) 3px, transparent 4px),
|
| 36 |
radial-gradient(circle at 22% 24%, rgba(255, 255, 255, 0.582) 2px, transparent 3px),
|
| 37 |
radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.582) 3px, transparent 8px),
|
|
|
|
| 57 |
radial-gradient(circle at 6% 59%, rgba(255, 255, 255, 0.336) 2px, transparent 10px),
|
| 58 |
radial-gradient(circle at 9% 57%, rgba(255, 255, 255, 0.336) 1px, transparent 2px),
|
| 59 |
radial-gradient(circle at 14% 61%, rgba(255, 255, 255, 0.336) 2px, transparent 6px);
|
| 60 |
+
width: 700px;
|
| 61 |
+
height: 700px;
|
| 62 |
+
padding: 0;
|
| 63 |
border-radius: 2rem;
|
| 64 |
+
left: var(--default-left);
|
| 65 |
+
top: var(--default-top);
|
| 66 |
+
transform: translate(-50%, -50%);
|
| 67 |
background-color: #010101;
|
| 68 |
background-image: var(--space-gradient), var(--stars);
|
| 69 |
background-size: 175% 200%;
|
|
|
|
| 78 |
z-index: 10;
|
| 79 |
cursor: grab;
|
| 80 |
user-select: none;
|
|
|
|
|
|
|
| 81 |
}
|
| 82 |
|
| 83 |
.heading {
|
|
|
|
| 241 |
display: inline-block;
|
| 242 |
margin-right: 0.15rem;
|
| 243 |
}
|
| 244 |
+
|
| 245 |
+
/* ---------- 2-D Red-Orange Glowing Orb ---------- */
|
| 246 |
+
.spinner {
|
| 247 |
+
position: absolute;
|
| 248 |
+
width: 130px;
|
| 249 |
+
height: 130px;
|
| 250 |
+
border-radius: 50%;
|
| 251 |
+
background: radial-gradient(circle at 30% 30%, #ff1a1a, #cc0000 40%, #990000 100%);
|
| 252 |
+
box-shadow:
|
| 253 |
+
0 0 30px rgba(255, 26, 26, 0.4),
|
| 254 |
+
0 0 60px rgba(255, 26, 26, 0.3),
|
| 255 |
+
0 0 90px rgba(255, 26, 26, 0.2),
|
| 256 |
+
0 0 120px rgba(255, 26, 26, 0.1),
|
| 257 |
+
inset 0 0 20px rgba(255, 255, 255, 0.3);
|
| 258 |
+
filter: blur(0.5px);
|
| 259 |
+
cursor: grab;
|
| 260 |
+
z-index: 20;
|
| 261 |
+
animation: pulseGlow 2s ease-in-out infinite;
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
@keyframes pulseGlow {
|
| 265 |
+
0%, 100% {
|
| 266 |
+
box-shadow:
|
| 267 |
+
0 0 30px rgba(255, 26, 26, 0.4),
|
| 268 |
+
0 0 60px rgba(255, 26, 26, 0.3),
|
| 269 |
+
0 0 90px rgba(255, 26, 26, 0.2),
|
| 270 |
+
0 0 120px rgba(255, 26, 26, 0.1),
|
| 271 |
+
inset 0 0 20px rgba(255, 255, 255, 0.3);
|
| 272 |
+
}
|
| 273 |
+
50% {
|
| 274 |
+
box-shadow:
|
| 275 |
+
0 0 40px rgba(255, 26, 26, 0.6),
|
| 276 |
+
0 0 80px rgba(255, 26, 26, 0.5),
|
| 277 |
+
0 0 110px rgba(255, 26, 26, 0.4),
|
| 278 |
+
0 0 150px rgba(255, 26, 26, 0.3),
|
| 279 |
+
inset 0 0 25px rgba(255, 255, 255, 0.4);
|
| 280 |
+
}
|
| 281 |
+
}
|
| 282 |
</style>
|
| 283 |
</head>
|
| 284 |
|
|
|
|
| 286 |
|
| 287 |
<canvas id="particleCanvas"></canvas>
|
| 288 |
|
| 289 |
+
<!-- 3-D Red-Orange Glowing Orb -->
|
| 290 |
+
<div id="orb" class="spinner" style="top:50%; left:50%; transform:translate(-50%,-50%);"></div>
|
| 291 |
+
|
| 292 |
<!-- From Uiverse.io by krokettenkoal -->
|
| 293 |
+
<div id="draggableCard" class="card relative flex flex-col min-w-0 w-full mx-auto !min-h-[28rem] !rounded-xl !p-0">
|
| 294 |
|
| 295 |
<!-- Header -->
|
| 296 |
<header class="flex items-center justify-between px-4 py-2 border-b border-white/20">
|
|
|
|
| 399 |
</ul>
|
| 400 |
</div>
|
| 401 |
|
| 402 |
+
<!-- Resize handles -->
|
| 403 |
+
<!-- Corners -->
|
| 404 |
+
<div class="absolute top-0 left-0 w-3 h-3 cursor-nw-resize" data-corner="nw"></div>
|
| 405 |
+
<div class="absolute top-0 right-0 w-3 h-3 cursor-ne-resize" data-corner="ne"></div>
|
| 406 |
+
<div class="absolute bottom-0 right-0 w-3 h-3 cursor-se-resize" data-corner="se"></div>
|
| 407 |
+
<div class="absolute bottom-0 left-0 w-3 h-3 cursor-sw-resize" data-corner="sw"></div>
|
| 408 |
+
|
| 409 |
+
<!-- Edges -->
|
| 410 |
+
<div class="absolute top-0 left-3 right-3 h-2 cursor-n-resize" data-edge="n"></div>
|
| 411 |
+
<div class="absolute right-0 top-3 bottom-3 w-2 cursor-e-resize" data-edge="e"></div>
|
| 412 |
+
<div class="absolute bottom-0 left-3 right-3 h-2 cursor-s-resize" data-edge="s"></div>
|
| 413 |
+
<div class="absolute left-0 top-3 bottom-3 w-2 cursor-w-resize" data-edge="w"></div>
|
| 414 |
</div>
|
| 415 |
|
| 416 |
<!-- API Key Modal -->
|
|
|
|
| 462 |
<script>
|
| 463 |
/* ---------- DRAGGABLE & RESIZABLE CARD ---------- */
|
| 464 |
const card = document.getElementById('draggableCard');
|
| 465 |
+
const resizeHandles = document.querySelectorAll('[data-corner], [data-edge]');
|
| 466 |
|
| 467 |
// Dragging variables
|
| 468 |
let isDragging = false;
|
| 469 |
let isResizing = false;
|
| 470 |
+
let startMouseX, startMouseY, startLeft, startTop;
|
|
|
|
| 471 |
|
| 472 |
// Resizing variables
|
| 473 |
+
let startWidth, startHeight, startX, startY, resizeDirection;
|
| 474 |
|
| 475 |
const lockButton = document.getElementById('lockButton');
|
| 476 |
const lockIcon = document.getElementById('lockIcon');
|
|
|
|
| 478 |
let isLocked = false;
|
| 479 |
|
| 480 |
card.addEventListener('mousedown', dragStart);
|
| 481 |
+
resizeHandles.forEach(h => h.addEventListener('mousedown', resizeStart));
|
| 482 |
document.addEventListener('mousemove', dragMove);
|
| 483 |
document.addEventListener('mouseup', dragEnd);
|
| 484 |
|
| 485 |
lockButton.addEventListener('click', () => {
|
| 486 |
isLocked = !isLocked;
|
| 487 |
+
const handles = document.querySelectorAll('[data-corner], [data-edge]');
|
| 488 |
if (isLocked) {
|
| 489 |
lockIcon.classList.add('hidden');
|
| 490 |
unlockIcon.classList.remove('hidden');
|
| 491 |
card.style.cursor = 'default';
|
| 492 |
+
handles.forEach(h => h.style.display = 'none');
|
| 493 |
} else {
|
| 494 |
lockIcon.classList.remove('hidden');
|
| 495 |
unlockIcon.classList.add('hidden');
|
| 496 |
card.style.cursor = 'grab';
|
| 497 |
+
handles.forEach(h => h.style.display = 'block');
|
| 498 |
}
|
| 499 |
});
|
| 500 |
|
| 501 |
function dragStart(e) {
|
| 502 |
if (isLocked || e.target.tagName === 'BUTTON') return;
|
|
|
|
|
|
|
|
|
|
| 503 |
|
| 504 |
+
const rect = card.getBoundingClientRect();
|
| 505 |
+
|
| 506 |
+
// Remove centering transform once at start
|
| 507 |
+
if (card.style.transform.includes('translate')) {
|
| 508 |
+
card.style.transform = 'none';
|
| 509 |
+
card.style.left = `${rect.left}px`;
|
| 510 |
+
card.style.top = `${rect.top}px`;
|
| 511 |
}
|
| 512 |
+
|
| 513 |
+
startMouseX = e.clientX;
|
| 514 |
+
startMouseY = e.clientY;
|
| 515 |
+
startLeft = parseFloat(card.style.left) || rect.left;
|
| 516 |
+
startTop = parseFloat(card.style.top) || rect.top;
|
| 517 |
+
|
| 518 |
+
isDragging = true;
|
| 519 |
}
|
| 520 |
|
| 521 |
function resizeStart(e) {
|
| 522 |
if (isLocked) return;
|
| 523 |
e.stopPropagation();
|
| 524 |
+
|
| 525 |
+
const rect = card.getBoundingClientRect();
|
| 526 |
+
// Remove centering transform once at start
|
| 527 |
+
if (card.style.transform.includes('translate')) {
|
| 528 |
+
card.style.transform = 'none';
|
| 529 |
+
card.style.left = `${rect.left}px`;
|
| 530 |
+
card.style.top = `${rect.top}px`;
|
| 531 |
+
}
|
| 532 |
+
|
| 533 |
startX = e.clientX;
|
| 534 |
startY = e.clientY;
|
| 535 |
+
startLeft = parseFloat(card.style.left) || rect.left;
|
| 536 |
+
startTop = parseFloat(card.style.top) || rect.top;
|
| 537 |
startWidth = parseInt(getComputedStyle(card).width, 10);
|
| 538 |
startHeight = parseInt(getComputedStyle(card).height, 10);
|
| 539 |
+
resizeDirection = e.target.dataset.corner || e.target.dataset.edge;
|
| 540 |
+
isResizing = true;
|
| 541 |
}
|
| 542 |
|
| 543 |
function dragMove(e) {
|
| 544 |
if (!isLocked && isDragging) {
|
| 545 |
e.preventDefault();
|
| 546 |
+
const dx = e.clientX - startMouseX;
|
| 547 |
+
const dy = e.clientY - startMouseY;
|
| 548 |
+
card.style.left = `${startLeft + dx}px`;
|
| 549 |
+
card.style.top = `${startTop + dy}px`;
|
|
|
|
|
|
|
|
|
|
| 550 |
} else if (!isLocked && isResizing) {
|
| 551 |
e.preventDefault();
|
| 552 |
+
// Remove transform-centering on first resize
|
| 553 |
+
if (card.style.transform.includes('translate')) {
|
| 554 |
+
const rect = card.getBoundingClientRect();
|
| 555 |
+
card.style.transform = 'none';
|
| 556 |
+
card.style.left = `${rect.left}px`;
|
| 557 |
+
card.style.top = `${rect.top}px`;
|
| 558 |
+
}
|
| 559 |
+
|
| 560 |
+
let newWidth = startWidth;
|
| 561 |
+
let newHeight = startHeight;
|
| 562 |
+
let newLeft = startLeft;
|
| 563 |
+
let newTop = startTop;
|
| 564 |
+
|
| 565 |
+
const dx = e.clientX - startX;
|
| 566 |
+
const dy = e.clientY - startY;
|
| 567 |
+
|
| 568 |
+
if (resizeDirection.includes('e')) newWidth = startWidth + dx;
|
| 569 |
+
if (resizeDirection.includes('w')) {
|
| 570 |
+
newWidth = startWidth - dx;
|
| 571 |
+
newLeft = startLeft + dx;
|
| 572 |
+
}
|
| 573 |
+
if (resizeDirection.includes('s')) newHeight = startHeight + dy;
|
| 574 |
+
if (resizeDirection.includes('n')) {
|
| 575 |
+
newHeight = startHeight - dy;
|
| 576 |
+
newTop = startTop + dy;
|
| 577 |
+
}
|
| 578 |
+
|
| 579 |
+
newWidth = Math.max(300, newWidth);
|
| 580 |
+
newHeight = Math.max(250, newHeight);
|
| 581 |
+
|
| 582 |
+
card.style.width = `${newWidth}px`;
|
| 583 |
+
card.style.height = `${newHeight}px`;
|
| 584 |
+
card.style.left = `${newLeft}px`;
|
| 585 |
+
card.style.top = `${newTop}px`;
|
| 586 |
}
|
| 587 |
}
|
| 588 |
|
| 589 |
+
function dragEnd() {
|
|
|
|
|
|
|
| 590 |
isDragging = false;
|
| 591 |
isResizing = false;
|
| 592 |
}
|
|
|
|
| 622 |
|
| 623 |
apiCancelBtn.addEventListener('click', () => apiModal.classList.add('hidden'));
|
| 624 |
|
| 625 |
+
// Persist current size & position as the default
|
| 626 |
+
const cardRect = card.getBoundingClientRect();
|
| 627 |
+
document.documentElement.style.setProperty('--default-left', `${cardRect.left}px`);
|
| 628 |
+
document.documentElement.style.setProperty('--default-top', `${cardRect.top}px`);
|
| 629 |
+
document.documentElement.style.setProperty('--default-width', `${cardRect.width}px`);
|
| 630 |
+
document.documentElement.style.setProperty('--default-height', `${cardRect.height}px`);
|
| 631 |
+
card.style.left = `${cardRect.left}px`;
|
| 632 |
+
card.style.top = `${cardRect.top}px`;
|
| 633 |
+
card.style.transform = 'none';
|
| 634 |
+
|
| 635 |
/* ---------- CONFIG ---------- */
|
| 636 |
const CONFIG = {
|
| 637 |
particleCount: 120,
|
|
|
|
| 746 |
card.style.background = `linear-gradient(135deg, ${colour}, rgba(0,0,0,0.8))`;
|
| 747 |
}
|
| 748 |
});
|
| 749 |
+
|
| 750 |
+
/* ---------- ORB DRAG ---------- */
|
| 751 |
+
const orb = document.getElementById('orb');
|
| 752 |
+
let orbDragging = false;
|
| 753 |
+
let orbStartX, orbStartY, orbStartLeft, orbStartTop;
|
| 754 |
+
|
| 755 |
+
orb.addEventListener('mousedown', (e) => {
|
| 756 |
+
orbDragging = true;
|
| 757 |
+
orbStartX = e.clientX;
|
| 758 |
+
orbStartY = e.clientY;
|
| 759 |
+
|
| 760 |
+
const rect = orb.getBoundingClientRect();
|
| 761 |
+
// remove centering
|
| 762 |
+
if (orb.style.transform.includes('translate')) {
|
| 763 |
+
orb.style.transform = 'none';
|
| 764 |
+
orb.style.left = `${rect.left}px`;
|
| 765 |
+
orb.style.top = `${rect.top}px`;
|
| 766 |
+
}
|
| 767 |
+
|
| 768 |
+
orbStartLeft = parseFloat(orb.style.left) || rect.left;
|
| 769 |
+
orbStartTop = parseFloat(orb.style.top) || rect.top;
|
| 770 |
+
|
| 771 |
+
e.preventDefault();
|
| 772 |
+
});
|
| 773 |
+
|
| 774 |
+
document.addEventListener('mousemove', (e) => {
|
| 775 |
+
if (!orbDragging) return;
|
| 776 |
+
const dx = e.clientX - orbStartX;
|
| 777 |
+
const dy = e.clientY - orbStartY;
|
| 778 |
+
orb.style.left = `${orbStartLeft + dx}px`;
|
| 779 |
+
orb.style.top = `${orbStartTop + dy}px`;
|
| 780 |
+
});
|
| 781 |
+
|
| 782 |
+
document.addEventListener('mouseup', () => {
|
| 783 |
+
orbDragging = false;
|
| 784 |
+
});
|
| 785 |
</script>
|
| 786 |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=basheer1414/aiui" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 787 |
</html>
|