Spaces:
Running
Running
Add 2 files
Browse filesFiles changed (2)
- README.md+7-5
- index.html+652-19
12345678910---title: Iflid Createemoji: 🌍colorFrom: yellowcolorTo: redsdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112---title: iflid-createemoji: 🐳colorFrom: purplecolorTo: greensdk: staticpinned: falsetags:- deepsite---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652<!DOCTYPE html><html lang="fr"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Gold Rush Idle</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 shake {0% { transform: translateX(0); }25% { transform: translateX(-5px); }50% { transform: translateX(5px); }75% { transform: translateX(-5px); }100% { transform: translateX(0); }}.shake {animation: shake 0.3s;}.progress-bar {transition: width 0.1s linear;}.tooltip {position: relative;display: inline-block;}.tooltip .tooltip-text {visibility: hidden;width: 200px;background-color: #333;color: #fff;text-align: center;border-radius: 6px;padding: 5px;position: absolute;z-index: 1;bottom: 125%;left: 50%;transform: translateX(-50%);opacity: 0;transition: opacity 0.3s;}.tooltip:hover .tooltip-text {visibility: visible;opacity: 1;}.particle {position: absolute;background-color: gold;border-radius: 50%;pointer-events: none;}</style></head><body class="bg-gray-900 text-yellow-100 min-h-screen flex flex-col"><div class="container mx-auto px-4 py-8 flex-grow"><header class="mb-8 text-center"><h1 class="text-4xl md:text-5xl font-bold text-yellow-400 mb-2">Gold Rush Idle</h1><div class="flex justify-center items-center"><div class="bg-yellow-800 p-4 rounded-lg shadow-lg"><div class="flex items-center"><i class="fas fa-coins text-yellow-400 text-2xl mr-2"></i><span id="gold-counter" class="text-2xl font-bold">0</span><span class="text-lg ml-1">or</span></div><div class="text-sm text-yellow-200 mt-1"><span id="gps-counter">0</span> or par seconde</div></div></div></header><main class="grid grid-cols-1 lg:grid-cols-3 gap-8"><!-- Section de minage --><div class="lg:col-span-2 bg-gray-800 p-6 rounded-lg shadow-lg"><h2 class="text-2xl font-bold text-yellow-400 mb-4">Mine d'or</h2><div class="flex flex-col items-center"><button id="mine-button" class="relative bg-yellow-700 hover:bg-yellow-600 text-yellow-100 font-bold py-8 px-8 rounded-full shadow-lg transition transform hover:scale-105 mb-4"><i class="fas fa-gem text-4xl"></i><div class="absolute -bottom-2 left-0 right-0 bg-yellow-900 h-2 rounded-full overflow-hidden"><div id="click-cooldown" class="progress-bar bg-yellow-400 h-full" style="width: 0%"></div></div></button><p class="text-yellow-200 mb-4">Cliquez pour miner de l'or!</p><div class="w-full bg-gray-700 h-4 rounded-full overflow-hidden mb-2"><div id="mine-progress" class="progress-bar bg-yellow-500 h-full" style="width: 0%"></div></div><p class="text-sm text-gray-400">Progression dans la mine: <span id="mine-depth">0</span>m</p></div></div><!-- Section des améliorations --><div class="bg-gray-800 p-6 rounded-lg shadow-lg"><h2 class="text-2xl font-bold text-yellow-400 mb-4">Améliorations</h2><div class="space-y-4"><!-- Pioche --><div class="bg-gray-700 p-4 rounded-lg"><div class="flex justify-between items-center"><div><h3 class="font-bold text-yellow-300">Pioche améliorée</h3><p class="text-sm text-gray-300">+1 or par clic</p></div><button id="upgrade-pickaxe" class="bg-yellow-600 hover:bg-yellow-500 text-white font-bold py-2 px-4 rounded disabled:opacity-50 disabled:cursor-not-allowed" disabled><span class="flex items-center"><i class="fas fa-arrow-up mr-1"></i><span id="pickaxe-cost">50</span> or</span></button></div><div class="mt-2 text-xs text-gray-400">Niveau: <span id="pickaxe-level">1</span></div></div><!-- Dynamite --><div class="bg-gray-700 p-4 rounded-lg"><div class="flex justify-between items-center"><div><h3 class="font-bold text-yellow-300">Dynamite</h3><p class="text-sm text-gray-300">Mine automatiquement toutes les 10 secondes</p></div><button id="upgrade-dynamite" class="bg-yellow-600 hover:bg-yellow-500 text-white font-bold py-2 px-4 rounded disabled:opacity-50 disabled:cursor-not-allowed" disabled><span class="flex items-center"><i class="fas fa-arrow-up mr-1"></i><span id="dynamite-cost">200</span> or</span></button></div><div class="mt-2 text-xs text-gray-400">Niveau: <span id="dynamite-level">0</span></div></div><!-- Mineur --><div class="bg-gray-700 p-4 rounded-lg"><div class="flex justify-between items-center"><div><h3 class="font-bold text-yellow-300">Mineur</h3><p class="text-sm text-gray-300">+0.5 or par seconde</p></div><button id="hire-miner" class="bg-yellow-600 hover:bg-yellow-500 text-white font-bold py-2 px-4 rounded disabled:opacity-50 disabled:cursor-not-allowed" disabled><span class="flex items-center"><i class="fas fa-user-plus mr-1"></i><span id="miner-cost">100</span> or</span></button></div><div class="mt-2 text-xs text-gray-400">Mineurs: <span id="miner-count">0</span></div></div><!-- Foreuse --><div class="bg-gray-700 p-4 rounded-lg"><div class="flex justify-between items-center"><div><h3 class="font-bold text-yellow-300">Foreuse</h3><p class="text-sm text-gray-300">+5 or par seconde</p></div><button id="buy-drill" class="bg-yellow-600 hover:bg-yellow-500 text-white font-bold py-2 px-4 rounded disabled:opacity-50 disabled:cursor-not-allowed" disabled><span class="flex items-center"><i class="fas fa-industry mr-1"></i><span id="drill-cost">1000</span> or</span></button></div><div class="mt-2 text-xs text-gray-400">Foreuses: <span id="drill-count">0</span></div></div></div></div><!-- Section des statistiques --><div class="lg:col-span-3 bg-gray-800 p-6 rounded-lg shadow-lg"><h2 class="text-2xl font-bold text-yellow-400 mb-4">Statistiques</h2><div class="grid grid-cols-1 md:grid-cols-3 gap-4"><div class="bg-gray-700 p-4 rounded-lg"><h3 class="font-bold text-yellow-300 mb-2">Production</h3><ul class="space-y-2"><li class="flex justify-between"><span>Or total:</span><span id="total-gold">0</span></li><li class="flex justify-between"><span>Or par clic:</span><span id="gold-per-click">1</span></li><li class="flex justify-between"><span>Or par seconde:</span><span id="gold-per-second">0</span></li><li class="flex justify-between"><span>Nombre de clics:</span><span id="click-count">0</span></li></ul></div><div class="bg-gray-700 p-4 rounded-lg"><h3 class="font-bold text-yellow-300 mb-2">Progression</h3><ul class="space-y-2"><li class="flex justify-between"><span>Profondeur:</span><span id="mine-depth-stats">0</span>m</li><li class="flex justify-between"><span>Prochaine couche:</span><span id="next-layer">100</span>m</li><li class="flex justify-between"><span>Couches découvertes:</span><span id="layers-discovered">0</span></li><li class="flex justify-between"><span>Bonus de profondeur:</span><span id="depth-bonus">0%</span></li></ul></div><div class="bg-gray-700 p-4 rounded-lg"><h3 class="font-bold text-yellow-300 mb-2">Récompenses</h3><div class="space-y-2"><div class="tooltip"><div class="flex items-center text-gray-300"><i class="fas fa-trophy text-yellow-400 mr-2"></i><span>Nouveau mineur</span></div><span class="tooltip-text">Atteignez 1000 or pour débloquer un mineur gratuit!</span></div><div class="tooltip"><div class="flex items-center text-gray-300 opacity-50"><i class="fas fa-trophy text-gray-400 mr-2"></i><span>Expert en dynamite</span></div><span class="tooltip-text">Atteignez le niveau 5 de dynamite pour débloquer ce succès</span></div><div class="tooltip"><div class="flex items-center text-gray-300 opacity-50"><i class="fas fa-trophy text-gray-400 mr-2"></i><span>Foreur professionnel</span></div><span class="tooltip-text">Achetez 3 foreuses pour débloquer ce succès</span></div></div></div></div></div></main></div><footer class="bg-gray-800 py-4 text-center text-gray-400 text-sm"><p>Gold Rush Idle - Un jeu de clic et d'accumulation</p></footer><script>// Variables du jeulet gold = 0;let totalGold = 0;let goldPerClick = 1;let goldPerSecond = 0;let clickCount = 0;let mineProgress = 0;let mineDepth = 0;let nextLayer = 100;let layersDiscovered = 0;// Améliorationslet pickaxeLevel = 1;let dynamiteLevel = 0;let miners = 0;let drills = 0;// Coûtsconst pickaxeCosts = [50, 150, 500, 1500, 5000];const dynamiteCosts = [200, 600, 1800, 5400, 16200];const minerCosts = [100, 300, 900, 2700, 8100];const drillCosts = [1000, 3000, 9000, 27000, 81000];// Intervales de jeulet gameInterval;let dynamiteInterval;let saveInterval;// Initialisation du jeufunction initGame() {loadGame();updateUI();startGameLoop();setupEventListeners();}// Boucle principale du jeufunction startGameLoop() {gameInterval = setInterval(() => {// Production automatiqueconst production = goldPerSecond / 10;if (production > 0) {addGold(production);}// Progression dans la mineif (mineProgress < 100) {mineProgress += 0.1;if (mineProgress >= 100) {mineProgress = 0;mineDepth += 1;layersDiscovered = Math.floor(mineDepth / 100);nextLayer = (layersDiscovered + 1) * 100;// Bonus de profondeurconst depthBonus = layersDiscovered * 5;goldPerClick = 1 + pickaxeLevel + (depthBonus / 100);// Animation spéciale quand on atteint une nouvelle coucheif (mineDepth % 100 === 0) {document.getElementById('mine-button').classList.add('animate-pulse');setTimeout(() => {document.getElementById('mine-button').classList.remove('animate-pulse');}, 1000);}}}updateUI();}, 100);// Sauvegarde automatique toutes les 30 secondessaveInterval = setInterval(saveGame, 30000);}// Configuration des écouteurs d'événementsfunction setupEventListeners() {// Bouton de minageconst mineButton = document.getElementById('mine-button');mineButton.addEventListener('click', mineGold);// Boutons d'améliorationdocument.getElementById('upgrade-pickaxe').addEventListener('click', () => upgrade('pickaxe'));document.getElementById('upgrade-dynamite').addEventListener('click', () => upgrade('dynamite'));document.getElementById('hire-miner').addEventListener('click', () => upgrade('miner'));document.getElementById('buy-drill').addEventListener('click', () => upgrade('drill'));// Effet de clic sur les boutonsconst buttons = document.querySelectorAll('button');buttons.forEach(button => {button.addEventListener('mousedown', () => {button.classList.add('scale-95');});button.addEventListener('mouseup', () => {button.classList.remove('scale-95');});button.addEventListener('mouseleave', () => {button.classList.remove('scale-95');});});}// Fonction de minagefunction mineGold() {// Animationconst mineButton = document.getElementById('mine-button');mineButton.classList.add('shake');setTimeout(() => mineButton.classList.remove('shake'), 300);// Ajout de l'oraddGold(goldPerClick);clickCount++;// Barre de cooldownconst cooldownBar = document.getElementById('click-cooldown');cooldownBar.style.width = '100%';let width = 100;const cooldownInterval = setInterval(() => {width -= 5;cooldownBar.style.width = width + '%';if (width <= 0) {clearInterval(cooldownInterval);}}, 50);// Particules d'orcreateParticles(mineButton);// Mise à jour de l'UIupdateUI();}// Ajout d'or avec vérification des achats possiblesfunction addGold(amount) {gold += amount;totalGold += amount;// Vérifier si on peut acheter des améliorationscheckPurchases();// Mise à jour du compteur avec animationconst goldCounter = document.getElementById('gold-counter');goldCounter.classList.add('scale-110');setTimeout(() => goldCounter.classList.remove('scale-110'), 200);}// Achat d'améliorationfunction upgrade(type) {let cost = 0;switch(type) {case 'pickaxe':cost = pickaxeCosts[pickaxeLevel - 1];if (gold >= cost) {gold -= cost;pickaxeLevel++;goldPerClick = 1 + pickaxeLevel + (layersDiscovered * 5 / 100);}break;case 'dynamite':cost = dynamiteCosts[dynamiteLevel];if (gold >= cost) {gold -= cost;dynamiteLevel++;// Mise à jour de la production par secondegoldPerSecond += 0.5;// Si c'est le premier niveau, démarrer l'intervalleif (dynamiteLevel === 1) {dynamiteInterval = setInterval(() => {addGold(dynamiteLevel * 5);// Animation de la dynamiteconst mineButton = document.getElementById('mine-button');mineButton.classList.add('bg-red-500');setTimeout(() => mineButton.classList.remove('bg-red-500'), 300);}, 10000);}}break;case 'miner':cost = minerCosts[miners];if (gold >= cost) {gold -= cost;miners++;goldPerSecond += 0.5;}break;case 'drill':cost = drillCosts[drills];if (gold >= cost) {gold -= cost;drills++;goldPerSecond += 5;}break;}checkPurchases();updateUI();}// Vérification des achats possiblesfunction checkPurchases() {document.getElementById('upgrade-pickaxe').disabled = gold < pickaxeCosts[pickaxeLevel - 1] || pickaxeLevel >= 5;document.getElementById('upgrade-dynamite').disabled = gold < dynamiteCosts[dynamiteLevel] || dynamiteLevel >= 5;document.getElementById('hire-miner').disabled = gold < minerCosts[miners] || miners >= 5;document.getElementById('buy-drill').disabled = gold < drillCosts[drills] || drills >= 5;}// Mise à jour de l'interface utilisateurfunction updateUI() {// Compteursdocument.getElementById('gold-counter').textContent = Math.floor(gold);document.getElementById('total-gold').textContent = Math.floor(totalGold);document.getElementById('gps-counter').textContent = goldPerSecond.toFixed(1);document.getElementById('gold-per-click').textContent = goldPerClick.toFixed(1);document.getElementById('gold-per-second').textContent = goldPerSecond.toFixed(1);document.getElementById('click-count').textContent = clickCount;// Progression de la minedocument.getElementById('mine-progress').style.width = mineProgress + '%';document.getElementById('mine-depth').textContent = mineDepth;document.getElementById('mine-depth-stats').textContent = mineDepth;document.getElementById('next-layer').textContent = nextLayer;document.getElementById('layers-discovered').textContent = layersDiscovered;document.getElementById('depth-bonus').textContent = (layersDiscovered * 5) + '%';// Niveaux des améliorationsdocument.getElementById('pickaxe-level').textContent = pickaxeLevel;document.getElementById('dynamite-level').textContent = dynamiteLevel;document.getElementById('miner-count').textContent = miners;document.getElementById('drill-count').textContent = drills;// Coûtsif (pickaxeLevel < 5) {document.getElementById('pickaxe-cost').textContent = pickaxeCosts[pickaxeLevel - 1];} else {document.getElementById('upgrade-pickaxe').textContent = "Niveau max";}if (dynamiteLevel < 5) {document.getElementById('dynamite-cost').textContent = dynamiteCosts[dynamiteLevel];} else {document.getElementById('upgrade-dynamite').textContent = "Niveau max";}if (miners < 5) {document.getElementById('miner-cost').textContent = minerCosts[miners];} else {document.getElementById('hire-miner').textContent = "Max atteint";}if (drills < 5) {document.getElementById('drill-cost').textContent = drillCosts[drills];} else {document.getElementById('buy-drill').textContent = "Max atteint";}}// Création de particules d'orfunction createParticles(element) {const rect = element.getBoundingClientRect();const centerX = rect.left + rect.width / 2;const centerY = rect.top + rect.height / 2;for (let i = 0; i < 5; i++) {const particle = document.createElement('div');particle.className = 'particle';const size = Math.random() * 8 + 4;particle.style.width = `${size}px`;particle.style.height = `${size}px`;const angle = Math.random() * Math.PI * 2;const distance = Math.random() * 30 + 20;const duration = Math.random() * 1000 + 500;particle.style.left = `${centerX}px`;particle.style.top = `${centerY}px`;document.body.appendChild(particle);const animation = particle.animate([{transform: `translate(0, 0) rotate(0deg)`,opacity: 1},{transform: `translate(${Math.cos(angle) * distance}px, ${Math.sin(angle) * distance}px) rotate(${Math.random() * 360}deg)`,opacity: 0}], {duration: duration,easing: 'cubic-bezier(0.4, 0, 0.2, 1)'});animation.onfinish = () => {particle.remove();};}}// Sauvegarde du jeufunction saveGame() {const gameData = {gold,totalGold,goldPerClick,goldPerSecond,clickCount,mineProgress,mineDepth,layersDiscovered,pickaxeLevel,dynamiteLevel,miners,drills,lastSave: Date.now()};localStorage.setItem('goldRushIdleSave', JSON.stringify(gameData));// Notification de sauvegardeconst notification = document.createElement('div');notification.className = 'fixed bottom-4 right-4 bg-green-600 text-white px-4 py-2 rounded-lg shadow-lg';notification.textContent = 'Jeu sauvegardé!';document.body.appendChild(notification);setTimeout(() => {notification.classList.add('opacity-0', 'transition-opacity', 'duration-500');setTimeout(() => notification.remove(), 500);}, 2000);}// Chargement du jeufunction loadGame() {const savedData = localStorage.getItem('goldRushIdleSave');if (savedData) {const gameData = JSON.parse(savedData);gold = gameData.gold || 0;totalGold = gameData.totalGold || 0;goldPerClick = gameData.goldPerClick || 1;goldPerSecond = gameData.goldPerSecond || 0;clickCount = gameData.clickCount || 0;mineProgress = gameData.mineProgress || 0;mineDepth = gameData.mineDepth || 0;layersDiscovered = gameData.layersDiscovered || 0;pickaxeLevel = gameData.pickaxeLevel || 1;dynamiteLevel = gameData.dynamiteLevel || 0;miners = gameData.miners || 0;drills = gameData.drills || 0;// Calculer l'or gagné pendant l'absenceif (gameData.lastSave) {const offlineTime = Date.now() - gameData.lastSave;const offlineSeconds = offlineTime / 1000;const offlineGold = goldPerSecond * offlineSeconds;if (offlineGold > 0) {gold += offlineGold;totalGold += offlineGold;// Notification d'or hors ligneconst notification = document.createElement('div');notification.className = 'fixed bottom-4 right-4 bg-blue-600 text-white px-4 py-2 rounded-lg shadow-lg';notification.textContent = `+${Math.floor(offlineGold)} or pendant votre absence!`;document.body.appendChild(notification);setTimeout(() => {notification.classList.add('opacity-0', 'transition-opacity', 'duration-500');setTimeout(() => notification.remove(), 500);}, 3000);}}// Redémarrer l'intervalle de dynamite si nécessaireif (dynamiteLevel > 0) {dynamiteInterval = setInterval(() => {addGold(dynamiteLevel * 5);}, 10000);}}}// Démarrer le jeu quand la page est chargéewindow.addEventListener('load', initGame);// Sauvegarder quand la page se fermewindow.addEventListener('beforeunload', saveGame);</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=mdavis55/iflid-create" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
README.md+7-5
index.html+652-19