Spaces:
Running
Running
File size: 9,112 Bytes
0e9cb75 83535cc 0e9cb75 83535cc 0e9cb75 1f345e3 | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cloud Chaser ☁️ - Weather App</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
<style>
.weather-card {
backdrop-filter: blur(16px) saturate(180%);
-webkit-backdrop-filter: blur(16px) saturate(180%);
background-color: rgba(255, 255, 255, 0.1);
}
.temperature-text {
font-size: 5rem;
line-height: 1;
}
.weather-icon {
filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}
</style>
</head>
<body class="min-h-screen bg-gradient-to-br from-blue-100 to-indigo-200 text-gray-800">
<div id="vanta-bg" class="fixed inset-0 z-0"></div>
<div class="relative z-10 min-h-screen flex flex-col">
<header class="pt-8 px-4">
<h1 class="text-4xl font-bold text-center text-white drop-shadow-lg">Cloud Chaser <i data-feather="cloud" class="inline"></i></h1>
<p class="text-center text-white/80 mt-2">Chase the weather, not your tail</p>
</header>
<main class="flex-1 px-4 pb-8">
<!-- Search Section -->
<div class="max-w-2xl mx-auto mt-8">
<div class="relative">
<input
type="text"
id="location-input"
placeholder="Search for a city..."
class="w-full p-4 pl-12 rounded-full bg-white/90 shadow-lg focus:outline-none focus:ring-2 focus:ring-blue-500 text-lg"
>
<i data-feather="search" class="absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-500"></i>
</div>
</div>
<!-- Current Weather -->
<div class="max-w-2xl mx-auto mt-8 weather-card rounded-3xl shadow-2xl overflow-hidden p-6">
<div class="text-center">
<h2 id="location" class="text-3xl font-bold text-white">New York, US</h2>
<p id="current-date" class="text-white/80">Monday, June 12</p>
</div>
<div class="flex flex-col md:flex-row items-center justify-between mt-6">
<div class="flex items-center">
<div class="weather-icon">
<i data-feather="sun" class="w-24 h-24 text-yellow-400"></i>
</div>
<div class="ml-4">
<p id="weather-condition" class="text-xl font-semibold text-white">Sunny</p>
<div class="temperature-text text-white" id="current-temp">24°C</div>
</div>
</div>
<div class="mt-6 md:mt-0 grid grid-cols-2 gap-4 text-white">
<div class="flex items-center">
<i data-feather="wind" class="mr-2"></i>
<span id="wind-speed">12 km/h</span>
</div>
<div class="flex items-center">
<i data-feather="droplet" class="mr-2"></i>
<span id="humidity">65%</span>
</div>
<div class="flex items-center">
<i data-feather="eye" class="mr-2"></i>
<span id="visibility">10 km</span>
</div>
<div class="flex items-center">
<i data-feather="compass" class="mr-2"></i>
<span id="pressure">1012 hPa</span>
</div>
</div>
</div>
</div>
<!-- Forecast -->
<div class="max-w-2xl mx-auto mt-8">
<h3 class="text-xl font-semibold text-white mb-4">5-Day Forecast</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-5 gap-4">
<!-- Forecast Day 1 -->
<div class="weather-card rounded-xl p-4 flex flex-col items-center">
<p class="font-medium text-white">Mon</p>
<i data-feather="cloud-rain" class="w-10 h-10 my-2 text-blue-300"></i>
<div class="flex space-x-2 text-white">
<span>22°</span>
<span class="text-white/60">18°</span>
</div>
</div>
<!-- Forecast Day 2 -->
<div class="weather-card rounded-xl p-4 flex flex-col items-center">
<p class="font-medium text-white">Tue</p>
<i data-feather="cloud" class="w-10 h-10 my-2 text-gray-300"></i>
<div class="flex space-x-2 text-white">
<span>24°</span>
<span class="text-white/60">19°</span>
</div>
</div>
<!-- Forecast Day 3 -->
<div class="weather-card rounded-xl p-4 flex flex-col items-center">
<p class="font-medium text-white">Wed</p>
<i data-feather="sun" class="w-10 h-10 my-2 text-yellow-300"></i>
<div class="flex space-x-2 text-white">
<span>26°</span>
<span class="text-white/60">20°</span>
</div>
</div>
<!-- Forecast Day 4 -->
<div class="weather-card rounded-xl p-4 flex flex-col items-center">
<p class="font-medium text-white">Thu</p>
<i data-feather="sun" class="w-10 h-10 my-2 text-yellow-300"></i>
<div class="flex space-x-2 text-white">
<span>28°</span>
<span class="text-white/60">22°</span>
</div>
</div>
<!-- Forecast Day 5 -->
<div class="weather-card rounded-xl p-4 flex flex-col items-center">
<p class="font-medium text-white">Fri</p>
<i data-feather="cloud-lightning" class="w-10 h-10 my-2 text-purple-300"></i>
<div class="flex space-x-2 text-white">
<span>25°</span>
<span class="text-white/60">20°</span>
</div>
</div>
</div>
</div>
</main>
<footer class="text-center text-white/50 pb-4 text-sm">
<p>Made with <i data-feather="heart" class="inline w-3 h-3 text-red-300"></i> for weather lovers</p>
<a href="africa.html" class="mt-2 inline-block text-white/70 hover:text-white transition">African Safari Adventure</a>
</footer>
</div>
<script>
// Initialize Vanta.js background
VANTA.NET({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: 0x7b8fff,
backgroundColor: 0x10101,
points: 10.00,
maxDistance: 22.00,
spacing: 17.00
});
// Initialize Feather Icons
feather.replace();
// Update current date
const date = new Date();
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
document.getElementById('current-date').textContent = date.toLocaleDateString('en-US', options);
// Simple search functionality
document.getElementById('location-input').addEventListener('keypress', function(e) {
if (e.key === 'Enter') {
const location = this.value.trim();
if (location) {
document.getElementById('location').textContent = location;
// In a real app, you would fetch weather data here
this.value = '';
}
}
});
// Mock weather data update (in a real app, fetch from API)
function updateWeatherData() {
// This would be replaced with actual API calls
console.log('Fetching weather data...');
}
</script>
</body>
</html>
|