Download index.html from AhBoh/win: direct link, hf CLI and curl.
- Browser
- Download file 28.2 kB
-
https://huggingface.co/spaces/AhBoh/win/resolve/main/index.html
- Command line
-
hf download hf://spaces/AhBoh/win/index.html
-
curl -L -o index.html https://huggingface.co/spaces/AhBoh/win/resolve/main/index.html
28.2 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Windows XP Emulator</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=Tahoma:wght@400;700&display=swap'); | |
| body { | |
| font-family: 'Tahoma', sans-serif; | |
| overflow: hidden; | |
| background-color: #018281; | |
| user-select: none; | |
| } | |
| .window { | |
| position: absolute; | |
| min-width: 300px; | |
| min-height: 200px; | |
| background-color: #ece9d8; | |
| border: 3px solid; | |
| border-top-color: #ffffff; | |
| border-left-color: #ffffff; | |
| border-right-color: #808080; | |
| border-bottom-color: #808080; | |
| box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3); | |
| z-index: 10; | |
| display: none; | |
| } | |
| .window-header { | |
| background: linear-gradient(90deg, #000080, #1084d0); | |
| color: white; | |
| padding: 3px 5px; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| cursor: move; | |
| } | |
| .window-content { | |
| padding: 10px; | |
| height: calc(100% - 60px); | |
| overflow-y: auto; | |
| } | |
| .window-footer { | |
| position: absolute; | |
| bottom: 0; | |
| width: 100%; | |
| height: 30px; | |
| background-color: #ece9d8; | |
| border-top: 2px solid #808080; | |
| display: flex; | |
| align-items: center; | |
| padding: 0 10px; | |
| font-size: 12px; | |
| } | |
| .desktop-icon { | |
| width: 70px; | |
| margin: 10px; | |
| text-align: center; | |
| cursor: pointer; | |
| color: white; | |
| text-shadow: 1px 1px 1px black; | |
| } | |
| .desktop-icon img { | |
| width: 48px; | |
| height: 48px; | |
| margin-bottom: 5px; | |
| } | |
| .start-menu { | |
| position: absolute; | |
| bottom: 30px; | |
| left: 0; | |
| width: 300px; | |
| background-color: #ece9d8; | |
| border: 3px solid; | |
| border-top-color: #ffffff; | |
| border-left-color: #ffffff; | |
| border-right-color: #808080; | |
| border-bottom-color: #808080; | |
| display: none; | |
| z-index: 100; | |
| } | |
| .start-header { | |
| background: linear-gradient(90deg, #000080, #1084d0); | |
| color: white; | |
| padding: 5px; | |
| font-weight: bold; | |
| } | |
| .start-content { | |
| display: flex; | |
| height: 300px; | |
| } | |
| .start-left { | |
| width: 40px; | |
| background: linear-gradient(180deg, #000080, #1084d0); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| color: white; | |
| writing-mode: vertical-rl; | |
| text-orientation: mixed; | |
| font-weight: bold; | |
| } | |
| .start-right { | |
| flex: 1; | |
| padding: 10px; | |
| } | |
| .start-item { | |
| display: flex; | |
| align-items: center; | |
| padding: 5px; | |
| cursor: pointer; | |
| } | |
| .start-item:hover { | |
| background-color: #316ac5; | |
| color: white; | |
| } | |
| .start-item i { | |
| margin-right: 10px; | |
| font-size: 20px; | |
| } | |
| .taskbar { | |
| position: fixed; | |
| bottom: 0; | |
| left: 0; | |
| right: 0; | |
| height: 30px; | |
| background-color: #ece9d8; | |
| border-top: 2px solid white; | |
| display: flex; | |
| align-items: center; | |
| z-index: 1000; | |
| } | |
| .start-button { | |
| height: 100%; | |
| padding: 0 10px; | |
| display: flex; | |
| align-items: center; | |
| background: linear-gradient(180deg, #18bb00, #0a7d00); | |
| color: white; | |
| font-weight: bold; | |
| border-right: 1px solid #0a7d00; | |
| cursor: pointer; | |
| } | |
| .start-button:hover { | |
| background: linear-gradient(180deg, #0a7d00, #18bb00); | |
| } | |
| .taskbar-items { | |
| display: flex; | |
| height: 100%; | |
| align-items: center; | |
| margin-left: 10px; | |
| } | |
| .taskbar-item { | |
| height: 22px; | |
| padding: 0 10px; | |
| margin-right: 5px; | |
| background: linear-gradient(180deg, #ece9d8, #b5b5b5); | |
| border: 1px solid #808080; | |
| display: flex; | |
| align-items: center; | |
| cursor: pointer; | |
| } | |
| .taskbar-item.active { | |
| background: linear-gradient(180deg, #316ac5, #6b9ce8); | |
| color: white; | |
| } | |
| .clock { | |
| position: absolute; | |
| right: 5px; | |
| font-size: 12px; | |
| color: black; | |
| } | |
| .icon-label { | |
| font-size: 12px; | |
| word-break: break-word; | |
| } | |
| .active-window { | |
| z-index: 20; | |
| } | |
| .window-controls { | |
| display: flex; | |
| } | |
| .window-control { | |
| width: 22px; | |
| height: 22px; | |
| margin-left: 2px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 12px; | |
| background-color: #ece9d8; | |
| border: 1px solid #808080; | |
| cursor: pointer; | |
| } | |
| .window-control:hover { | |
| background-color: #c0c0c0; | |
| } | |
| .resize-handle { | |
| position: absolute; | |
| width: 10px; | |
| height: 10px; | |
| right: 0; | |
| bottom: 0; | |
| cursor: nwse-resize; | |
| } | |
| .bliss-bg { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background-image: url('https://i.imgur.com/5QzTo7V.jpg'); | |
| background-size: cover; | |
| background-position: center; | |
| z-index: -1; | |
| } | |
| .desktop-icons { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 30px; | |
| display: flex; | |
| flex-direction: column; | |
| flex-wrap: wrap; | |
| align-content: flex-start; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="bliss-bg"></div> | |
| <div class="desktop-icons"> | |
| <div class="desktop-icon" onclick="openWindow('my-computer')"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/computer_explorer-4.png" alt="My Computer"> | |
| <div class="icon-label">My Computer</div> | |
| </div> | |
| <div class="desktop-icon" onclick="openWindow('my-documents')"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/directory_open_file_mydocs-4.png" alt="My Documents"> | |
| <div class="icon-label">My Documents</div> | |
| </div> | |
| <div class="desktop-icon" onclick="openWindow('internet-explorer')"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/msie1-4.png" alt="Internet Explorer"> | |
| <div class="icon-label">Internet Explorer</div> | |
| </div> | |
| <div class="desktop-icon" onclick="openWindow('recycle-bin')"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/recycle_bin_empty-4.png" alt="Recycle Bin"> | |
| <div class="icon-label">Recycle Bin</div> | |
| </div> | |
| </div> | |
| <!-- My Computer Window --> | |
| <div id="my-computer" class="window" style="width: 500px; height: 400px; top: 100px; left: 100px;"> | |
| <div class="window-header"> | |
| <div>My Computer</div> | |
| <div class="window-controls"> | |
| <div class="window-control" onclick="minimizeWindow('my-computer')">_</div> | |
| <div class="window-control" onclick="maximizeWindow('my-computer')">□</div> | |
| <div class="window-control" onclick="closeWindow('my-computer')">X</div> | |
| </div> | |
| </div> | |
| <div class="window-content"> | |
| <div class="p-4"> | |
| <div class="flex flex-wrap"> | |
| <div class="w-1/4 p-2 text-center cursor-pointer" onclick="openWindow('local-disk-c')"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/drive-4.png" alt="Local Disk (C:)"> | |
| <div>Local Disk (C:)</div> | |
| </div> | |
| <div class="w-1/4 p-2 text-center cursor-pointer" onclick="openWindow('cd-drive')"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/cd_drive-0.png" alt="CD Drive (D:)"> | |
| <div>CD Drive (D:)</div> | |
| </div> | |
| <div class="w-1/4 p-2 text-center cursor-pointer"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/network_normal_two_pcs-4.png" alt="Network"> | |
| <div>Network</div> | |
| </div> | |
| <div class="w-1/4 p-2 text-center cursor-pointer"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/control_panel_users-4.png" alt="Control Panel"> | |
| <div>Control Panel</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="window-footer"> | |
| <div>3 objects</div> | |
| </div> | |
| <div class="resize-handle" onmousedown="startResize(event, 'my-computer')"></div> | |
| </div> | |
| <!-- Local Disk C Window --> | |
| <div id="local-disk-c" class="window" style="width: 500px; height: 400px; top: 150px; left: 150px;"> | |
| <div class="window-header"> | |
| <div>Local Disk (C:)</div> | |
| <div class="window-controls"> | |
| <div class="window-control" onclick="minimizeWindow('local-disk-c')">_</div> | |
| <div class="window-control" onclick="maximizeWindow('local-disk-c')">□</div> | |
| <div class="window-control" onclick="closeWindow('local-disk-c')">X</div> | |
| </div> | |
| </div> | |
| <div class="window-content"> | |
| <div class="p-4"> | |
| <div class="flex flex-wrap"> | |
| <div class="w-1/4 p-2 text-center cursor-pointer"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/folder_closed-4.png" alt="Documents and Settings"> | |
| <div>Documents and Settings</div> | |
| </div> | |
| <div class="w-1/4 p-2 text-center cursor-pointer"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/folder_closed-4.png" alt="Program Files"> | |
| <div>Program Files</div> | |
| </div> | |
| <div class="w-1/4 p-2 text-center cursor-pointer"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/folder_closed-4.png" alt="Windows"> | |
| <div>Windows</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="window-footer"> | |
| <div>3 objects</div> | |
| </div> | |
| <div class="resize-handle" onmousedown="startResize(event, 'local-disk-c')"></div> | |
| </div> | |
| <!-- CD Drive Window --> | |
| <div id="cd-drive" class="window" style="width: 500px; height: 400px; top: 200px; left: 200px;"> | |
| <div class="window-header"> | |
| <div>CD Drive (D:)</div> | |
| </div> | |
| <div class="window-content flex items-center justify-center"> | |
| <div class="text-center"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/cd_drive-0.png" alt="CD Drive" class="mx-auto mb-4" style="width: 100px;"> | |
| <div>Please insert a disk into drive D:.</div> | |
| </div> | |
| </div> | |
| <div class="window-footer"> | |
| <div>0 objects</div> | |
| </div> | |
| </div> | |
| <!-- Internet Explorer Window --> | |
| <div id="internet-explorer" class="window" style="width: 600px; height: 450px; top: 120px; left: 120px;"> | |
| <div class="window-header"> | |
| <div>Internet Explorer</div> | |
| <div class="window-controls"> | |
| <div class="window-control" onclick="minimizeWindow('internet-explorer')">_</div> | |
| <div class="window-control" onclick="maximizeWindow('internet-explorer')">□</div> | |
| <div class="window-control" onclick="closeWindow('internet-explorer')">X</div> | |
| </div> | |
| </div> | |
| <div class="window-content bg-white"> | |
| <div class="p-2 border-b flex"> | |
| <button class="px-2 border mr-1">Back</button> | |
| <button class="px-2 border mr-1">Forward</button> | |
| <button class="px-2 border mr-1">Stop</button> | |
| <button class="px-2 border mr-1">Refresh</button> | |
| <button class="px-2 border mr-1">Home</button> | |
| <input type="text" value="http://www.msn.com/" class="border flex-grow px-2"> | |
| <button class="px-2 border ml-1">Go</button> | |
| </div> | |
| <div class="p-4 text-center"> | |
| <img src="https://i.imgur.com/5QzTo7V.jpg" alt="Bliss" class="mx-auto mb-4" style="max-width: 100%;"> | |
| <h2 class="text-xl font-bold mb-2">Welcome to Internet Explorer</h2> | |
| <p>This is a simulation of Windows XP's Internet Explorer.</p> | |
| </div> | |
| </div> | |
| <div class="window-footer"> | |
| <div>Done</div> | |
| </div> | |
| <div class="resize-handle" onmousedown="startResize(event, 'internet-explorer')"></div> | |
| </div> | |
| <!-- Recycle Bin Window --> | |
| <div id="recycle-bin" class="window" style="width: 500px; height: 400px; top: 180px; left: 180px;"> | |
| <div class="window-header"> | |
| <div>Recycle Bin</div> | |
| <div class="window-controls"> | |
| <div class="window-control" onclick="minimizeWindow('recycle-bin')">_</div> | |
| <div class="window-control" onclick="maximizeWindow('recycle-bin')">□</div> | |
| <div class="window-control" onclick="closeWindow('recycle-bin')">X</div> | |
| </div> | |
| </div> | |
| <div class="window-content"> | |
| <div class="p-4 text-center"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/recycle_bin_empty-4.png" alt="Recycle Bin" class="mx-auto mb-4" style="width: 100px;"> | |
| <p>The Recycle Bin is empty.</p> | |
| </div> | |
| </div> | |
| <div class="window-footer"> | |
| <div>0 objects</div> | |
| </div> | |
| <div class="resize-handle" onmousedown="startResize(event, 'recycle-bin')"></div> | |
| </div> | |
| <!-- My Documents Window --> | |
| <div id="my-documents" class="window" style="width: 500px; height: 400px; top: 150px; left: 150px;"> | |
| <div class="window-header"> | |
| <div>My Documents</div> | |
| <div class="window-controls"> | |
| <div class="window-control" onclick="minimizeWindow('my-documents')">_</div> | |
| <div class="window-control" onclick="maximizeWindow('my-documents')">□</div> | |
| <div class="window-control" onclick="closeWindow('my-documents')">X</div> | |
| </div> | |
| </div> | |
| <div class="window-content"> | |
| <div class="p-4"> | |
| <div class="flex flex-wrap"> | |
| <div class="w-1/4 p-2 text-center cursor-pointer"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/folder_closed-4.png" alt="My Music"> | |
| <div>My Music</div> | |
| </div> | |
| <div class="w-1/4 p-2 text-center cursor-pointer"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/folder_closed-4.png" alt="My Pictures"> | |
| <div>My Pictures</div> | |
| </div> | |
| <div class="w-1/4 p-2 text-center cursor-pointer"> | |
| <img src="https://win98icons.alexmeub.com/icons/png/folder_closed-4.png" alt="My Videos"> | |
| <div>My Videos</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="window-footer"> | |
| <div>3 objects</div> | |
| </div> | |
| <div class="resize-handle" onmousedown="startResize(event, 'my-documents')"></div> | |
| </div> | |
| <!-- Start Menu --> | |
| <div id="start-menu" class="start-menu"> | |
| <div class="start-header"> | |
| <div>Welcome to Windows XP</div> | |
| </div> | |
| <div class="start-content"> | |
| <div class="start-left">Windows XP</div> | |
| <div class="start-right"> | |
| <div class="start-item" onclick="openWindow('internet-explorer')"> | |
| <i class="fas fa-globe"></i> | |
| <div>Internet Explorer</div> | |
| </div> | |
| <div class="start-item" onclick="openWindow('my-documents')"> | |
| <i class="fas fa-folder"></i> | |
| <div>My Documents</div> | |
| </div> | |
| <div class="start-item" onclick="openWindow('my-computer')"> | |
| <i class="fas fa-desktop"></i> | |
| <div>My Computer</div> | |
| </div> | |
| <div class="start-item"> | |
| <i class="fas fa-music"></i> | |
| <div>Windows Media Player</div> | |
| </div> | |
| <div class="start-item"> | |
| <i class="fas fa-gamepad"></i> | |
| <div>Games</div> | |
| </div> | |
| <div class="start-item"> | |
| <i class="fas fa-cog"></i> | |
| <div>Control Panel</div> | |
| </div> | |
| <div class="start-item"> | |
| <i class="fas fa-search"></i> | |
| <div>Search</div> | |
| </div> | |
| <div class="start-item"> | |
| <i class="fas fa-question-circle"></i> | |
| <div>Help and Support</div> | |
| </div> | |
| <div class="start-item"> | |
| <i class="fas fa-power-off"></i> | |
| <div>Turn Off Computer</div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Taskbar --> | |
| <div class="taskbar"> | |
| <div class="start-button" onclick="toggleStartMenu()"> | |
| <i class="fab fa-windows mr-1"></i> | |
| <span>Start</span> | |
| </div> | |
| <div class="taskbar-items" id="taskbar-items"> | |
| <!-- Taskbar items will be added here dynamically --> | |
| </div> | |
| <div class="clock" id="clock"> | |
| <span id="time">10:00 AM</span> | |
| </div> | |
| </div> | |
| <script> | |
| // Global variables | |
| let activeWindow = null; | |
| let isDragging = false; | |
| let isResizing = false; | |
| let startX, startY, startWidth, startHeight; | |
| let currentWindowId = null; | |
| // Update clock | |
| function updateClock() { | |
| const now = new Date(); | |
| let hours = now.getHours(); | |
| const minutes = now.getMinutes().toString().padStart(2, '0'); | |
| const ampm = hours >= 12 ? 'PM' : 'AM'; | |
| hours = hours % 12; | |
| hours = hours ? hours : 12; // the hour '0' should be '12' | |
| document.getElementById('time').textContent = `${hours}:${minutes} ${ampm}`; | |
| } | |
| setInterval(updateClock, 1000); | |
| updateClock(); | |
| // Toggle start menu | |
| function toggleStartMenu() { | |
| const startMenu = document.getElementById('start-menu'); | |
| if (startMenu.style.display === 'block') { | |
| startMenu.style.display = 'none'; | |
| } else { | |
| startMenu.style.display = 'block'; | |
| bringToFront('start-menu'); | |
| } | |
| } | |
| // Close start menu when clicking elsewhere | |
| document.addEventListener('click', function(e) { | |
| if (!e.target.closest('#start-menu') && !e.target.closest('.start-button')) { | |
| document.getElementById('start-menu').style.display = 'none'; | |
| } | |
| }); | |
| // Window management functions | |
| function openWindow(windowId) { | |
| const window = document.getElementById(windowId); | |
| window.style.display = 'block'; | |
| bringToFront(windowId); | |
| addToTaskbar(windowId); | |
| document.getElementById('start-menu').style.display = 'none'; | |
| } | |
| function closeWindow(windowId) { | |
| document.getElementById(windowId).style.display = 'none'; | |
| removeFromTaskbar(windowId); | |
| } | |
| function minimizeWindow(windowId) { | |
| document.getElementById(windowId).style.display = 'none'; | |
| const taskbarItem = document.querySelector(`.taskbar-item[data-window="${windowId}"]`); | |
| if (taskbarItem) { | |
| taskbarItem.classList.remove('active'); | |
| } | |
| } | |
| function maximizeWindow(windowId) { | |
| const window = document.getElementById(windowId); | |
| if (window.style.width === '90vw' && window.style.height === '80vh') { | |
| // Restore | |
| window.style.width = window.dataset.originalWidth || '500px'; | |
| window.style.height = window.dataset.originalHeight || '400px'; | |
| window.style.left = window.dataset.originalLeft || '100px'; | |
| window.style.top = window.dataset.originalTop || '100px'; | |
| } else { | |
| // Maximize | |
| window.dataset.originalWidth = window.style.width; | |
| window.dataset.originalHeight = window.style.height; | |
| window.dataset.originalLeft = window.style.left; | |
| window.dataset.originalTop = window.style.top; | |
| window.style.width = '90vw'; | |
| window.style.height = '80vh'; | |
| window.style.left = '5vw'; | |
| window.style.top = '5vh'; | |
| } | |
| } | |
| function bringToFront(windowId) { | |
| // Reset z-index for all windows | |
| document.querySelectorAll('.window').forEach(w => { | |
| w.classList.remove('active-window'); | |
| w.style.zIndex = '10'; | |
| }); | |
| // Set the clicked window to front | |
| const window = document.getElementById(windowId); | |
| window.style.zIndex = '20'; | |
| window.classList.add('active-window'); | |
| activeWindow = windowId; | |
| // Update taskbar items | |
| document.querySelectorAll('.taskbar-item').forEach(item => { | |
| item.classList.remove('active'); | |
| }); | |
| const taskbarItem = document.querySelector(`.taskbar-item[data-window="${windowId}"]`); | |
| if (taskbarItem) { | |
| taskbarItem.classList.add('active'); | |
| } | |
| } | |
| function addToTaskbar(windowId) { | |
| // Check if already in taskbar | |
| if (document.querySelector(`.taskbar-item[data-window="${windowId}"]`)) { | |
| return; | |
| } | |
| const window = document.getElementById(windowId); | |
| const title = window.querySelector('.window-header div:first-child').textContent; | |
| const taskbarItem = document.createElement('div'); | |
| taskbarItem.className = 'taskbar-item'; | |
| taskbarItem.setAttribute('data-window', windowId); | |
| taskbarItem.innerHTML = `<i class="fas fa-file mr-1"></i> ${title}`; | |
| taskbarItem.addEventListener('click', function() { | |
| if (document.getElementById(windowId).style.display === 'none') { | |
| // Window is minimized, restore it | |
| document.getElementById(windowId).style.display = 'block'; | |
| bringToFront(windowId); | |
| } else { | |
| // Window is visible, minimize it | |
| minimizeWindow(windowId); | |
| } | |
| }); | |
| document.getElementById('taskbar-items').appendChild(taskbarItem); | |
| } | |
| function removeFromTaskbar(windowId) { | |
| const taskbarItem = document.querySelector(`.taskbar-item[data-window="${windowId}"]`); | |
| if (taskbarItem) { | |
| taskbarItem.remove(); | |
| } | |
| } | |
| // Make windows draggable | |
| document.addEventListener('mousedown', function(e) { | |
| const windowHeader = e.target.closest('.window-header'); | |
| if (windowHeader) { | |
| const window = windowHeader.closest('.window'); | |
| currentWindowId = window.id; | |
| isDragging = true; | |
| startX = e.clientX - window.offsetLeft; | |
| startY = e.clientY - window.offsetTop; | |
| bringToFront(window.id); | |
| e.preventDefault(); | |
| } | |
| }); | |
| document.addEventListener('mousemove', function(e) { | |
| if (isDragging && currentWindowId) { | |
| const window = document.getElementById(currentWindowId); | |
| window.style.left = (e.clientX - startX) + 'px'; | |
| window.style.top = (e.clientY - startY) + 'px'; | |
| } | |
| if (isResizing && currentWindowId) { | |
| const window = document.getElementById(currentWindowId); | |
| const newWidth = Math.max(300, e.clientX - window.offsetLeft); | |
| const newHeight = Math.max(200, e.clientY - window.offsetTop); | |
| window.style.width = newWidth + 'px'; | |
| window.style.height = newHeight + 'px'; | |
| } | |
| }); | |
| document.addEventListener('mouseup', function() { | |
| isDragging = false; | |
| isResizing = false; | |
| currentWindowId = null; | |
| }); | |
| // Window resizing | |
| function startResize(e, windowId) { | |
| e.stopPropagation(); | |
| isResizing = true; | |
| currentWindowId = windowId; | |
| const window = document.getElementById(windowId); | |
| startWidth = window.offsetWidth; | |
| startHeight = window.offsetHeight; | |
| bringToFront(windowId); | |
| } | |
| // Close start menu when a window is opened | |
| document.querySelectorAll('.window').forEach(window => { | |
| window.addEventListener('mousedown', function() { | |
| document.getElementById('start-menu').style.display = 'none'; | |
| }); | |
| }); | |
| // Initialize some windows | |
| window.addEventListener('load', function() { | |
| // Open welcome window | |
| setTimeout(() => { | |
| openWindow('my-computer'); | |
| }, 500); | |
| }); | |
| </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=AhBoh/win" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |