Spaces:
Running
Running
File size: 32,296 Bytes
a7873e1 |
1 2 3 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 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 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 |
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Íris - Seu Assistente Virtual Autônomo</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
:root {
--primary: #6366f1;
--primary-dark: #4f46e5;
--secondary: #f59e0b;
--dark: #1e293b;
--light: #f8fafc;
}
body {
font-family: 'Poppins', sans-serif;
background-color: #f1f5f9;
color: var(--dark);
}
.gradient-bg {
background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}
.chat-container {
height: calc(100vh - 180px);
scrollbar-width: thin;
scrollbar-color: var(--primary) transparent;
}
.chat-container::-webkit-scrollbar {
width: 6px;
}
.chat-container::-webkit-scrollbar-thumb {
background-color: var(--primary);
border-radius: 3px;
}
.message-bubble {
max-width: 80%;
border-radius: 1rem;
padding: 0.75rem 1rem;
margin-bottom: 0.5rem;
word-wrap: break-word;
}
.user-message {
background-color: var(--primary);
color: white;
border-bottom-right-radius: 0.25rem;
margin-left: auto;
}
.iris-message {
background-color: white;
color: var(--dark);
border-bottom-left-radius: 0.25rem;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.typing-indicator span {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background-color: var(--primary);
margin-right: 4px;
animation: bounce 1.5s infinite ease-in-out;
}
.typing-indicator span:nth-child(2) {
animation-delay: 0.2s;
}
.typing-indicator span:nth-child(3) {
animation-delay: 0.4s;
}
@keyframes bounce {
0%, 60%, 100% { transform: translateY(0); }
30% { transform: translateY(-5px); }
}
.automation-node {
background-color: white;
border-radius: 0.5rem;
padding: 0.5rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
border: 1px solid #e2e8f0;
cursor: grab;
}
.automation-node:hover {
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.automation-canvas {
background-image: linear-gradient(#e2e8f0 1px, transparent 1px),
linear-gradient(90deg, #e2e8f0 1px, transparent 1px);
background-size: 20px 20px;
background-color: #f8fafc;
}
.pulse-animation {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}
.voice-wave {
position: relative;
height: 30px;
width: 100%;
}
.voice-wave span {
position: absolute;
bottom: 0;
display: block;
width: 3px;
height: 3px;
background: var(--primary);
border-radius: 50%;
animation: voiceWave 1.5s infinite ease-in-out;
}
@keyframes voiceWave {
0%, 100% { height: 3px; }
50% { height: 15px; }
}
.voice-wave span:nth-child(1) { left: 5px; animation-delay: 0.1s; }
.voice-wave span:nth-child(2) { left: 10px; animation-delay: 0.2s; }
.voice-wave span:nth-child(3) { left: 15px; animation-delay: 0.3s; }
.voice-wave span:nth-child(4) { left: 20px; animation-delay: 0.4s; }
.voice-wave span:nth-child(5) { left: 25px; animation-delay: 0.5s; }
</style>
</head>
<body class="min-h-screen">
<div class="flex flex-col h-screen">
<!-- Header -->
<header class="gradient-bg text-white p-4 shadow-md">
<div class="container mx-auto flex justify-between items-center">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 rounded-full bg-white flex items-center justify-center">
<i class="fas fa-eye text-indigo-600 text-xl"></i>
</div>
<h1 class="text-2xl font-bold">Íris</h1>
</div>
<div class="flex items-center space-x-4">
<button id="automationBtn" class="p-2 rounded-full hover:bg-white/10 transition">
<i class="fas fa-project-diagram"></i>
</button>
<button id="settingsBtn" class="p-2 rounded-full hover:bg-white/10 transition">
<i class="fas fa-cog"></i>
</button>
<button id="memoryBtn" class="p-2 rounded-full hover:bg-white/10 transition">
<i class="fas fa-brain"></i>
</button>
</div>
</div>
</header>
<!-- Main Content -->
<main class="flex-1 flex flex-col md:flex-row overflow-hidden">
<!-- Chat Interface -->
<div id="chatInterface" class="flex-1 flex flex-col p-4">
<div class="chat-container overflow-y-auto mb-4 space-y-2" id="chatMessages">
<div class="message-bubble iris-message">
<div class="flex items-start space-x-2">
<div class="w-8 h-8 rounded-full gradient-bg flex items-center justify-center text-white">
<i class="fas fa-eye"></i>
</div>
<div>
<p class="font-medium">Íris</p>
<p>Olá! Eu sou a Íris, seu assistente virtual autônomo. Como posso te ajudar hoje?</p>
</div>
</div>
</div>
</div>
<div class="mt-auto">
<div class="flex items-center space-x-2 mb-2">
<button id="voiceInputBtn" class="p-3 rounded-full bg-indigo-100 text-indigo-600 hover:bg-indigo-200 transition">
<i class="fas fa-microphone"></i>
</button>
<div id="voiceStatus" class="hidden flex-1 bg-white p-3 rounded-lg flex items-center">
<div class="voice-wave mr-3">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
<p class="text-sm">Ouvindo... Fale agora</p>
</div>
</div>
<div class="flex space-x-2">
<input type="text" id="messageInput" placeholder="Digite sua mensagem..."
class="flex-1 p-3 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
<button id="sendMessageBtn" class="p-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition">
<i class="fas fa-paper-plane"></i>
</button>
</div>
<div class="flex justify-between mt-2 text-xs text-gray-500">
<p>Íris está usando o modelo bybeagi localmente</p>
<p id="connectionStatus" class="flex items-center">
<span class="w-2 h-2 rounded-full bg-green-500 mr-1"></span>
Modo offline
</p>
</div>
</div>
</div>
<!-- Automation Interface (Hidden by default) -->
<div id="automationInterface" class="hidden flex-1 flex flex-col p-4 bg-gray-50">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-bold text-gray-800">Automações da Íris</h2>
<div class="flex space-x-2">
<button class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition">
<i class="fas fa-plus mr-2"></i> Novo Fluxo
</button>
<button class="px-4 py-2 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition">
<i class="fas fa-save mr-2"></i> Salvar
</button>
</div>
</div>
<div class="flex-1 grid grid-cols-4 gap-4 overflow-hidden">
<div class="col-span-1 bg-white rounded-lg p-4 overflow-y-auto">
<h3 class="font-medium text-gray-700 mb-3">Componentes</h3>
<div class="space-y-2">
<div class="automation-node" draggable="true">
<div class="flex items-center space-x-2">
<div class="w-6 h-6 rounded-full bg-indigo-100 text-indigo-600 flex items-center justify-center">
<i class="fas fa-envelope text-xs"></i>
</div>
<p class="text-sm">Email</p>
</div>
</div>
<div class="automation-node" draggable="true">
<div class="flex items-center space-x-2">
<div class="w-6 h-6 rounded-full bg-blue-100 text-blue-600 flex items-center justify-center">
<i class="fas fa-calendar text-xs"></i>
</div>
<p class="text-sm">Calendário</p>
</div>
</div>
<div class="automation-node" draggable="true">
<div class="flex items-center space-x-2">
<div class="w-6 h-6 rounded-full bg-green-100 text-green-600 flex items-center justify-center">
<i class="fas fa-database text-xs"></i>
</div>
<p class="text-sm">Banco de Dados</p>
</div>
</div>
<div class="automation-node" draggable="true">
<div class="flex items-center space-x-2">
<div class="w-6 h-6 rounded-full bg-yellow-100 text-yellow-600 flex items-center justify-center">
<i class="fas fa-code text-xs"></i>
</div>
<p class="text-sm">Executar Código</p>
</div>
</div>
<div class="automation-node" draggable="true">
<div class="flex items-center space-x-2">
<div class="w-6 h-6 rounded-full bg-red-100 text-red-600 flex items-center justify-center">
<i class="fas fa-file-alt text-xs"></i>
</div>
<p class="text-sm">Documento</p>
</div>
</div>
<div class="automation-node" draggable="true">
<div class="flex items-center space-x-2">
<div class="w-6 h-6 rounded-full bg-purple-100 text-purple-600 flex items-center justify-center">
<i class="fas fa-globe text-xs"></i>
</div>
<p class="text-sm">HTTP Request</p>
</div>
</div>
</div>
</div>
<div class="col-span-3 automation-canvas rounded-lg p-4 overflow-auto relative">
<div class="w-full h-full flex items-center justify-center text-gray-400">
<p>Arraste componentes aqui para criar seu fluxo de automação</p>
</div>
</div>
</div>
</div>
<!-- Settings Panel (Hidden by default) -->
<div id="settingsPanel" class="hidden w-80 bg-white border-l border-gray-200 p-4 overflow-y-auto">
<h2 class="text-xl font-bold text-gray-800 mb-4">Configurações da Íris</h2>
<div class="space-y-6">
<div>
<h3 class="font-medium text-gray-700 mb-2">Personalidade</h3>
<div class="space-y-3">
<div>
<label class="block text-sm text-gray-600 mb-1">Estilo de Linguagem</label>
<select class="w-full p-2 border border-gray-300 rounded-lg">
<option>Formal</option>
<option selected>Amigável</option>
<option>Técnico</option>
<option>Descontraído</option>
</select>
</div>
<div>
<label class="block text-sm text-gray-600 mb-1">Tom de Voz</label>
<select class="w-full p-2 border border-gray-300 rounded-lg">
<option>Neutro</option>
<option selected>Calmo</option>
<option>Enérgico</option>
<option>Empático</option>
</select>
</div>
</div>
</div>
<div>
<h3 class="font-medium text-gray-700 mb-2">Aprendizado</h3>
<div class="space-y-3">
<div class="flex items-center justify-between">
<label class="text-sm text-gray-600">Aprendizado Contínuo</label>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked>
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-indigo-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600"></div>
</label>
</div>
<div class="flex items-center justify-between">
<label class="text-sm text-gray-600">Memória Vetorial</label>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer" checked>
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-indigo-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600"></div>
</label>
</div>
</div>
</div>
<div>
<h3 class="font-medium text-gray-700 mb-2">Modelo Local</h3>
<div class="space-y-3">
<div>
<label class="block text-sm text-gray-600 mb-1">Modelo</label>
<select class="w-full p-2 border border-gray-300 rounded-lg">
<option selected>bybeagi (padrão)</option>
<option>bybeagi-lite</option>
<option>bybeagi-pro</option>
</select>
</div>
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-xs text-gray-500">Uso de memória: <span class="font-medium">1.2GB/2GB</span></p>
<div class="w-full bg-gray-200 rounded-full h-2 mt-1">
<div class="bg-indigo-600 h-2 rounded-full" style="width: 60%"></div>
</div>
</div>
</div>
</div>
<div>
<h3 class="font-medium text-gray-700 mb-2">Exportar/Importar</h3>
<div class="space-y-2">
<button class="w-full py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition">
<i class="fas fa-file-export mr-2"></i> Exportar Perfil
</button>
<button class="w-full py-2 bg-white border border-gray-300 rounded-lg hover:bg-gray-50 transition">
<i class="fas fa-file-import mr-2"></i> Importar Perfil
</button>
</div>
</div>
</div>
</div>
<!-- Memory Panel (Hidden by default) -->
<div id="memoryPanel" class="hidden w-80 bg-white border-l border-gray-200 p-4 overflow-y-auto">
<h2 class="text-xl font-bold text-gray-800 mb-4">Memória da Íris</h2>
<div class="space-y-4">
<div>
<h3 class="font-medium text-gray-700 mb-2">Preferências</h3>
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm text-gray-600">Você prefere respostas curtas e diretas</p>
<p class="text-sm text-gray-600">Gosta de ser lembrado sobre reuniões 15 minutos antes</p>
<p class="text-sm text-gray-600">Prefere trabalhar com Python para automações</p>
</div>
</div>
<div>
<h3 class="font-medium text-gray-700 mb-2">Rotinas</h3>
<div class="space-y-2">
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm font-medium text-gray-700">Manhã</p>
<p class="text-xs text-gray-600">- Verificar emails importantes</p>
<p class="text-xs text-gray-600">- Revisar agenda do dia</p>
</div>
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-sm font-medium text-gray-700">Noite</p>
<p class="text-xs text-gray-600">- Fazer backup dos documentos</p>
<p class="text-xs text-gray-600">- Preparar lista de tarefas para o dia seguinte</p>
</div>
</div>
</div>
<div>
<h3 class="font-medium text-gray-700 mb-2">Histórico Recente</h3>
<div class="space-y-2">
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-xs text-gray-500">Hoje, 10:30</p>
<p class="text-sm text-gray-600">Você pediu para criar um script Python para organizar arquivos</p>
</div>
<div class="bg-gray-50 p-3 rounded-lg">
<p class="text-xs text-gray-500">Ontem, 18:45</p>
<p class="text-sm text-gray-600">Você pesquisou sobre modelos de NLP locais</p>
</div>
</div>
</div>
<button class="w-full py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition mt-4">
<i class="fas fa-eraser mr-2"></i> Limpar Memória
</button>
</div>
</div>
</main>
</div>
<script>
// Toggle between interfaces
document.getElementById('automationBtn').addEventListener('click', function() {
document.getElementById('chatInterface').classList.toggle('hidden');
document.getElementById('automationInterface').classList.toggle('hidden');
document.getElementById('settingsPanel').classList.add('hidden');
document.getElementById('memoryPanel').classList.add('hidden');
});
document.getElementById('settingsBtn').addEventListener('click', function() {
document.getElementById('settingsPanel').classList.toggle('hidden');
document.getElementById('memoryPanel').classList.add('hidden');
});
document.getElementById('memoryBtn').addEventListener('click', function() {
document.getElementById('memoryPanel').classList.toggle('hidden');
document.getElementById('settingsPanel').classList.add('hidden');
});
// Chat functionality
const messageInput = document.getElementById('messageInput');
const sendMessageBtn = document.getElementById('sendMessageBtn');
const chatMessages = document.getElementById('chatMessages');
function sendMessage() {
const message = messageInput.value.trim();
if (message === '') return;
// Add user message
const userMessageDiv = document.createElement('div');
userMessageDiv.className = 'message-bubble user-message';
userMessageDiv.innerHTML = `
<div class="flex items-start space-x-2 justify-end">
<div>
<p class="text-right">${message}</p>
</div>
<div class="w-8 h-8 rounded-full bg-gray-200 flex items-center justify-center">
<i class="fas fa-user text-gray-600"></i>
</div>
</div>
`;
chatMessages.appendChild(userMessageDiv);
// Clear input
messageInput.value = '';
// Scroll to bottom
chatMessages.scrollTop = chatMessages.scrollHeight;
// Show typing indicator
const typingIndicator = document.createElement('div');
typingIndicator.className = 'message-bubble iris-message';
typingIndicator.innerHTML = `
<div class="flex items-start space-x-2">
<div class="w-8 h-8 rounded-full gradient-bg flex items-center justify-center text-white">
<i class="fas fa-eye"></i>
</div>
<div>
<p class="font-medium">Íris</p>
<div class="typing-indicator">
<span></span>
<span></span>
<span></span>
</div>
</div>
</div>
`;
chatMessages.appendChild(typingIndicator);
chatMessages.scrollTop = chatMessages.scrollHeight;
// Simulate Iris response after delay
setTimeout(() => {
// Remove typing indicator
chatMessages.removeChild(typingIndicator);
// Add Iris response
const irisMessageDiv = document.createElement('div');
irisMessageDiv.className = 'message-bubble iris-message';
// Simple responses based on input
let response;
if (message.toLowerCase().includes('olá') || message.toLowerCase().includes('oi')) {
response = "Olá! Como posso te ajudar hoje?";
} else if (message.toLowerCase().includes('automação') || message.toLowerCase().includes('automatizar')) {
response = "Posso te ajudar a criar automações. Clique no botão de automações no canto superior direito para começar.";
} else if (message.toLowerCase().includes('configuração') || message.toLowerCase().includes('ajustar')) {
response = "Você pode personalizar minhas configurações clicando no ícone de engrenagem no topo.";
} else {
response = "Eu sou a Íris, seu assistente virtual autônomo. Posso te ajudar com automações, criação de conteúdo, organização e muito mais. Como posso ser útil?";
}
irisMessageDiv.innerHTML = `
<div class="flex items-start space-x-2">
<div class="w-8 h-8 rounded-full gradient-bg flex items-center justify-center text-white">
<i class="fas fa-eye"></i>
</div>
<div>
<p class="font-medium">Íris</p>
<p>${response}</p>
</div>
</div>
`;
chatMessages.appendChild(irisMessageDiv);
chatMessages.scrollTop = chatMessages.scrollHeight;
}, 1500);
}
sendMessageBtn.addEventListener('click', sendMessage);
messageInput.addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
sendMessage();
}
});
// Voice input functionality
const voiceInputBtn = document.getElementById('voiceInputBtn');
const voiceStatus = document.getElementById('voiceStatus');
voiceInputBtn.addEventListener('click', function() {
voiceStatus.classList.toggle('hidden');
if (!voiceStatus.classList.contains('hidden')) {
// Simulate voice recognition
setTimeout(() => {
voiceStatus.classList.add('hidden');
messageInput.value = "Crie uma automação para organizar meus arquivos";
sendMessage();
}, 3000);
}
});
// Make automation nodes draggable
document.querySelectorAll('.automation-node').forEach(node => {
node.addEventListener('dragstart', function(e) {
e.dataTransfer.setData('text/plain', node.innerHTML);
e.dataTransfer.effectAllowed = 'copy';
});
});
const automationCanvas = document.querySelector('.automation-canvas');
automationCanvas.addEventListener('dragover', function(e) {
e.preventDefault();
e.dataTransfer.dropEffect = 'copy';
});
automationCanvas.addEventListener('drop', function(e) {
e.preventDefault();
const data = e.dataTransfer.getData('text/plain');
const newNode = document.createElement('div');
newNode.className = 'automation-node absolute';
newNode.innerHTML = data;
newNode.style.left = `${e.clientX - automationCanvas.getBoundingClientRect().left - 50}px`;
newNode.style.top = `${e.clientY - automationCanvas.getBoundingClientRect().top - 20}px`;
automationCanvas.appendChild(newNode);
// Make new node draggable
newNode.addEventListener('dragstart', function(ev) {
ev.dataTransfer.setData('text/plain', newNode.innerHTML);
ev.dataTransfer.effectAllowed = 'move';
});
// Add drag functionality
let pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
newNode.onmousedown = dragMouseDown;
function dragMouseDown(e) {
e = e || window.event;
e.preventDefault();
// get the mouse cursor position at startup:
pos3 = e.clientX;
pos4 = e.clientY;
document.onmouseup = closeDragElement;
// call a function whenever the cursor moves:
document.onmousemove = elementDrag;
}
function elementDrag(e) {
e = e || window.event;
e.preventDefault();
// calculate the new cursor position:
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
// set the element's new position:
newNode.style.top = (newNode.offsetTop - pos2) + "px";
newNode.style.left = (newNode.offsetLeft - pos1) + "px";
}
function closeDragElement() {
// stop moving when mouse button is released:
document.onmouseup = null;
document.onmousemove = null;
}
});
</script>
<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=Caiobriaego/iris-py" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |