-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
345 lines (326 loc) · 19.6 KB
/
Copy pathindex.html
File metadata and controls
345 lines (326 loc) · 19.6 KB
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather Dashboard - Your Mood-First Weather Experience</title>
<link rel="icon" type="image/svg+xml" href="./favicon.svg">
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div id="rain-container"></div>
<div id="snow-container"></div>
<!-- Welcome Screen -->
<div id="welcome-overlay">
<div id="welcome-modal" class="draggable">
<div id="welcome-content">
<div class="welcome-section">
<h2>🌤️ Welcome to Weather Dashboard</h2>
<p>A weather dashboard designed with warmth and personality. This isn't just another weather app—it's a thoughtfully crafted interface that makes checking the weather a delightful experience.</p>
</div>
<div class="welcome-section">
<h3>🪟 Window Management</h3>
<p>Each feature lives in its own draggable, resizable window. Move them around, resize them in 8 directions, and organize your workspace however you like. Click any window to bring it to the front!</p>
</div>
<div class="welcome-section">
<h3>✨ Features</h3>
<ul>
<li><strong>Popular Destinations:</strong> Quick access to major cities worldwide</li>
<li><strong>Weather Finder:</strong> Discover random locations with your desired weather conditions</li>
<li><strong>Flip Clock:</strong> Animated clock showing local time for any location you explore</li>
<li><strong>My Location:</strong> Get weather for your current GPS coordinates instantly</li>
<li><strong>Interactive Map:</strong> Drag the pin anywhere to explore weather at any location</li>
<li><strong>Weather Dashboard:</strong> Current conditions, temperature, and hourly forecast</li>
<li><strong>Window Manager:</strong> Toggle visibility of any window using the menu (☰)</li>
</ul>
</div>
<div class="welcome-section welcome-footer">
<p><em>Designed with care for beautiful interfaces and powerful functionality</em></p>
<button class="get-started-btn" onclick="closeWelcome()">Get Started →</button>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div id="main-tab" class="tab-content active">
<div id="world-view" class="draggable resizable">
<div class="window-header">
<span class="window-title">Popular Destinations</span>
<div class="window-controls">
<button class="fullscreen-btn" onclick="toggleFullscreen('world-view')" title="Fullscreen">⛶</button>
<button class="minimize-btn" onclick="minimizeWindow('world-view')" title="Minimize">−</button>
<button class="close-btn" onclick="closeWindow('world-view')" title="Close">×</button>
</div>
</div>
<div class="resize-handle resize-n"></div>
<div class="resize-handle resize-s"></div>
<div class="resize-handle resize-e"></div>
<div class="resize-handle resize-w"></div>
<div class="resize-handle resize-ne"></div>
<div class="resize-handle resize-nw"></div>
<div class="resize-handle resize-se"></div>
<div class="resize-handle resize-sw"></div>
<div id="cities-grid">
<div class="city-card" onclick="getCityWeather('Tokyo')">Tokyo</div>
<div class="city-card" onclick="getCityWeather('New York')">New York</div>
<div class="city-card" onclick="getCityWeather('London')">London</div>
<div class="city-card" onclick="getCityWeather('Paris')">Paris</div>
<div class="city-card" onclick="getCityWeather('Dubai')">Dubai</div>
<div class="city-card" onclick="getCityWeather('Sydney')">Sydney</div>
<div class="city-card" onclick="getCityWeather('Mumbai')">Mumbai</div>
<div class="city-card" onclick="getCityWeather('Moscow')">Moscow</div>
<div class="city-card" onclick="getCityWeather('Rio de Janeiro')">Rio</div>
<div class="city-card" onclick="getCityWeather('Singapore')">Singapore</div>
<div class="city-card" onclick="getCityWeather('Toronto')">Toronto</div>
<div class="city-card" onclick="getCityWeather('Cairo')">Cairo</div>
</div>
</div>
<!-- Directions Window -->
<div id="directions-window" class="draggable resizable">
<div class="window-header">
<span class="window-title">How It Works</span>
<div class="window-controls">
<button class="fullscreen-btn" onclick="toggleFullscreen('directions-window')" title="Fullscreen">⛶</button>
<button class="minimize-btn" onclick="minimizeWindow('directions-window')" title="Minimize">−</button>
<button class="close-btn" onclick="closeWindow('directions-window')" title="Close">×</button>
</div>
</div>
<div class="resize-handle resize-n"></div>
<div class="resize-handle resize-s"></div>
<div class="resize-handle resize-e"></div>
<div class="resize-handle resize-w"></div>
<div class="resize-handle resize-ne"></div>
<div class="resize-handle resize-nw"></div>
<div class="resize-handle resize-se"></div>
<div class="resize-handle resize-sw"></div>
<div id="directions-content">
<h4>🌤️ Welcome to Weather Dashboard</h4>
<div class="direction-section" onclick="bringWindowToFront('world-view')" style="cursor: pointer;">
<h5>🎯 Popular Destinations</h5>
<p>Click any city card to instantly view its weather</p>
</div>
<div class="direction-section" onclick="bringWindowToFront('weather-finder-window')" style="cursor: pointer;">
<h5>🎲 Weather Finder</h5>
<p>Click a weather button to discover a random city with your desired conditions</p>
</div>
<div class="direction-section" onclick="bringWindowToFront('weather-container')" style="cursor: pointer;">
<h5>🌡️ Weather Dashboard</h5>
<p>Enter any city name to get detailed weather information, forecasts, and more</p>
</div>
<div class="direction-section" onclick="bringWindowToFront('clock-window')" style="cursor: pointer;">
<h5>🕐 Local Time Clock</h5>
<p>Watch the flip clock update with the local time of any location you explore</p>
</div>
<div class="direction-section" onclick="bringWindowToFront('current-location-window')" style="cursor: pointer;">
<h5>📍 My Location</h5>
<p>Click "Get My Location" to instantly view weather at your current coordinates</p>
</div>
<div class="direction-section" onclick="bringWindowToFront('map-container')" style="cursor: pointer;">
<h5>🗺️ Explore the World</h5>
<p>Click anywhere on the map or drag the pin to explore weather at any location</p>
</div>
</div>
</div>
<!-- Weather Finder Window -->
<div id="weather-finder-window" class="draggable resizable">
<div class="window-header">
<span class="window-title">Weather Finder</span>
<div class="window-controls">
<button class="fullscreen-btn" onclick="toggleFullscreen('weather-finder-window')" title="Fullscreen">⛶</button>
<button class="minimize-btn" onclick="minimizeWindow('weather-finder-window')" title="Minimize">−</button>
<button class="close-btn" onclick="closeWindow('weather-finder-window')" title="Close">×</button>
</div>
</div>
<div class="resize-handle resize-n"></div>
<div class="resize-handle resize-s"></div>
<div class="resize-handle resize-e"></div>
<div class="resize-handle resize-w"></div>
<div class="resize-handle resize-ne"></div>
<div class="resize-handle resize-nw"></div>
<div class="resize-handle resize-se"></div>
<div class="resize-handle resize-sw"></div>
<div id="weather-finder">
<h4>Find Weather 🎲</h4>
<div class="finder-buttons">
<button class="finder-btn" onclick="findWeatherByCondition('Rain')" title="Find Rain">🌧️ Rainy</button>
<button class="finder-btn" onclick="findWeatherByCondition('Snow')" title="Find Snow">❄️ Snowy</button>
<button class="finder-btn" onclick="findWeatherByCondition('Clear')" title="Find Clear">☀️ Clear</button>
<button class="finder-btn" onclick="findWeatherByCondition('Clouds')" title="Find Cloudy">☁️ Cloudy</button>
<button class="finder-btn" onclick="findWeatherByCondition('Thunderstorm')" title="Find Thunderstorm">⛈️ Stormy</button>
<button class="finder-btn" onclick="findWeatherByCondition('Mist')" title="Find Foggy">🌫️ Foggy</button>
</div>
<div id="finder-status"></div>
</div>
</div>
<!-- Clock Window -->
<div id="clock-window" class="draggable resizable">
<div class="window-header">
<span class="window-title">Local Time</span>
<div class="window-controls">
<button class="fullscreen-btn" onclick="toggleFullscreen('clock-window')" title="Fullscreen">⛶</button>
<button class="minimize-btn" onclick="minimizeWindow('clock-window')" title="Minimize">−</button>
<button class="close-btn" onclick="closeWindow('clock-window')" title="Close">×</button>
</div>
</div>
<div class="resize-handle resize-n"></div>
<div class="resize-handle resize-s"></div>
<div class="resize-handle resize-e"></div>
<div class="resize-handle resize-w"></div>
<div class="resize-handle resize-ne"></div>
<div class="resize-handle resize-nw"></div>
<div class="resize-handle resize-se"></div>
<div class="resize-handle resize-sw"></div>
<div id="clock-content">
<div id="clock-location">Select a location</div>
<div id="flip-clock">
<div class="flip-clock-group">
<div class="flip-unit" id="flip-hours">
<div class="flip-card">
<div class="flip-card-top">00</div>
<div class="flip-card-bottom">00</div>
</div>
</div>
<span class="flip-colon">:</span>
<div class="flip-unit" id="flip-minutes">
<div class="flip-card">
<div class="flip-card-top">00</div>
<div class="flip-card-bottom">00</div>
</div>
</div>
<span class="flip-colon">:</span>
<div class="flip-unit" id="flip-seconds">
<div class="flip-card">
<div class="flip-card-top">00</div>
<div class="flip-card-bottom">00</div>
</div>
</div>
</div>
<div id="flip-ampm">AM</div>
</div>
<div id="clock-date">--- --, ----</div>
</div>
</div>
<!-- Current Location Window -->
<div id="current-location-window" class="draggable resizable">
<div class="window-header">
<span class="window-title">My Location</span>
<div class="window-controls">
<button class="fullscreen-btn" onclick="toggleFullscreen('current-location-window')" title="Fullscreen">⛶</button>
<button class="minimize-btn" onclick="minimizeWindow('current-location-window')" title="Minimize">−</button>
<button class="close-btn" onclick="closeWindow('current-location-window')" title="Close">×</button>
</div>
</div>
<div class="resize-handle resize-n"></div>
<div class="resize-handle resize-s"></div>
<div class="resize-handle resize-e"></div>
<div class="resize-handle resize-w"></div>
<div class="resize-handle resize-ne"></div>
<div class="resize-handle resize-nw"></div>
<div class="resize-handle resize-se"></div>
<div class="resize-handle resize-sw"></div>
<div id="current-location-content">
<button class="location-btn" onclick="getMyLocation()">📍 Get My Location</button>
<div id="location-status"></div>
</div>
</div>
<div id="weather-container" class="draggable resizable">
<div class="window-header">
<span class="window-title">Weather Dashboard</span>
<div class="window-controls">
<button class="fullscreen-btn" onclick="toggleFullscreen('weather-container')" title="Fullscreen">⛶</button>
<button class="minimize-btn" onclick="minimizeWindow('weather-container')" title="Minimize">−</button>
<button class="close-btn" onclick="closeWindow('weather-container')" title="Close">×</button>
</div>
</div>
<div class="resize-handle resize-n"></div>
<div class="resize-handle resize-s"></div>
<div class="resize-handle resize-e"></div>
<div class="resize-handle resize-w"></div>
<div class="resize-handle resize-ne"></div>
<div class="resize-handle resize-nw"></div>
<div class="resize-handle resize-se"></div>
<div class="resize-handle resize-sw"></div>
<div id="temp-toggle">
<span class="temp-unit active" onclick="toggleTemperature('C')">°C</span>
<span class="temp-unit" onclick="toggleTemperature('F')">°F</span>
</div>
<input type="text" id="city" placeholder="Enter city">
<button onclick="getWeather()">Search</button>
<img id="weather-icon" alt="Weather Icon">
<div id="temp-div"></div>
<div id="weather-info"></div>
<div id="hourly-forecast"></div>
</div>
</div>
<!-- World Map Section -->
<div id="map-tab" class="tab-content active">
<div id="map-container" class="draggable resizable">
<div class="window-header">
<span class="window-title">Explore the World</span>
<div class="window-controls">
<button class="fullscreen-btn" onclick="toggleFullscreen('map-container')" title="Fullscreen">⛶</button>
<button class="minimize-btn" onclick="minimizeWindow('map-container')" title="Minimize">−</button>
<button class="close-btn" onclick="closeWindow('map-container')" title="Close">×</button>
</div>
</div>
<div class="resize-handle resize-n"></div>
<div class="resize-handle resize-s"></div>
<div class="resize-handle resize-e"></div>
<div class="resize-handle resize-w"></div>
<div class="resize-handle resize-ne"></div>
<div class="resize-handle resize-nw"></div>
<div class="resize-handle resize-se"></div>
<div class="resize-handle resize-sw"></div>
<div id="zoom-controls">
<button onclick="zoomIn()" title="Zoom In">+</button>
<button onclick="zoomOut()" title="Zoom Out">−</button>
<button onclick="resetZoom()" title="Reset Zoom">↻</button>
<span id="zoom-level">100%</span>
</div>
<div id="map-info">Click or drag pin to select location</div>
<div id="map-wrapper">
<img id="world-map" src="https://upload.wikimedia.org/wikipedia/commons/8/83/Equirectangular_projection_SW.jpg" alt="World Map">
<div id="pin" class="map-pin">📍</div>
</div>
</div>
</div>
<!-- Taskbar for minimized windows -->
<div id="taskbar" class="taskbar" style="display: none;"></div>
<!-- Window Launcher -->
<button id="window-launcher" onclick="toggleLauncher()" title="Window Manager">
<span>☰</span>
</button>
<div id="launcher-menu" style="display: none;">
<h3>Window Manager</h3>
<div class="launcher-item">
<input type="checkbox" id="toggle-directions-window" checked onchange="toggleWindowVisibility('directions-window')">
<label for="toggle-directions-window">How It Works</label>
</div>
<div class="launcher-item">
<input type="checkbox" id="toggle-world-view" checked onchange="toggleWindowVisibility('world-view')">
<label for="toggle-world-view">Popular Destinations</label>
</div>
<div class="launcher-item">
<input type="checkbox" id="toggle-weather-finder-window" checked onchange="toggleWindowVisibility('weather-finder-window')">
<label for="toggle-weather-finder-window">Weather Finder</label>
</div>
<div class="launcher-item">
<input type="checkbox" id="toggle-clock-window" checked onchange="toggleWindowVisibility('clock-window')">
<label for="toggle-clock-window">Local Time</label>
</div>
<div class="launcher-item">
<input type="checkbox" id="toggle-current-location-window" checked onchange="toggleWindowVisibility('current-location-window')">
<label for="toggle-current-location-window">My Location</label>
</div>
<div class="launcher-item">
<input type="checkbox" id="toggle-weather-container" checked onchange="toggleWindowVisibility('weather-container')">
<label for="toggle-weather-container">Weather Dashboard</label>
</div>
<div class="launcher-item">
<input type="checkbox" id="toggle-map-container" checked onchange="toggleWindowVisibility('map-container')">
<label for="toggle-map-container">Explore the World</label>
</div>
</div>
<script src="./script.js"></script>
</body>
</html>