Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +279 -19
- prompts.txt +1 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: usa-delete
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,279 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Idol Destroyer Game</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
@keyframes shake {
|
| 11 |
+
0%, 100% { transform: translateX(0); }
|
| 12 |
+
10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
|
| 13 |
+
20%, 40%, 60%, 80% { transform: translateX(5px); }
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
@keyframes explode {
|
| 17 |
+
0% { transform: scale(1); opacity: 1; }
|
| 18 |
+
100% { transform: scale(3); opacity: 0; }
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.shake {
|
| 22 |
+
animation: shake 0.5s linear;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
.explode {
|
| 26 |
+
animation: explode 0.5s forwards;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.idol {
|
| 30 |
+
transition: all 0.3s ease;
|
| 31 |
+
cursor: pointer;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.idol:hover {
|
| 35 |
+
transform: scale(1.1);
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.mosque-bg {
|
| 39 |
+
background-image: url('https://images.unsplash.com/photo-1566438480900-0609be27a4be?ixlib=rb-4.0.3');
|
| 40 |
+
background-size: cover;
|
| 41 |
+
background-position: center;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.score-popup {
|
| 45 |
+
animation: floatUp 1s forwards;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
@keyframes floatUp {
|
| 49 |
+
0% { transform: translateY(0); opacity: 1; }
|
| 50 |
+
100% { transform: translateY(-50px); opacity: 0; }
|
| 51 |
+
}
|
| 52 |
+
</style>
|
| 53 |
+
</head>
|
| 54 |
+
<body class="bg-gray-100 font-sans mosque-bg min-h-screen flex flex-col items-center justify-center p-4">
|
| 55 |
+
<div class="bg-white bg-opacity-90 rounded-xl shadow-2xl p-8 max-w-4xl w-full">
|
| 56 |
+
<header class="text-center mb-8">
|
| 57 |
+
<h1 class="text-3xl md:text-4xl font-bold text-amber-800 mb-2">🕋 Idol Destroyer</h1>
|
| 58 |
+
<p class="text-gray-600">"And he broke them into pieces, except the largest of them..." (Quran 21:58)</p>
|
| 59 |
+
</header>
|
| 60 |
+
|
| 61 |
+
<div class="flex justify-between items-center mb-6 bg-amber-50 p-4 rounded-lg border border-amber-200">
|
| 62 |
+
<div class="flex items-center">
|
| 63 |
+
<div class="bg-green-100 p-3 rounded-full mr-4">
|
| 64 |
+
<i class="fas fa-hammer text-2xl text-green-700"></i>
|
| 65 |
+
</div>
|
| 66 |
+
<div>
|
| 67 |
+
<h3 class="font-bold text-gray-800">Score</h3>
|
| 68 |
+
<p id="score" class="text-2xl font-bold text-green-700">0</p>
|
| 69 |
+
</div>
|
| 70 |
+
</div>
|
| 71 |
+
|
| 72 |
+
<div class="flex items-center">
|
| 73 |
+
<div class="bg-blue-100 p-3 rounded-full mr-4">
|
| 74 |
+
<i class="fas fa-clock text-2xl text-blue-700"></i>
|
| 75 |
+
</div>
|
| 76 |
+
<div>
|
| 77 |
+
<h3 class="font-bold text-gray-800">Time</h3>
|
| 78 |
+
<p id="time" class="text-2xl font-bold text-blue-700">60</p>
|
| 79 |
+
</div>
|
| 80 |
+
</div>
|
| 81 |
+
|
| 82 |
+
<button id="startBtn" class="bg-amber-600 hover:bg-amber-700 text-white font-bold py-2 px-6 rounded-full transition">
|
| 83 |
+
<i class="fas fa-play mr-2"></i> Start
|
| 84 |
+
</button>
|
| 85 |
+
</div>
|
| 86 |
+
|
| 87 |
+
<div id="gameArea" class="bg-amber-100 bg-opacity-70 rounded-xl p-6 min-h-96 flex flex-col items-center justify-center">
|
| 88 |
+
<div id="idolsContainer" class="grid grid-cols-3 md:grid-cols-5 gap-4 w-full">
|
| 89 |
+
<!-- Idols will be generated here -->
|
| 90 |
+
</div>
|
| 91 |
+
|
| 92 |
+
<div id="message" class="text-center mt-8 hidden">
|
| 93 |
+
<i class="fas fa-trophy text-5xl text-amber-500 mb-4"></i>
|
| 94 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-2">Game Over!</h2>
|
| 95 |
+
<p id="finalScore" class="text-xl text-gray-600 mb-4">Your final score: <span class="font-bold">0</span></p>
|
| 96 |
+
<button id="restartBtn" class="bg-amber-600 hover:bg-amber-700 text-white font-bold py-2 px-6 rounded-full transition">
|
| 97 |
+
<i class="fas fa-redo mr-2"></i> Play Again
|
| 98 |
+
</button>
|
| 99 |
+
</div>
|
| 100 |
+
|
| 101 |
+
<div id="instructions" class="text-center">
|
| 102 |
+
<i class="fas fa-info-circle text-3xl text-blue-500 mb-4"></i>
|
| 103 |
+
<h2 class="text-xl font-bold text-gray-800 mb-2">How to Play</h2>
|
| 104 |
+
<p class="text-gray-600 mb-4">Click the Start button to begin. Destroy the idols by clicking on them before time runs out!</p>
|
| 105 |
+
<p class="text-sm text-gray-500">Different idols give different points. The bigger the idol, the more points you get!</p>
|
| 106 |
+
</div>
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
|
| 110 |
+
<footer class="mt-8 text-center text-gray-600 text-sm">
|
| 111 |
+
<p>Inspired by the story of Prophet Ibrahim (AS) destroying the idols</p>
|
| 112 |
+
</footer>
|
| 113 |
+
|
| 114 |
+
<script>
|
| 115 |
+
// Game variables
|
| 116 |
+
let score = 0;
|
| 117 |
+
let timeLeft = 60;
|
| 118 |
+
let gameInterval;
|
| 119 |
+
let timeInterval;
|
| 120 |
+
let isGameRunning = false;
|
| 121 |
+
|
| 122 |
+
// DOM elements
|
| 123 |
+
const startBtn = document.getElementById('startBtn');
|
| 124 |
+
const restartBtn = document.getElementById('restartBtn');
|
| 125 |
+
const gameArea = document.getElementById('gameArea');
|
| 126 |
+
const idolsContainer = document.getElementById('idolsContainer');
|
| 127 |
+
const scoreDisplay = document.getElementById('score');
|
| 128 |
+
const timeDisplay = document.getElementById('time');
|
| 129 |
+
const message = document.getElementById('message');
|
| 130 |
+
const instructions = document.getElementById('instructions');
|
| 131 |
+
const finalScoreDisplay = document.getElementById('finalScore');
|
| 132 |
+
|
| 133 |
+
// Idol types with different points
|
| 134 |
+
const idolTypes = [
|
| 135 |
+
{ emoji: '🗿', points: 10, class: 'text-3xl' },
|
| 136 |
+
{ emoji: '🏛️', points: 20, class: 'text-4xl' },
|
| 137 |
+
{ emoji: '🏺', points: 15, class: 'text-3xl' },
|
| 138 |
+
{ emoji: '🪦', points: 5, class: 'text-2xl' },
|
| 139 |
+
{ emoji: '🪨', points: 8, class: 'text-2xl' },
|
| 140 |
+
{ emoji: '🗽', points: 25, class: 'text-5xl' }
|
| 141 |
+
];
|
| 142 |
+
|
| 143 |
+
// Start game
|
| 144 |
+
startBtn.addEventListener('click', startGame);
|
| 145 |
+
restartBtn.addEventListener('click', startGame);
|
| 146 |
+
|
| 147 |
+
function startGame() {
|
| 148 |
+
// Reset game state
|
| 149 |
+
score = 0;
|
| 150 |
+
timeLeft = 60;
|
| 151 |
+
scoreDisplay.textContent = score;
|
| 152 |
+
timeDisplay.textContent = timeLeft;
|
| 153 |
+
|
| 154 |
+
// Hide message and instructions
|
| 155 |
+
message.classList.add('hidden');
|
| 156 |
+
instructions.classList.add('hidden');
|
| 157 |
+
|
| 158 |
+
// Clear any existing idols
|
| 159 |
+
idolsContainer.innerHTML = '';
|
| 160 |
+
|
| 161 |
+
// Generate idols
|
| 162 |
+
generateIdols();
|
| 163 |
+
|
| 164 |
+
// Start timers
|
| 165 |
+
if (isGameRunning) {
|
| 166 |
+
clearInterval(gameInterval);
|
| 167 |
+
clearInterval(timeInterval);
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
isGameRunning = true;
|
| 171 |
+
startBtn.disabled = true;
|
| 172 |
+
|
| 173 |
+
// Game timer (spawn new idols every 2 seconds)
|
| 174 |
+
gameInterval = setInterval(generateIdols, 2000);
|
| 175 |
+
|
| 176 |
+
// Countdown timer
|
| 177 |
+
timeInterval = setInterval(() => {
|
| 178 |
+
timeLeft--;
|
| 179 |
+
timeDisplay.textContent = timeLeft;
|
| 180 |
+
|
| 181 |
+
if (timeLeft <= 0) {
|
| 182 |
+
endGame();
|
| 183 |
+
}
|
| 184 |
+
}, 1000);
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
function generateIdols() {
|
| 188 |
+
// Random number of idols to generate (1-3)
|
| 189 |
+
const numIdols = Math.floor(Math.random() * 3) + 1;
|
| 190 |
+
|
| 191 |
+
for (let i = 0; i < numIdols; i++) {
|
| 192 |
+
// Random position in container
|
| 193 |
+
const top = Math.random() * 80;
|
| 194 |
+
const left = Math.random() * 80;
|
| 195 |
+
|
| 196 |
+
// Random idol type
|
| 197 |
+
const type = Math.floor(Math.random() * idolTypes.length);
|
| 198 |
+
const idol = idolTypes[type];
|
| 199 |
+
|
| 200 |
+
// Create idol element
|
| 201 |
+
const idolElement = document.createElement('div');
|
| 202 |
+
idolElement.className = `idol absolute ${idol.class} cursor-pointer transition`;
|
| 203 |
+
idolElement.style.top = `${top}%`;
|
| 204 |
+
idolElement.style.left = `${left}%`;
|
| 205 |
+
idolElement.innerHTML = idol.emoji;
|
| 206 |
+
idolElement.dataset.points = idol.points;
|
| 207 |
+
|
| 208 |
+
// Add click event
|
| 209 |
+
idolElement.addEventListener('click', destroyIdol);
|
| 210 |
+
|
| 211 |
+
// Add to container
|
| 212 |
+
idolsContainer.appendChild(idolElement);
|
| 213 |
+
}
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
function destroyIdol(e) {
|
| 217 |
+
const idol = e.target;
|
| 218 |
+
const points = parseInt(idol.dataset.points);
|
| 219 |
+
|
| 220 |
+
// Add to score
|
| 221 |
+
score += points;
|
| 222 |
+
scoreDisplay.textContent = score;
|
| 223 |
+
|
| 224 |
+
// Create score popup
|
| 225 |
+
const popup = document.createElement('div');
|
| 226 |
+
popup.className = 'score-popup absolute text-green-600 font-bold';
|
| 227 |
+
popup.textContent = `+${points}`;
|
| 228 |
+
popup.style.top = `${e.clientY}px`;
|
| 229 |
+
popup.style.left = `${e.clientX}px`;
|
| 230 |
+
document.body.appendChild(popup);
|
| 231 |
+
|
| 232 |
+
// Remove popup after animation
|
| 233 |
+
setTimeout(() => {
|
| 234 |
+
popup.remove();
|
| 235 |
+
}, 1000);
|
| 236 |
+
|
| 237 |
+
// Add effects
|
| 238 |
+
idol.classList.add('shake');
|
| 239 |
+
|
| 240 |
+
// After shake, explode and remove
|
| 241 |
+
setTimeout(() => {
|
| 242 |
+
idol.classList.remove('shake');
|
| 243 |
+
idol.classList.add('explode');
|
| 244 |
+
|
| 245 |
+
setTimeout(() => {
|
| 246 |
+
idol.remove();
|
| 247 |
+
}, 500);
|
| 248 |
+
}, 500);
|
| 249 |
+
}
|
| 250 |
+
|
| 251 |
+
function endGame() {
|
| 252 |
+
clearInterval(gameInterval);
|
| 253 |
+
clearInterval(timeInterval);
|
| 254 |
+
isGameRunning = false;
|
| 255 |
+
startBtn.disabled = false;
|
| 256 |
+
|
| 257 |
+
// Clear all idols
|
| 258 |
+
idolsContainer.innerHTML = '';
|
| 259 |
+
|
| 260 |
+
// Show message with final score
|
| 261 |
+
finalScoreDisplay.innerHTML = `Your final score: <span class="font-bold">${score}</span>`;
|
| 262 |
+
message.classList.remove('hidden');
|
| 263 |
+
|
| 264 |
+
// Add celebration effect if score is high
|
| 265 |
+
if (score > 200) {
|
| 266 |
+
message.innerHTML = `
|
| 267 |
+
<i class="fas fa-fire text-5xl text-red-500 mb-4"></i>
|
| 268 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-2">MashaAllah! Great Job!</h2>
|
| 269 |
+
<p class="text-xl text-gray-600 mb-4">Your final score: <span class="font-bold">${score}</span></p>
|
| 270 |
+
<button id="restartBtn" class="bg-amber-600 hover:bg-amber-700 text-white font-bold py-2 px-6 rounded-full transition">
|
| 271 |
+
<i class="fas fa-redo mr-2"></i> Play Again
|
| 272 |
+
</button>
|
| 273 |
+
`;
|
| 274 |
+
document.getElementById('restartBtn').addEventListener('click', startGame);
|
| 275 |
+
}
|
| 276 |
+
}
|
| 277 |
+
</script>
|
| 278 |
+
<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=amirpoorazima/usa-delete" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 279 |
+
</html>
|
prompts.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
🕋 destroy game
|