ufo-maze-runner / index.html
CommanderLazarus's picture
Allow the screen to rotate and tilt to up to a 45 degree angle.
ed45bd4 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UFO Maze Runner 🛸</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
</head>
<body class="bg-gray-900 text-white min-h-screen flex flex-col">
<custom-navbar></custom-navbar>
<main class="flex-grow container mx-auto px-4 py-8">
<div class="text-center mb-8">
<h1 class="text-4xl font-bold mb-2">UFO Maze Runner 🛸</h1>
<p class="text-xl text-gray-300">Navigate your UFO through the cosmic maze!</p>
</div>
<div class="flex flex-col lg:flex-row gap-8">
<div class="lg:w-2/3">
<div class="bg-gray-800 rounded-lg p-4 shadow-lg">
<div id="maze-container" class="relative overflow-hidden rounded-lg">
<canvas id="maze-canvas" class="w-full h-full bg-gray-900"></canvas>
</div>
</div>
</div>
<div class="lg:w-1/3">
<div class="bg-gray-800 rounded-lg p-6 shadow-lg">
<h2 class="text-2xl font-bold mb-4">Controls</h2>
<div class="grid grid-cols-3 gap-4 mb-6">
<button id="up-btn" class="bg-indigo-600 hover:bg-indigo-700 text-white p-4 rounded-lg flex items-center justify-center">
<i data-feather="arrow-up"></i>
</button>
<div></div>
<div></div>
<button id="left-btn" class="bg-indigo-600 hover:bg-indigo-700 text-white p-4 rounded-lg flex items-center justify-center">
<i data-feather="arrow-left"></i>
</button>
<button id="down-btn" class="bg-indigo-600 hover:bg-indigo-700 text-white p-4 rounded-lg flex items-center justify-center">
<i data-feather="arrow-down"></i>
</button>
<button id="right-btn" class="bg-indigo-600 hover:bg-indigo-700 text-white p-4 rounded-lg flex items-center justify-center">
<i data-feather="arrow-right"></i>
</button>
</div>
<div class="mb-6">
<h3 class="text-lg font-semibold mb-2">Difficulty</h3>
<select id="difficulty" class="w-full bg-gray-700 border border-gray-600 rounded-lg px-4 py-2">
<option value="easy">Easy</option>
<option value="medium" selected>Medium</option>
<option value="hard">Hard</option>
</select>
</div>
<button id="start-btn" class="w-full bg-green-600 hover:bg-green-700 text-white py-3 rounded-lg font-bold">
Start Game
</button>
<div class="mt-4">
<label class="inline-flex items-center cursor-pointer">
<input type="checkbox" id="tilt-control" class="sr-only peer">
<div class="relative w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[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>
<span class="ms-3 text-sm font-medium">Tilt Controls</span>
</label>
</div>
<div class="mt-6 pt-4 border-t border-gray-700">
<h3 class="text-lg font-semibold mb-2">Stats</h3>
<div class="flex justify-between">
<span>Time:</span>
<span id="time">00:00</span>
</div>
<div class="flex justify-between">
<span>Moves:</span>
<span id="moves">0</span>
</div>
</div>
</div>
</div>
</div>
</main>
<custom-footer></custom-footer>
<script src="script.js"></script>
<script>
feather.replace();
</script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>