Add 2 files
Browse files- README.md +7 -5
- index.html +427 -19
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: space1
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: green
|
| 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,427 @@
|
|
| 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>Interactive Space Explorer</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 |
+
/* Custom CSS for animations and effects */
|
| 11 |
+
.planet-card {
|
| 12 |
+
transition: all 0.3s ease;
|
| 13 |
+
transform-style: preserve-3d;
|
| 14 |
+
}
|
| 15 |
+
.planet-card:hover {
|
| 16 |
+
transform: translateY(-10px) scale(1.05);
|
| 17 |
+
box-shadow: 0 20px 25px -5px rgba(255, 255, 255, 0.1), 0 10px 10px -5px rgba(255, 255, 255, 0.04);
|
| 18 |
+
}
|
| 19 |
+
.star {
|
| 20 |
+
position: absolute;
|
| 21 |
+
background-color: white;
|
| 22 |
+
border-radius: 50%;
|
| 23 |
+
animation: twinkle var(--duration) infinite ease-in-out;
|
| 24 |
+
}
|
| 25 |
+
@keyframes twinkle {
|
| 26 |
+
0%, 100% { opacity: 0.2; }
|
| 27 |
+
50% { opacity: 1; }
|
| 28 |
+
}
|
| 29 |
+
.spaceship {
|
| 30 |
+
animation: float 6s ease-in-out infinite;
|
| 31 |
+
}
|
| 32 |
+
@keyframes float {
|
| 33 |
+
0%, 100% { transform: translateY(0); }
|
| 34 |
+
50% { transform: translateY(-20px); }
|
| 35 |
+
}
|
| 36 |
+
.gradient-bg {
|
| 37 |
+
background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
|
| 38 |
+
}
|
| 39 |
+
</style>
|
| 40 |
+
</head>
|
| 41 |
+
<body class="gradient-bg text-white min-h-screen font-sans overflow-x-hidden">
|
| 42 |
+
<!-- Star background -->
|
| 43 |
+
<div id="stars-container" class="fixed inset-0 overflow-hidden z-0"></div>
|
| 44 |
+
|
| 45 |
+
<!-- Header with animated spaceship -->
|
| 46 |
+
<header class="relative z-10 py-8 px-4 sm:px-6 lg:px-8">
|
| 47 |
+
<div class="container mx-auto flex flex-col items-center">
|
| 48 |
+
<div class="flex items-center mb-6">
|
| 49 |
+
<i class="fas fa-rocket text-4xl text-purple-400 mr-4 spaceship"></i>
|
| 50 |
+
<h1 class="text-4xl md:text-5xl font-bold bg-clip-text text-transparent bg-gradient-to-r from-purple-400 to-blue-500">
|
| 51 |
+
Space Explorer
|
| 52 |
+
</h1>
|
| 53 |
+
</div>
|
| 54 |
+
<p class="text-lg text-gray-300 max-w-2xl text-center mb-8">
|
| 55 |
+
Explore our solar system's wonders. Click on planets to discover fascinating facts about each celestial body.
|
| 56 |
+
</p>
|
| 57 |
+
<div class="relative w-full max-w-xl">
|
| 58 |
+
<input
|
| 59 |
+
type="text"
|
| 60 |
+
id="search-planets"
|
| 61 |
+
placeholder="Search planets..."
|
| 62 |
+
class="w-full bg-gray-800 bg-opacity-50 border border-gray-700 rounded-full py-3 px-6 text-white focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent"
|
| 63 |
+
>
|
| 64 |
+
<button class="absolute right-3 top-1/2 transform -translate-y-1/2 text-gray-400 hover:text-white">
|
| 65 |
+
<i class="fas fa-search"></i>
|
| 66 |
+
</button>
|
| 67 |
+
</div>
|
| 68 |
+
</div>
|
| 69 |
+
</header>
|
| 70 |
+
|
| 71 |
+
<main class="relative z-10 py-8 px-4 sm:px-6 lg:px-8">
|
| 72 |
+
<!-- Solar System Visualization -->
|
| 73 |
+
<div class="container mx-auto mb-16">
|
| 74 |
+
<h2 class="text-2xl font-semibold mb-6 flex items-center">
|
| 75 |
+
<i class="fas fa-solar-panel mr-3 text-yellow-400"></i>
|
| 76 |
+
Our Solar System
|
| 77 |
+
</h2>
|
| 78 |
+
|
| 79 |
+
<div class="relative h-64 md:h-96 w-full mb-12 overflow-hidden rounded-xl bg-black bg-opacity-30 border border-gray-800">
|
| 80 |
+
<!-- Orbits -->
|
| 81 |
+
<div class="absolute inset-0 flex items-center justify-center">
|
| 82 |
+
<div class="orbit mercury-orbit"></div>
|
| 83 |
+
<div class="orbit venus-orbit"></div>
|
| 84 |
+
<div class="orbit earth-orbit"></div>
|
| 85 |
+
<div class="orbit mars-orbit"></div>
|
| 86 |
+
<div class="orbit jupiter-orbit"></div>
|
| 87 |
+
<div class="orbit saturn-orbit"></div>
|
| 88 |
+
<div class="orbit uranus-orbit"></div>
|
| 89 |
+
<div class="orbit neptune-orbit"></div>
|
| 90 |
+
</div>
|
| 91 |
+
|
| 92 |
+
<!-- Sun -->
|
| 93 |
+
<div
|
| 94 |
+
class="sun absolute left-1/4 top-1/2 transform -translate-x-1/2 -translate-y-1/2 w-16 h-16 md:w-20 md:h-20 rounded-full bg-gradient-to-br from-yellow-500 to-red-600 shadow-lg shadow-yellow-500/50 cursor-pointer"
|
| 95 |
+
onclick="showPlanetInfo('sun')"
|
| 96 |
+
></div>
|
| 97 |
+
|
| 98 |
+
<!-- Planets will be positioned here by JavaScript -->
|
| 99 |
+
</div>
|
| 100 |
+
|
| 101 |
+
<!-- Planet Cards Grid -->
|
| 102 |
+
<div id="planet-cards" class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
|
| 103 |
+
<!-- Cards will be generated by JavaScript -->
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
|
| 107 |
+
<!-- Facts Section -->
|
| 108 |
+
<div class="container mx-auto mb-16">
|
| 109 |
+
<h2 class="text-2xl font-semibold mb-6 flex items-center">
|
| 110 |
+
<i class="fas fa-star mr-3 text-blue-400"></i>
|
| 111 |
+
Space Facts
|
| 112 |
+
</h2>
|
| 113 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
| 114 |
+
<div class="bg-gray-800 bg-opacity-50 p-6 rounded-xl border border-gray-700 hover:border-blue-400 transition-all">
|
| 115 |
+
<div class="text-blue-400 text-3xl mb-4">
|
| 116 |
+
<i class="fas fa-temperature-high"></i>
|
| 117 |
+
</div>
|
| 118 |
+
<h3 class="text-xl font-semibold mb-2">Extreme Temperatures</h3>
|
| 119 |
+
<p class="text-gray-300">Mercury's surface temperature varies from -173°C at night to 427°C during the day.</p>
|
| 120 |
+
</div>
|
| 121 |
+
<div class="bg-gray-800 bg-opacity-50 p-6 rounded-xl border border-gray-700 hover:border-purple-400 transition-all">
|
| 122 |
+
<div class="text-purple-400 text-3xl mb-4">
|
| 123 |
+
<i class="fas fa-wind"></i>
|
| 124 |
+
</div>
|
| 125 |
+
<h3 class="text-xl font-semibold mb-2">Powerful Winds</h3>
|
| 126 |
+
<p class="text-gray-300">Neptune has the strongest winds in the solar system, reaching speeds of 2,100 km/h.</p>
|
| 127 |
+
</div>
|
| 128 |
+
<div class="bg-gray-800 bg-opacity-50 p-6 rounded-xl border border-gray-700 hover:border-yellow-400 transition-all">
|
| 129 |
+
<div class="text-yellow-400 text-3xl mb-4">
|
| 130 |
+
<i class="fas fa-expand"></i>
|
| 131 |
+
</div>
|
| 132 |
+
<h3 class="text-xl font-semibold mb-2">Gigantic Size</h3>
|
| 133 |
+
<p class="text-gray-300">Jupiter is so large that all other planets in the solar system could fit inside it.</p>
|
| 134 |
+
</div>
|
| 135 |
+
</div>
|
| 136 |
+
</div>
|
| 137 |
+
</main>
|
| 138 |
+
|
| 139 |
+
<!-- Planet Info Modal -->
|
| 140 |
+
<div id="planet-modal" class="fixed inset-0 bg-black bg-opacity-75 flex items-center justify-center z-50 hidden">
|
| 141 |
+
<div class="bg-gray-900 rounded-xl max-w-2xl w-full mx-4 p-6 relative border border-gray-700">
|
| 142 |
+
<button onclick="closeModal()" class="absolute top-4 right-4 text-gray-400 hover:text-white">
|
| 143 |
+
<i class="fas fa-times text-2xl"></i>
|
| 144 |
+
</button>
|
| 145 |
+
<div class="flex flex-col md:flex-row gap-6">
|
| 146 |
+
<div class="flex-shrink-0">
|
| 147 |
+
<div id="modal-planet-image" class="w-32 h-32 md:w-48 md:h-48 rounded-full"></div>
|
| 148 |
+
</div>
|
| 149 |
+
<div>
|
| 150 |
+
<h2 id="modal-planet-name" class="text-3xl font-bold mb-2"></h2>
|
| 151 |
+
<div id="modal-planet-tags" class="flex flex-wrap gap-2 mb-4"></div>
|
| 152 |
+
<p id="modal-planet-description" class="text-gray-300 mb-4"></p>
|
| 153 |
+
<div class="grid grid-cols-2 gap-4">
|
| 154 |
+
<div>
|
| 155 |
+
<p class="text-gray-400">Distance from Sun</p>
|
| 156 |
+
<p id="modal-planet-distance" class="text-lg"></p>
|
| 157 |
+
</div>
|
| 158 |
+
<div>
|
| 159 |
+
<p class="text-gray-400">Diameter</p>
|
| 160 |
+
<p id="modal-planet-diameter" class="text-lg"></p>
|
| 161 |
+
</div>
|
| 162 |
+
<div>
|
| 163 |
+
<p class="text-gray-400">Orbital Period</p>
|
| 164 |
+
<p id="modal-planet-period" class="text-lg"></p>
|
| 165 |
+
</div>
|
| 166 |
+
<div>
|
| 167 |
+
<p class="text-gray-400">Surface Temp</p>
|
| 168 |
+
<p id="modal-planet-temp" class="text-lg"></p>
|
| 169 |
+
</div>
|
| 170 |
+
</div>
|
| 171 |
+
</div>
|
| 172 |
+
</div>
|
| 173 |
+
</div>
|
| 174 |
+
</div>
|
| 175 |
+
|
| 176 |
+
<footer class="relative z-10 py-8 px-4 sm:px-6 lg:px-8 border-t border-gray-800">
|
| 177 |
+
<div class="container mx-auto text-center text-gray-400">
|
| 178 |
+
<p>© 2023 Space Explorer. All astronomical data is approximate.</p>
|
| 179 |
+
<div class="flex justify-center space-x-4 mt-4">
|
| 180 |
+
<a href="#" class="hover:text-white"><i class="fab fa-twitter"></i></a>
|
| 181 |
+
<a href="#" class="hover:text-white"><i class="fab fa-github"></i></a>
|
| 182 |
+
<a href="#" class="hover:text-white"><i class="fab fa-linkedin"></i></a>
|
| 183 |
+
</div>
|
| 184 |
+
</div>
|
| 185 |
+
</footer>
|
| 186 |
+
|
| 187 |
+
<script>
|
| 188 |
+
// Create stars background
|
| 189 |
+
function createStars() {
|
| 190 |
+
const container = document.getElementById('stars-container');
|
| 191 |
+
const starCount = 200;
|
| 192 |
+
|
| 193 |
+
for (let i = 0; i < starCount; i++) {
|
| 194 |
+
const star = document.createElement('div');
|
| 195 |
+
star.classList.add('star');
|
| 196 |
+
|
| 197 |
+
// Random properties for each star
|
| 198 |
+
const size = Math.random() * 3;
|
| 199 |
+
const posX = Math.random() * 100;
|
| 200 |
+
const posY = Math.random() * 100;
|
| 201 |
+
const duration = 2 + Math.random() * 5;
|
| 202 |
+
|
| 203 |
+
star.style.width = `${size}px`;
|
| 204 |
+
star.style.height = `${size}px`;
|
| 205 |
+
star.style.left = `${posX}%`;
|
| 206 |
+
star.style.top = `${posY}%`;
|
| 207 |
+
star.style.setProperty('--duration', `${duration}s`);
|
| 208 |
+
|
| 209 |
+
container.appendChild(star);
|
| 210 |
+
}
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
// Planet data
|
| 214 |
+
const planets = [
|
| 215 |
+
{
|
| 216 |
+
name: "Mercury",
|
| 217 |
+
color: "bg-gray-400",
|
| 218 |
+
size: "w-4 h-4 md:w-6 md:h-6",
|
| 219 |
+
position: "left-[32%] top-1/2",
|
| 220 |
+
description: "The smallest planet in our solar system and closest to the Sun. Mercury is only slightly larger than Earth's Moon.",
|
| 221 |
+
distance: "57.9 million km",
|
| 222 |
+
diameter: "4,879 km",
|
| 223 |
+
orbitalPeriod: "88 Earth days",
|
| 224 |
+
temperature: "-173°C to 427°C",
|
| 225 |
+
tags: ["Rocky", "No moons", "Fastest orbit"],
|
| 226 |
+
icon: "fas fa-temperature-low"
|
| 227 |
+
},
|
| 228 |
+
{
|
| 229 |
+
name: "Venus",
|
| 230 |
+
color: "bg-yellow-200",
|
| 231 |
+
size: "w-6 h-6 md:w-8 md:h-8",
|
| 232 |
+
position: "left-[36%] top-1/2",
|
| 233 |
+
description: "Similar in size to Earth, Venus has a toxic atmosphere of carbon dioxide with clouds of sulfuric acid.",
|
| 234 |
+
distance: "108.2 million km",
|
| 235 |
+
diameter: "12,104 km",
|
| 236 |
+
orbitalPeriod: "225 Earth days",
|
| 237 |
+
temperature: "462°C",
|
| 238 |
+
tags: ["Hottest planet", "Retrograde rotation", "No moons"],
|
| 239 |
+
icon: "fas fa-fire"
|
| 240 |
+
},
|
| 241 |
+
{
|
| 242 |
+
name: "Earth",
|
| 243 |
+
color: "bg-blue-500",
|
| 244 |
+
size: "w-6 h-6 md:w-8 md:h-8",
|
| 245 |
+
position: "left-[40%] top-1/2",
|
| 246 |
+
description: "Our home planet is the only known place in the universe confirmed to host life, with liquid water on the surface.",
|
| 247 |
+
distance: "149.6 million km",
|
| 248 |
+
diameter: "12,742 km",
|
| 249 |
+
orbitalPeriod: "365.25 days",
|
| 250 |
+
temperature: "-88°C to 58°C",
|
| 251 |
+
tags: ["Water", "Life", "Moon"],
|
| 252 |
+
icon: "fas fa-globe-americas"
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
name: "Mars",
|
| 256 |
+
color: "bg-red-400",
|
| 257 |
+
size: "w-5 h-5 md:w-7 md:h-7",
|
| 258 |
+
position: "left-[44%] top-1/2",
|
| 259 |
+
description: "The Red Planet is dusty, cold desert world with a very thin atmosphere. There is strong evidence Mars was wetter in the past.",
|
| 260 |
+
distance: "227.9 million km",
|
| 261 |
+
diameter: "6,779 km",
|
| 262 |
+
orbitalPeriod: "687 Earth days",
|
| 263 |
+
temperature: "-153°C to 20°C",
|
| 264 |
+
tags: ["Red planet", "2 moons", "Olympus Mons"],
|
| 265 |
+
icon: "fas fa-mountain"
|
| 266 |
+
},
|
| 267 |
+
{
|
| 268 |
+
name: "Jupiter",
|
| 269 |
+
color: "bg-yellow-600",
|
| 270 |
+
size: "w-10 h-10 md:w-14 md:h-14",
|
| 271 |
+
position: "left-[50%] top-1/2",
|
| 272 |
+
description: "The largest planet in our solar system, a gas giant with a Great Red Spot that's a storm larger than Earth.",
|
| 273 |
+
distance: "778.3 million km",
|
| 274 |
+
diameter: "139,820 km",
|
| 275 |
+
orbitalPeriod: "12 Earth years",
|
| 276 |
+
temperature: "-108°C",
|
| 277 |
+
tags: ["Gas giant", "79 moons", "Great Red Spot"],
|
| 278 |
+
icon: "fas fa-ring"
|
| 279 |
+
},
|
| 280 |
+
{
|
| 281 |
+
name: "Saturn",
|
| 282 |
+
color: "bg-yellow-300",
|
| 283 |
+
size: "w-9 h-9 md:w-12 md:h-12",
|
| 284 |
+
position: "left-[56%] top-1/2",
|
| 285 |
+
description: "Famous for its beautiful ring system, Saturn is a gas giant made mostly of hydrogen and helium.",
|
| 286 |
+
distance: "1.4 billion km",
|
| 287 |
+
diameter: "116,460 km",
|
| 288 |
+
orbitalPeriod: "29 Earth years",
|
| 289 |
+
temperature: "-139°C",
|
| 290 |
+
tags: ["Rings", "82 moons", "Gas giant"],
|
| 291 |
+
icon: "fas fa-ring"
|
| 292 |
+
},
|
| 293 |
+
{
|
| 294 |
+
name: "Uranus",
|
| 295 |
+
color: "bg-teal-300",
|
| 296 |
+
size: "w-7 h-7 md:w-9 md:h-9",
|
| 297 |
+
position: "left-[62%] top-1/2",
|
| 298 |
+
description: "An ice giant that rotates on its side, Uranus has a blue-green color from methane in its atmosphere.",
|
| 299 |
+
distance: "2.9 billion km",
|
| 300 |
+
diameter: "50,724 km",
|
| 301 |
+
orbitalPeriod: "84 Earth years",
|
| 302 |
+
temperature: "-197°C",
|
| 303 |
+
tags: ["Ice giant", "Sideways rotation", "13 rings"],
|
| 304 |
+
icon: "fas fa-icicles"
|
| 305 |
+
},
|
| 306 |
+
{
|
| 307 |
+
name: "Neptune",
|
| 308 |
+
color: "bg-blue-600",
|
| 309 |
+
size: "w-7 h-7 md:w-9 md:h-9",
|
| 310 |
+
position: "left-[68%] top-1/2",
|
| 311 |
+
description: "The windiest planet with the strongest winds in the solar system. Neptune was the first planet located through mathematical calculations.",
|
| 312 |
+
distance: "4.5 billion km",
|
| 313 |
+
diameter: "49,244 km",
|
| 314 |
+
orbitalPeriod: "165 Earth years",
|
| 315 |
+
temperature: "-201°C",
|
| 316 |
+
tags: ["Windiest", "14 moons", "Great Dark Spot"],
|
| 317 |
+
icon: "fas fa-wind"
|
| 318 |
+
},
|
| 319 |
+
{
|
| 320 |
+
name: "Sun",
|
| 321 |
+
color: "bg-gradient-to-br from-yellow-500 to-red-600",
|
| 322 |
+
size: "w-16 h-16 md:w-20 md:h-20",
|
| 323 |
+
position: "left-1/4 top-1/2",
|
| 324 |
+
description: "The star at the center of our solar system. It accounts for 99.86% of the mass in the solar system and is nearly a perfect sphere of hot plasma.",
|
| 325 |
+
distance: "Center of solar system",
|
| 326 |
+
diameter: "1.39 million km",
|
| 327 |
+
orbitalPeriod: "225-250 million years (galactic orbit)",
|
| 328 |
+
temperature: "5,500°C (surface), 15 million°C (core)",
|
| 329 |
+
tags: ["Star", "G2V type", "Solar flares"],
|
| 330 |
+
icon: "fas fa-sun"
|
| 331 |
+
}
|
| 332 |
+
];
|
| 333 |
+
|
| 334 |
+
// Position planets in the solar system visualization
|
| 335 |
+
function positionPlanets() {
|
| 336 |
+
const solarSystem = document.querySelector('.relative.h-64');
|
| 337 |
+
|
| 338 |
+
planets.forEach(planet => {
|
| 339 |
+
if (planet.name === "Sun") return; // Sun is already in the HTML
|
| 340 |
+
|
| 341 |
+
const planetEl = document.createElement('div');
|
| 342 |
+
planetEl.className = `planet absolute ${planet.position} transform -translate-y-1/2 rounded-full ${planet.color} ${planet.size} cursor-pointer shadow-md`;
|
| 343 |
+
planetEl.setAttribute('onclick', `showPlanetInfo('${planet.name.toLowerCase()}')`);
|
| 344 |
+
|
| 345 |
+
solarSystem.appendChild(planetEl);
|
| 346 |
+
});
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
// Generate planet cards
|
| 350 |
+
function generatePlanetCards() {
|
| 351 |
+
const container = document.getElementById('planet-cards');
|
| 352 |
+
|
| 353 |
+
planets.forEach(planet => {
|
| 354 |
+
const card = document.createElement('div');
|
| 355 |
+
card.className = 'planet-card bg-gray-800 bg-opacity-50 rounded-xl overflow-hidden border border-gray-700 hover:border-purple-500 cursor-pointer';
|
| 356 |
+
card.setAttribute('onclick', `showPlanetInfo('${planet.name.toLowerCase()}')`);
|
| 357 |
+
|
| 358 |
+
card.innerHTML = `
|
| 359 |
+
<div class="h-40 ${planet.color} flex items-center justify-center">
|
| 360 |
+
<i class="${planet.icon} text-4xl text-white opacity-80"></i>
|
| 361 |
+
</div>
|
| 362 |
+
<div class="p-6">
|
| 363 |
+
<h3 class="text-xl font-semibold mb-2">${planet.name}</h3>
|
| 364 |
+
<div class="flex flex-wrap gap-2 mb-3">
|
| 365 |
+
${planet.tags.map(tag => `<span class="text-xs px-2 py-1 bg-gray-700 rounded-full">${tag}</span>`).join('')}
|
| 366 |
+
</div>
|
| 367 |
+
<p class="text-gray-300 text-sm line-clamp-2">${planet.description}</p>
|
| 368 |
+
</div>
|
| 369 |
+
`;
|
| 370 |
+
|
| 371 |
+
container.appendChild(card);
|
| 372 |
+
});
|
| 373 |
+
}
|
| 374 |
+
|
| 375 |
+
// Show planet info modal
|
| 376 |
+
function showPlanetInfo(planetName) {
|
| 377 |
+
const planet = planets.find(p => p.name.toLowerCase() === planetName);
|
| 378 |
+
if (!planet) return;
|
| 379 |
+
|
| 380 |
+
document.getElementById('modal-planet-name').textContent = planet.name;
|
| 381 |
+
document.getElementById('modal-planet-description').textContent = planet.description;
|
| 382 |
+
document.getElementById('modal-planet-distance').textContent = planet.distance;
|
| 383 |
+
document.getElementById('modal-planet-diameter').textContent = planet.diameter;
|
| 384 |
+
document.getElementById('modal-planet-period').textContent = planet.orbitalPeriod;
|
| 385 |
+
document.getElementById('modal-planet-temp').textContent = planet.temperature;
|
| 386 |
+
|
| 387 |
+
const tagsContainer = document.getElementById('modal-planet-tags');
|
| 388 |
+
tagsContainer.innerHTML = planet.tags.map(tag =>
|
| 389 |
+
`<span class="text-sm px-3 py-1 bg-gray-800 rounded-full">${tag}</span>`
|
| 390 |
+
).join('');
|
| 391 |
+
|
| 392 |
+
const planetImage = document.getElementById('modal-planet-image');
|
| 393 |
+
planetImage.className = `w-32 h-32 md:w-48 md:h-48 rounded-full ${planet.color} flex items-center justify-center shadow-lg`;
|
| 394 |
+
planetImage.innerHTML = `<i class="${planet.icon} text-4xl text-white"></i>`;
|
| 395 |
+
|
| 396 |
+
document.getElementById('planet-modal').classList.remove('hidden');
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
// Close modal
|
| 400 |
+
function closeModal() {
|
| 401 |
+
document.getElementById('planet-modal').classList.add('hidden');
|
| 402 |
+
}
|
| 403 |
+
|
| 404 |
+
// Search functionality
|
| 405 |
+
document.getElementById('search-planets').addEventListener('input', function(e) {
|
| 406 |
+
const searchTerm = e.target.value.toLowerCase();
|
| 407 |
+
const cards = document.querySelectorAll('.planet-card');
|
| 408 |
+
|
| 409 |
+
cards.forEach(card => {
|
| 410 |
+
const planetName = card.querySelector('h3').textContent.toLowerCase();
|
| 411 |
+
if (planetName.includes(searchTerm)) {
|
| 412 |
+
card.classList.remove('hidden');
|
| 413 |
+
} else {
|
| 414 |
+
card.classList.add('hidden');
|
| 415 |
+
}
|
| 416 |
+
});
|
| 417 |
+
});
|
| 418 |
+
|
| 419 |
+
// Initialize everything when DOM is loaded
|
| 420 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 421 |
+
createStars();
|
| 422 |
+
positionPlanets();
|
| 423 |
+
generatePlanetCards();
|
| 424 |
+
});
|
| 425 |
+
</script>
|
| 426 |
+
<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=longdiyao/space1" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 427 |
+
</html>
|