Spaces:
Running
Running
File size: 12,948 Bytes
25eb3f0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cosmic Hello World</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>
.gradient-text {
background: linear-gradient(90deg, #ff4d4d, #f9cb28, #8a2be2, #4b6cb7);
background-size: 300% 300%;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
animation: gradient 8s ease infinite;
}
@keyframes gradient {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.particle {
position: absolute;
border-radius: 50%;
pointer-events: none;
}
.floating {
animation: float 6s ease-in-out infinite;
}
@keyframes float {
0% { transform: translateY(0px); }
50% { transform: translateY(-20px); }
100% { transform: translateY(0px); }
}
.pulse {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
</style>
</head>
<body class="bg-gray-900 min-h-screen flex flex-col items-center justify-center overflow-hidden relative">
<!-- Background particles -->
<div id="particles-container" class="absolute inset-0 overflow-hidden"></div>
<div class="z-10 text-center px-4 py-12 max-w-4xl mx-auto">
<!-- Animated title -->
<h1 class="gradient-text text-5xl md:text-7xl font-extrabold mb-8 floating">
Hello <span class="inline-block">World</span>!
</h1>
<!-- Interactive greeting card -->
<div class="bg-gradient-to-br from-gray-800 to-gray-900 rounded-2xl p-8 md:p-12 shadow-2xl border border-gray-700 transform transition-all duration-500 hover:scale-105">
<div class="flex justify-center mb-6">
<div class="w-24 h-24 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 flex items-center justify-center shadow-lg pulse">
<i class="fas fa-globe-americas text-white text-4xl"></i>
</div>
</div>
<p class="text-gray-300 text-lg md:text-xl mb-8">
Welcome to this interactive cosmic greeting from the digital universe!
</p>
<div class="flex flex-wrap justify-center gap-4">
<button onclick="animateHello()" class="px-6 py-3 bg-gradient-to-r from-blue-500 to-purple-600 rounded-full text-white font-semibold hover:shadow-lg hover:shadow-purple-500/30 transition-all">
<i class="fas fa-magic mr-2"></i> Animate Greeting
</button>
<button onclick="toggleTheme()" class="px-6 py-3 bg-gradient-to-r from-yellow-500 to-orange-500 rounded-full text-white font-semibold hover:shadow-lg hover:shadow-orange-500/30 transition-all">
<i class="fas fa-moon mr-2"></i> Toggle Theme
</button>
<button onclick="createConfetti()" class="px-6 py-3 bg-gradient-to-r from-green-500 to-teal-500 rounded-full text-white font-semibold hover:shadow-lg hover:shadow-teal-500/30 transition-all">
<i class="fas fa-party-horn mr-2"></i> Celebrate!
</button>
</div>
</div>
<!-- Social links -->
<div class="mt-12 flex justify-center space-x-6">
<a href="#" class="text-gray-400 hover:text-white transition-colors">
<i class="fab fa-github text-2xl"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white transition-colors">
<i class="fab fa-twitter text-2xl"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white transition-colors">
<i class="fab fa-codepen text-2xl"></i>
</a>
<a href="#" class="text-gray-400 hover:text-white transition-colors">
<i class="fab fa-dev text-2xl"></i>
</a>
</div>
</div>
<script>
// Create background particles
function createParticles() {
const container = document.getElementById('particles-container');
const particleCount = window.innerWidth < 768 ? 30 : 50;
for (let i = 0; i < particleCount; i++) {
const particle = document.createElement('div');
particle.classList.add('particle');
// Random properties
const size = Math.random() * 5 + 1;
const posX = Math.random() * window.innerWidth;
const posY = Math.random() * window.innerHeight;
const opacity = Math.random() * 0.5 + 0.1;
const delay = Math.random() * 5;
const duration = Math.random() * 10 + 5;
// Apply styles
particle.style.width = `${size}px`;
particle.style.height = `${size}px`;
particle.style.left = `${posX}px`;
particle.style.top = `${posY}px`;
particle.style.opacity = opacity;
particle.style.background = `rgba(255, 255, 255, ${opacity})`;
particle.style.animation = `float ${duration}s ease-in-out ${delay}s infinite`;
container.appendChild(particle);
}
}
// Animate the hello world text
function animateHello() {
const hello = document.querySelector('h1');
hello.classList.add('animate__animated', 'animate__rubberBand');
setTimeout(() => {
hello.classList.remove('animate__animated', 'animate__rubberBand');
}, 1000);
// Add temporary floating hearts
for (let i = 0; i < 10; i++) {
createFloatingHeart();
}
}
// Create floating hearts
function createFloatingHeart() {
const heart = document.createElement('div');
heart.innerHTML = '<i class="fas fa-heart text-pink-500"></i>';
heart.classList.add('particle', 'text-2xl');
const startX = Math.random() * window.innerWidth;
heart.style.left = `${startX}px`;
heart.style.bottom = '0';
heart.style.opacity = '0';
document.body.appendChild(heart);
// Animate heart
setTimeout(() => {
heart.style.transition = 'all 2s ease-out';
heart.style.opacity = '1';
heart.style.bottom = `${window.innerHeight}px`;
heart.style.transform = `translateX(${Math.random() * 100 - 50}px)`;
}, 10);
// Remove after animation
setTimeout(() => {
heart.remove();
}, 2000);
}
// Create confetti effect
function createConfetti() {
const colors = ['#f44336', '#e91e63', '#9c27b0', '#673ab7', '#3f51b5', '#2196f3', '#03a9f4', '#00bcd4', '#009688', '#4CAF50', '#8BC34A', '#CDDC39', '#FFEB3B', '#FFC107', '#FF9800'];
for (let i = 0; i < 100; i++) {
const confetti = document.createElement('div');
confetti.classList.add('particle');
const size = Math.random() * 10 + 5;
const posX = Math.random() * window.innerWidth;
const color = colors[Math.floor(Math.random() * colors.length)];
const shape = Math.random() > 0.5 ? '50%' : '0';
confetti.style.width = `${size}px`;
confetti.style.height = `${size}px`;
confetti.style.left = `${posX}px`;
confetti.style.top = `-10px`;
confetti.style.backgroundColor = color;
confetti.style.borderRadius = shape;
confetti.style.transform = `rotate(${Math.random() * 360}deg)`;
document.body.appendChild(confetti);
// Animate confetti falling
setTimeout(() => {
confetti.style.transition = `all ${Math.random() * 3 + 2}s cubic-bezier(0.1, 0.8, 0.3, 1)`;
confetti.style.top = `${window.innerHeight + 10}px`;
confetti.style.transform = `rotate(${Math.random() * 720}deg) translateX(${Math.random() * 200 - 100}px)`;
}, 10);
// Remove after animation
setTimeout(() => {
confetti.remove();
}, 5000);
}
}
// Toggle between dark and light theme
function toggleTheme() {
document.body.classList.toggle('bg-gray-100');
document.body.classList.toggle('text-gray-900');
const card = document.querySelector('.bg-gradient-to-br');
if (document.body.classList.contains('bg-gray-100')) {
card.classList.remove('from-gray-800', 'to-gray-900', 'border-gray-700');
card.classList.add('from-gray-100', 'to-gray-200', 'border-gray-300');
// Update text colors
const texts = document.querySelectorAll('.text-gray-300');
texts.forEach(text => {
text.classList.remove('text-gray-300');
text.classList.add('text-gray-700');
});
// Update particles
const particles = document.querySelectorAll('.particle');
particles.forEach(particle => {
particle.style.background = `rgba(0, 0, 0, ${Math.random() * 0.3 + 0.1})`;
});
} else {
card.classList.add('from-gray-800', 'to-gray-900', 'border-gray-700');
card.classList.remove('from-gray-100', 'to-gray-200', 'border-gray-300');
// Update text colors
const texts = document.querySelectorAll('.text-gray-700');
texts.forEach(text => {
text.classList.remove('text-gray-700');
text.classList.add('text-gray-300');
});
// Update particles
const particles = document.querySelectorAll('.particle');
particles.forEach(particle => {
particle.style.background = `rgba(255, 255, 255, ${Math.random() * 0.5 + 0.1})`;
});
}
}
// Initialize on load
window.addEventListener('load', () => {
createParticles();
// Make the globe icon spin continuously
const globe = document.querySelector('.fa-globe-americas');
globe.style.animation = 'spin 10s linear infinite';
// Add keyframes for spinning
const style = document.createElement('style');
style.innerHTML = `
@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
`;
document.head.appendChild(style);
});
// Recreate particles on resize
window.addEventListener('resize', () => {
const container = document.getElementById('particles-container');
container.innerHTML = '';
createParticles();
});
</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=byhwdy/deepsite-demo" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |