Download index.html from Palenkov/cat: direct link, hf CLI and curl.
- Browser
- Download file 25.3 kB
-
https://huggingface.co/spaces/Palenkov/cat/resolve/main/index.html
- Command line
-
hf download hf://spaces/Palenkov/cat/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Palenkov/cat/resolve/main/index.html
25.3 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Rusted Warfare Mod Manager</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> | |
| @keyframes pulse { | |
| 0% { transform: scale(1); } | |
| 50% { transform: scale(1.05); } | |
| 100% { transform: scale(1); } | |
| } | |
| .pulse-animation { | |
| animation: pulse 2s infinite; | |
| } | |
| .unit-card { | |
| transition: all 0.3s ease; | |
| } | |
| .unit-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3); | |
| } | |
| .game-screen { | |
| background: linear-gradient(135deg, #2c3e50 0%, #1a1a1a 100%); | |
| } | |
| .unit-selected { | |
| box-shadow: 0 0 0 3px #3b82f6; | |
| } | |
| .health-bar { | |
| height: 5px; | |
| background: linear-gradient(to right, #ef4444, #10b981); | |
| } | |
| .explosion { | |
| position: absolute; | |
| width: 40px; | |
| height: 40px; | |
| background: radial-gradient(circle, #f59e0b 0%, #ef4444 50%, transparent 70%); | |
| border-radius: 50%; | |
| pointer-events: none; | |
| z-index: 10; | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-900 text-white min-h-screen"> | |
| <div class="container mx-auto px-4 py-8"> | |
| <!-- Header --> | |
| <header class="flex flex-col md:flex-row justify-between items-center mb-8 border-b border-gray-700 pb-6"> | |
| <div class="flex items-center mb-4 md:mb-0"> | |
| <div class="bg-yellow-600 text-yellow-100 rounded-full w-12 h-12 flex items-center justify-center mr-4"> | |
| <i class="fas fa-robot text-2xl"></i> | |
| </div> | |
| <div> | |
| <h1 class="text-3xl font-bold">Rusted Warfare Mod Manager</h1> | |
| <p class="text-gray-400">Customize your RTS experience</p> | |
| </div> | |
| </div> | |
| <div class="flex space-x-4"> | |
| <button id="launch-game" class="bg-green-600 hover:bg-green-700 px-6 py-2 rounded-lg font-bold flex items-center pulse-animation"> | |
| <i class="fas fa-play mr-2"></i> Launch Game | |
| </button> | |
| <button id="settings-btn" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded-lg"> | |
| <i class="fas fa-cog"></i> | |
| </button> | |
| </div> | |
| </header> | |
| <!-- Main Content --> | |
| <div class="grid grid-cols-1 lg:grid-cols-4 gap-8"> | |
| <!-- Mod List --> | |
| <div class="lg:col-span-1 bg-gray-800 rounded-xl p-6"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-xl font-bold">Available Mods</h2> | |
| <button id="refresh-mods" class="text-blue-400 hover:text-blue-300"> | |
| <i class="fas fa-sync-alt"></i> | |
| </button> | |
| </div> | |
| <div class="space-y-4" id="mod-list"> | |
| <!-- Mod items will be added here dynamically --> | |
| </div> | |
| <div class="mt-6"> | |
| <button id="add-mod-btn" class="w-full bg-gray-700 hover:bg-gray-600 py-2 rounded-lg flex items-center justify-center"> | |
| <i class="fas fa-plus mr-2"></i> Add New Mod | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Game Preview --> | |
| <div class="lg:col-span-3"> | |
| <div class="game-screen rounded-xl overflow-hidden relative" id="game-preview"> | |
| <div id="game-map" class="w-full h-96 bg-gray-900 relative overflow-hidden"> | |
| <!-- Game elements will be added here --> | |
| </div> | |
| <div class="bg-gray-800 p-4"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="font-bold">Mod Preview</h3> | |
| <div class="flex space-x-2"> | |
| <button id="pause-btn" class="bg-gray-700 hover:bg-gray-600 w-8 h-8 rounded-full flex items-center justify-center"> | |
| <i class="fas fa-pause"></i> | |
| </button> | |
| <button id="speed-btn" class="bg-gray-700 hover:bg-gray-600 px-3 h-8 rounded-full text-sm"> | |
| 1x Speed | |
| </button> | |
| </div> | |
| </div> | |
| <div class="grid grid-cols-3 gap-4" id="unit-selection"> | |
| <!-- Unit selection buttons will be added here --> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Mod Details --> | |
| <div class="bg-gray-800 rounded-xl p-6 mt-6" id="mod-details"> | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <h2 class="text-xl font-bold mb-2">Select a Mod to View Details</h2> | |
| <p class="text-gray-400">No mod selected</p> | |
| </div> | |
| <div class="flex space-x-2"> | |
| <button id="enable-mod" class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded-lg hidden"> | |
| <i class="fas fa-check-circle mr-2"></i> Enable | |
| </button> | |
| <button id="disable-mod" class="bg-gray-600 hover:bg-gray-700 px-4 py-2 rounded-lg hidden"> | |
| <i class="fas fa-times-circle mr-2"></i> Disable | |
| </button> | |
| </div> | |
| </div> | |
| <div class="mt-6 grid grid-cols-1 md:grid-cols-3 gap-6 hidden" id="mod-info"> | |
| <div> | |
| <h3 class="font-bold text-gray-400 mb-2">Mod Information</h3> | |
| <ul class="space-y-2"> | |
| <li><strong>Author:</strong> <span id="mod-author">Unknown</span></li> | |
| <li><strong>Version:</strong> <span id="mod-version">1.0</span></li> | |
| <li><strong>Updated:</strong> <span id="mod-updated">2023-01-01</span></li> | |
| <li><strong>Size:</strong> <span id="mod-size">5.2 MB</span></li> | |
| </ul> | |
| </div> | |
| <div> | |
| <h3 class="font-bold text-gray-400 mb-2">Description</h3> | |
| <p id="mod-description" class="text-gray-300"> | |
| No description available. | |
| </p> | |
| </div> | |
| <div> | |
| <h3 class="font-bold text-gray-400 mb-2">New Units</h3> | |
| <ul class="space-y-2" id="mod-units"> | |
| <li>No unit information</li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Add Mod Modal --> | |
| <div id="add-mod-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden"> | |
| <div class="bg-gray-800 rounded-xl p-6 w-full max-w-md"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="text-xl font-bold">Add New Mod</h3> | |
| <button id="close-modal" class="text-gray-400 hover:text-white"> | |
| <i class="fas fa-times"></i> | |
| </button> | |
| </div> | |
| <div class="space-y-4"> | |
| <div> | |
| <label class="block text-gray-400 mb-2">Mod Name</label> | |
| <input type="text" id="mod-name" class="w-full bg-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"> | |
| </div> | |
| <div> | |
| <label class="block text-gray-400 mb-2">Mod File</label> | |
| <div class="border-2 border-dashed border-gray-600 rounded-lg p-8 text-center"> | |
| <i class="fas fa-cloud-upload-alt text-3xl text-gray-500 mb-2"></i> | |
| <p class="text-gray-400">Drag & drop your mod file here</p> | |
| <p class="text-sm text-gray-500 mt-2">or</p> | |
| <button class="bg-blue-600 hover:bg-blue-700 px-4 py-2 rounded-lg mt-2"> | |
| Browse Files | |
| </button> | |
| </div> | |
| </div> | |
| <div> | |
| <label class="block text-gray-400 mb-2">Description</label> | |
| <textarea id="mod-desc" rows="3" class="w-full bg-gray-700 rounded-lg px-4 py-2 focus:outline-none focus:ring-2 focus:ring-blue-500"></textarea> | |
| </div> | |
| <div class="flex justify-end space-x-3 pt-4"> | |
| <button id="cancel-add-mod" class="bg-gray-700 hover:bg-gray-600 px-6 py-2 rounded-lg"> | |
| Cancel | |
| </button> | |
| <button id="confirm-add-mod" class="bg-green-600 hover:bg-green-700 px-6 py-2 rounded-lg"> | |
| Add Mod | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| // Sample mod data | |
| const mods = [ | |
| { | |
| id: 1, | |
| name: "Future Warfare", | |
| author: "TechCorp", | |
| version: "2.4", | |
| updated: "2023-06-15", | |
| size: "8.7 MB", | |
| enabled: false, | |
| description: "Adds futuristic units and technologies to the game, including plasma weapons and hover tanks.", | |
| units: [ | |
| { name: "Plasma Tank", type: "vehicle", health: 120, damage: 25 }, | |
| { name: "Hover Drone", type: "air", health: 80, damage: 15 }, | |
| { name: "Quantum Artillery", type: "artillery", health: 90, damage: 40 } | |
| ] | |
| }, | |
| { | |
| id: 2, | |
| name: "World War II", | |
| author: "HistoryMods", | |
| version: "1.9", | |
| updated: "2023-05-22", | |
| size: "12.3 MB", | |
| enabled: true, | |
| description: "Brings classic WWII units to Rusted Warfare with historically accurate tanks, infantry and aircraft.", | |
| units: [ | |
| { name: "Sherman Tank", type: "vehicle", health: 100, damage: 20 }, | |
| { name: "Panzer IV", type: "vehicle", health: 110, damage: 22 }, | |
| { name: "B-17 Bomber", type: "air", health: 150, damage: 35 } | |
| ] | |
| }, | |
| { | |
| id: 3, | |
| name: "Zombie Apocalypse", | |
| author: "HorrorGames", | |
| version: "3.1", | |
| updated: "2023-07-10", | |
| size: "6.5 MB", | |
| enabled: false, | |
| description: "Survive against waves of zombies with special survivor units and defensive structures.", | |
| units: [ | |
| { name: "Survivor", type: "infantry", health: 60, damage: 8 }, | |
| { name: "Zombie Horde", type: "infantry", health: 200, damage: 5 }, | |
| { name: "Barricade", type: "structure", health: 250, damage: 0 } | |
| ] | |
| }, | |
| { | |
| id: 4, | |
| name: "Steampunk Armada", | |
| author: "ClockworkMods", | |
| version: "1.2", | |
| updated: "2023-04-05", | |
| size: "9.1 MB", | |
| enabled: false, | |
| description: "Victorian-era steam-powered war machines with brass and iron aesthetics.", | |
| units: [ | |
| { name: "Steam Tank", type: "vehicle", health: 130, damage: 18 }, | |
| { name: "Airship", type: "air", health: 180, damage: 30 }, | |
| { name: "Tesla Coil", type: "structure", health: 90, damage: 45 } | |
| ] | |
| } | |
| ]; | |
| // Selected mod | |
| let selectedMod = null; | |
| let gameSpeed = 1; | |
| let isPaused = false; | |
| // DOM elements | |
| const modList = document.getElementById('mod-list'); | |
| const modDetails = document.getElementById('mod-details'); | |
| const modInfo = document.getElementById('mod-info'); | |
| const enableModBtn = document.getElementById('enable-mod'); | |
| const disableModBtn = document.getElementById('disable-mod'); | |
| const addModBtn = document.getElementById('add-mod-btn'); | |
| const addModModal = document.getElementById('add-mod-modal'); | |
| const closeModalBtn = document.getElementById('close-modal'); | |
| const cancelAddModBtn = document.getElementById('cancel-add-mod'); | |
| const confirmAddModBtn = document.getElementById('confirm-add-mod'); | |
| const launchGameBtn = document.getElementById('launch-game'); | |
| const pauseBtn = document.getElementById('pause-btn'); | |
| const speedBtn = document.getElementById('speed-btn'); | |
| const gameMap = document.getElementById('game-map'); | |
| const unitSelection = document.getElementById('unit-selection'); | |
| // Initialize | |
| function init() { | |
| renderModList(); | |
| setupEventListeners(); | |
| renderPreviewUnits(); | |
| } | |
| // Render mod list | |
| function renderModList() { | |
| modList.innerHTML = ''; | |
| mods.forEach(mod => { | |
| const modItem = document.createElement('div'); | |
| modItem.className = `bg-gray-700 hover:bg-gray-600 rounded-lg p-4 cursor-pointer transition ${mod.enabled ? 'border-l-4 border-green-500' : ''}`; | |
| modItem.innerHTML = ` | |
| <div class="flex justify-between items-start"> | |
| <div> | |
| <h3 class="font-bold">${mod.name}</h3> | |
| <p class="text-sm text-gray-400">${mod.author} • v${mod.version}</p> | |
| </div> | |
| <span class="text-xs bg-gray-600 px-2 py-1 rounded">${mod.size}</span> | |
| </div> | |
| `; | |
| modItem.addEventListener('click', () => selectMod(mod)); | |
| modList.appendChild(modItem); | |
| }); | |
| } | |
| // Select a mod | |
| function selectMod(mod) { | |
| selectedMod = mod; | |
| // Update mod details | |
| document.getElementById('mod-author').textContent = mod.author; | |
| document.getElementById('mod-version').textContent = mod.version; | |
| document.getElementById('mod-updated').textContent = mod.updated; | |
| document.getElementById('mod-size').textContent = mod.size; | |
| document.getElementById('mod-description').textContent = mod.description; | |
| // Update units list | |
| const unitsList = document.getElementById('mod-units'); | |
| unitsList.innerHTML = ''; | |
| mod.units.forEach(unit => { | |
| const li = document.createElement('li'); | |
| li.className = 'flex items-center'; | |
| li.innerHTML = ` | |
| <span class="inline-block w-3 h-3 rounded-full mr-2 ${ | |
| unit.type === 'vehicle' ? 'bg-blue-500' : | |
| unit.type === 'infantry' ? 'bg-green-500' : | |
| unit.type === 'air' ? 'bg-yellow-500' : 'bg-purple-500' | |
| }"></span> | |
| ${unit.name} (${unit.type}) | |
| `; | |
| unitsList.appendChild(li); | |
| }); | |
| // Show mod info | |
| modInfo.classList.remove('hidden'); | |
| // Update enable/disable buttons | |
| if (mod.enabled) { | |
| enableModBtn.classList.add('hidden'); | |
| disableModBtn.classList.remove('hidden'); | |
| } else { | |
| enableModBtn.classList.remove('hidden'); | |
| disableModBtn.classList.add('hidden'); | |
| } | |
| // Update preview | |
| renderPreviewUnits(); | |
| } | |
| // Render preview units | |
| function renderPreviewUnits() { | |
| gameMap.innerHTML = ''; | |
| unitSelection.innerHTML = ''; | |
| if (!selectedMod) return; | |
| // Add units to selection panel | |
| selectedMod.units.forEach((unit, index) => { | |
| const unitBtn = document.createElement('button'); | |
| unitBtn.className = 'bg-gray-700 hover:bg-gray-600 rounded-lg p-3 flex flex-col items-center'; | |
| unitBtn.innerHTML = ` | |
| <div class="w-12 h-12 mb-2 flex items-center justify-center text-xl"> | |
| ${getUnitIcon(unit.type)} | |
| </div> | |
| <span class="text-sm font-medium">${unit.name}</span> | |
| `; | |
| unitBtn.addEventListener('click', () => spawnUnit(unit, index)); | |
| unitSelection.appendChild(unitBtn); | |
| }); | |
| // Add some environment to the preview | |
| for (let i = 0; i < 5; i++) { | |
| const tree = document.createElement('div'); | |
| tree.className = 'absolute bg-green-800 rounded-full'; | |
| tree.style.width = `${20 + Math.random() * 20}px`; | |
| tree.style.height = `${20 + Math.random() * 20}px`; | |
| tree.style.left = `${Math.random() * 80}%`; | |
| tree.style.bottom = `${Math.random() * 20}%`; | |
| gameMap.appendChild(tree); | |
| } | |
| // Add some rocks | |
| for (let i = 0; i < 3; i++) { | |
| const rock = document.createElement('div'); | |
| rock.className = 'absolute bg-gray-600 rounded-full'; | |
| rock.style.width = `${15 + Math.random() * 15}px`; | |
| rock.style.height = `${15 + Math.random() * 15}px`; | |
| rock.style.left = `${Math.random() * 80}%`; | |
| rock.style.bottom = `${Math.random() * 20}%`; | |
| gameMap.appendChild(rock); | |
| } | |
| } | |
| // Get unit icon based on type | |
| function getUnitIcon(type) { | |
| switch(type) { | |
| case 'vehicle': return '<i class="fas fa-tank"></i>'; | |
| case 'infantry': return '<i class="fas fa-user"></i>'; | |
| case 'air': return '<i class="fas fa-fighter-jet"></i>'; | |
| case 'artillery': return '<i class="fas fa-bomb"></i>'; | |
| case 'structure': return '<i class="fas fa-fort"></i>'; | |
| default: return '<i class="fas fa-question"></i>'; | |
| } | |
| } | |
| // Spawn unit in preview | |
| function spawnUnit(unit, index) { | |
| // Clear previous selection | |
| document.querySelectorAll('.preview-unit').forEach(el => { | |
| el.classList.remove('unit-selected'); | |
| }); | |
| const unitEl = document.createElement('div'); | |
| unitEl.className = `preview-unit absolute cursor-pointer unit-selected`; | |
| unitEl.style.width = '40px'; | |
| unitEl.style.height = '40px'; | |
| unitEl.style.left = `${30 + (index * 20)}%`; | |
| unitEl.style.bottom = '30%'; | |
| unitEl.innerHTML = ` | |
| <div class="relative w-full h-full flex items-center justify-center text-2xl ${ | |
| unit.type === 'vehicle' ? 'text-blue-400' : | |
| unit.type === 'infantry' ? 'text-green-400' : | |
| unit.type === 'air' ? 'text-yellow-400' : 'text-purple-400' | |
| }"> | |
| ${getUnitIcon(unit.type)} | |
| <div class="absolute bottom-0 left-0 right-0 health-bar" style="width: 100%"></div> | |
| </div> | |
| `; | |
| unitEl.addEventListener('click', (e) => { | |
| e.stopPropagation(); | |
| document.querySelectorAll('.preview-unit').forEach(el => { | |
| el.classList.remove('unit-selected'); | |
| }); | |
| unitEl.classList.add('unit-selected'); | |
| }); | |
| gameMap.appendChild(unitEl); | |
| // Add explosion effect when clicking on map | |
| gameMap.addEventListener('click', (e) => { | |
| if (e.target === gameMap) { | |
| const explosion = document.createElement('div'); | |
| explosion.className = 'explosion'; | |
| explosion.style.left = `${e.offsetX - 20}px`; | |
| explosion.style.top = `${e.offsetY - 20}px`; | |
| gameMap.appendChild(explosion); | |
| setTimeout(() => { | |
| explosion.remove(); | |
| }, 500); | |
| } | |
| }, { once: true }); | |
| } | |
| // Setup event listeners | |
| function setupEventListeners() { | |
| // Enable/disable mod | |
| enableModBtn.addEventListener('click', () => { | |
| if (selectedMod) { | |
| selectedMod.enabled = true; | |
| renderModList(); | |
| disableModBtn.classList.remove('hidden'); | |
| enableModBtn.classList.add('hidden'); | |
| } | |
| }); | |
| disableModBtn.addEventListener('click', () => { | |
| if (selectedMod) { | |
| selectedMod.enabled = false; | |
| renderModList(); | |
| enableModBtn.classList.remove('hidden'); | |
| disableModBtn.classList.add('hidden'); | |
| } | |
| }); | |
| // Add mod modal | |
| addModBtn.addEventListener('click', () => { | |
| addModModal.classList.remove('hidden'); | |
| }); | |
| closeModalBtn.addEventListener('click', () => { | |
| addModModal.classList.add('hidden'); | |
| }); | |
| cancelAddModBtn.addEventListener('click', () => { | |
| addModModal.classList.add('hidden'); | |
| }); | |
| confirmAddModBtn.addEventListener('click', () => { | |
| const modName = document.getElementById('mod-name').value; | |
| if (modName) { | |
| // In a real app, this would upload the mod file | |
| alert(`Mod "${modName}" added successfully!`); | |
| addModModal.classList.add('hidden'); | |
| } | |
| }); | |
| // Game controls | |
| launchGameBtn.addEventListener('click', () => { | |
| const enabledMods = mods.filter(mod => mod.enabled); | |
| if (enabledMods.length > 0) { | |
| alert(`Launching game with ${enabledMods.length} mod(s) enabled!`); | |
| } else { | |
| alert('Launching vanilla game with no mods enabled.'); | |
| } | |
| }); | |
| pauseBtn.addEventListener('click', () => { | |
| isPaused = !isPaused; | |
| pauseBtn.innerHTML = isPaused ? '<i class="fas fa-play"></i>' : '<i class="fas fa-pause"></i>'; | |
| }); | |
| speedBtn.addEventListener('click', () => { | |
| gameSpeed = gameSpeed === 1 ? 2 : gameSpeed === 2 ? 3 : 1; | |
| speedBtn.textContent = `${gameSpeed}x Speed`; | |
| }); | |
| } | |
| // Initialize the app | |
| init(); | |
| </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=Palenkov/cat" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |