Spaces:
Running
Running
Create a Weather App, with a search bar, a weather section, and a forecast section.
Browse files- README.md +8 -5
- index.html +194 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title: Cloud Chaser
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Cloud Chaser ☁️
|
| 3 |
+
colorFrom: gray
|
| 4 |
+
colorTo: red
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://deepsite.hf.co).
|
index.html
CHANGED
|
@@ -1,19 +1,195 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
</html>
|
|
|
|
| 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>Cloud Chaser ☁️ - Weather App</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 10 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.net.min.js"></script>
|
| 12 |
+
<style>
|
| 13 |
+
.weather-card {
|
| 14 |
+
backdrop-filter: blur(16px) saturate(180%);
|
| 15 |
+
-webkit-backdrop-filter: blur(16px) saturate(180%);
|
| 16 |
+
background-color: rgba(255, 255, 255, 0.1);
|
| 17 |
+
}
|
| 18 |
+
.temperature-text {
|
| 19 |
+
font-size: 5rem;
|
| 20 |
+
line-height: 1;
|
| 21 |
+
}
|
| 22 |
+
.weather-icon {
|
| 23 |
+
filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
|
| 24 |
+
}
|
| 25 |
+
</style>
|
| 26 |
+
</head>
|
| 27 |
+
<body class="min-h-screen bg-gradient-to-br from-blue-100 to-indigo-200 text-gray-800">
|
| 28 |
+
<div id="vanta-bg" class="fixed inset-0 z-0"></div>
|
| 29 |
+
<div class="relative z-10 min-h-screen flex flex-col">
|
| 30 |
+
<header class="pt-8 px-4">
|
| 31 |
+
<h1 class="text-4xl font-bold text-center text-white drop-shadow-lg">Cloud Chaser <i data-feather="cloud" class="inline"></i></h1>
|
| 32 |
+
<p class="text-center text-white/80 mt-2">Chase the weather, not your tail</p>
|
| 33 |
+
</header>
|
| 34 |
+
|
| 35 |
+
<main class="flex-1 px-4 pb-8">
|
| 36 |
+
<!-- Search Section -->
|
| 37 |
+
<div class="max-w-2xl mx-auto mt-8">
|
| 38 |
+
<div class="relative">
|
| 39 |
+
<input
|
| 40 |
+
type="text"
|
| 41 |
+
id="location-input"
|
| 42 |
+
placeholder="Search for a city..."
|
| 43 |
+
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"
|
| 44 |
+
>
|
| 45 |
+
<i data-feather="search" class="absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-500"></i>
|
| 46 |
+
</div>
|
| 47 |
+
</div>
|
| 48 |
+
|
| 49 |
+
<!-- Current Weather -->
|
| 50 |
+
<div class="max-w-2xl mx-auto mt-8 weather-card rounded-3xl shadow-2xl overflow-hidden p-6">
|
| 51 |
+
<div class="text-center">
|
| 52 |
+
<h2 id="location" class="text-3xl font-bold text-white">New York, US</h2>
|
| 53 |
+
<p id="current-date" class="text-white/80">Monday, June 12</p>
|
| 54 |
+
</div>
|
| 55 |
+
|
| 56 |
+
<div class="flex flex-col md:flex-row items-center justify-between mt-6">
|
| 57 |
+
<div class="flex items-center">
|
| 58 |
+
<div class="weather-icon">
|
| 59 |
+
<i data-feather="sun" class="w-24 h-24 text-yellow-400"></i>
|
| 60 |
+
</div>
|
| 61 |
+
<div class="ml-4">
|
| 62 |
+
<p id="weather-condition" class="text-xl font-semibold text-white">Sunny</p>
|
| 63 |
+
<div class="temperature-text text-white" id="current-temp">24°C</div>
|
| 64 |
+
</div>
|
| 65 |
+
</div>
|
| 66 |
+
|
| 67 |
+
<div class="mt-6 md:mt-0 grid grid-cols-2 gap-4 text-white">
|
| 68 |
+
<div class="flex items-center">
|
| 69 |
+
<i data-feather="wind" class="mr-2"></i>
|
| 70 |
+
<span id="wind-speed">12 km/h</span>
|
| 71 |
+
</div>
|
| 72 |
+
<div class="flex items-center">
|
| 73 |
+
<i data-feather="droplet" class="mr-2"></i>
|
| 74 |
+
<span id="humidity">65%</span>
|
| 75 |
+
</div>
|
| 76 |
+
<div class="flex items-center">
|
| 77 |
+
<i data-feather="eye" class="mr-2"></i>
|
| 78 |
+
<span id="visibility">10 km</span>
|
| 79 |
+
</div>
|
| 80 |
+
<div class="flex items-center">
|
| 81 |
+
<i data-feather="compass" class="mr-2"></i>
|
| 82 |
+
<span id="pressure">1012 hPa</span>
|
| 83 |
+
</div>
|
| 84 |
+
</div>
|
| 85 |
+
</div>
|
| 86 |
+
</div>
|
| 87 |
+
|
| 88 |
+
<!-- Forecast -->
|
| 89 |
+
<div class="max-w-2xl mx-auto mt-8">
|
| 90 |
+
<h3 class="text-xl font-semibold text-white mb-4">5-Day Forecast</h3>
|
| 91 |
+
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-5 gap-4">
|
| 92 |
+
<!-- Forecast Day 1 -->
|
| 93 |
+
<div class="weather-card rounded-xl p-4 flex flex-col items-center">
|
| 94 |
+
<p class="font-medium text-white">Mon</p>
|
| 95 |
+
<i data-feather="cloud-rain" class="w-10 h-10 my-2 text-blue-300"></i>
|
| 96 |
+
<div class="flex space-x-2 text-white">
|
| 97 |
+
<span>22°</span>
|
| 98 |
+
<span class="text-white/60">18°</span>
|
| 99 |
+
</div>
|
| 100 |
+
</div>
|
| 101 |
+
|
| 102 |
+
<!-- Forecast Day 2 -->
|
| 103 |
+
<div class="weather-card rounded-xl p-4 flex flex-col items-center">
|
| 104 |
+
<p class="font-medium text-white">Tue</p>
|
| 105 |
+
<i data-feather="cloud" class="w-10 h-10 my-2 text-gray-300"></i>
|
| 106 |
+
<div class="flex space-x-2 text-white">
|
| 107 |
+
<span>24°</span>
|
| 108 |
+
<span class="text-white/60">19°</span>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
|
| 112 |
+
<!-- Forecast Day 3 -->
|
| 113 |
+
<div class="weather-card rounded-xl p-4 flex flex-col items-center">
|
| 114 |
+
<p class="font-medium text-white">Wed</p>
|
| 115 |
+
<i data-feather="sun" class="w-10 h-10 my-2 text-yellow-300"></i>
|
| 116 |
+
<div class="flex space-x-2 text-white">
|
| 117 |
+
<span>26°</span>
|
| 118 |
+
<span class="text-white/60">20°</span>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
|
| 122 |
+
<!-- Forecast Day 4 -->
|
| 123 |
+
<div class="weather-card rounded-xl p-4 flex flex-col items-center">
|
| 124 |
+
<p class="font-medium text-white">Thu</p>
|
| 125 |
+
<i data-feather="sun" class="w-10 h-10 my-2 text-yellow-300"></i>
|
| 126 |
+
<div class="flex space-x-2 text-white">
|
| 127 |
+
<span>28°</span>
|
| 128 |
+
<span class="text-white/60">22°</span>
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
|
| 132 |
+
<!-- Forecast Day 5 -->
|
| 133 |
+
<div class="weather-card rounded-xl p-4 flex flex-col items-center">
|
| 134 |
+
<p class="font-medium text-white">Fri</p>
|
| 135 |
+
<i data-feather="cloud-lightning" class="w-10 h-10 my-2 text-purple-300"></i>
|
| 136 |
+
<div class="flex space-x-2 text-white">
|
| 137 |
+
<span>25°</span>
|
| 138 |
+
<span class="text-white/60">20°</span>
|
| 139 |
+
</div>
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
</div>
|
| 143 |
+
</main>
|
| 144 |
+
|
| 145 |
+
<footer class="text-center text-white/50 pb-4 text-sm">
|
| 146 |
+
<p>Made with <i data-feather="heart" class="inline w-3 h-3 text-red-300"></i> for weather lovers</p>
|
| 147 |
+
</footer>
|
| 148 |
+
</div>
|
| 149 |
+
|
| 150 |
+
<script>
|
| 151 |
+
// Initialize Vanta.js background
|
| 152 |
+
VANTA.NET({
|
| 153 |
+
el: "#vanta-bg",
|
| 154 |
+
mouseControls: true,
|
| 155 |
+
touchControls: true,
|
| 156 |
+
gyroControls: false,
|
| 157 |
+
minHeight: 200.00,
|
| 158 |
+
minWidth: 200.00,
|
| 159 |
+
scale: 1.00,
|
| 160 |
+
scaleMobile: 1.00,
|
| 161 |
+
color: 0x7b8fff,
|
| 162 |
+
backgroundColor: 0x10101,
|
| 163 |
+
points: 10.00,
|
| 164 |
+
maxDistance: 22.00,
|
| 165 |
+
spacing: 17.00
|
| 166 |
+
});
|
| 167 |
+
|
| 168 |
+
// Initialize Feather Icons
|
| 169 |
+
feather.replace();
|
| 170 |
+
|
| 171 |
+
// Update current date
|
| 172 |
+
const date = new Date();
|
| 173 |
+
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
|
| 174 |
+
document.getElementById('current-date').textContent = date.toLocaleDateString('en-US', options);
|
| 175 |
+
|
| 176 |
+
// Simple search functionality
|
| 177 |
+
document.getElementById('location-input').addEventListener('keypress', function(e) {
|
| 178 |
+
if (e.key === 'Enter') {
|
| 179 |
+
const location = this.value.trim();
|
| 180 |
+
if (location) {
|
| 181 |
+
document.getElementById('location').textContent = location;
|
| 182 |
+
// In a real app, you would fetch weather data here
|
| 183 |
+
this.value = '';
|
| 184 |
+
}
|
| 185 |
+
}
|
| 186 |
+
});
|
| 187 |
+
|
| 188 |
+
// Mock weather data update (in a real app, fetch from API)
|
| 189 |
+
function updateWeatherData() {
|
| 190 |
+
// This would be replaced with actual API calls
|
| 191 |
+
console.log('Fetching weather data...');
|
| 192 |
+
}
|
| 193 |
+
</script>
|
| 194 |
+
</body>
|
| 195 |
</html>
|