-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
237 lines (209 loc) · 9.31 KB
/
index.html
File metadata and controls
237 lines (209 loc) · 9.31 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>WeatherBuddy - Your Personal Weather Companion</title>
<!-- Favicon -->
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>☀️</text></svg>">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<!-- Font Awesome for Icons -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Custom Styles -->
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="styles/animations.css">
<link rel="stylesheet" href="styles/responsive.css">
</head>
<body>
<!-- Main Header -->
<header class="main-header">
<div class="header-container">
<div class="logo-section">
<div class="logo-icon">
<i class="fas fa-cloud-sun"></i>
</div>
<h1 class="logo-text">WeatherBuddy</h1>
</div>
<div class="header-actions">
<button id="themeToggle" class="theme-btn" aria-label="Toggle theme">
<i class="fas fa-moon"></i>
</button>
</div>
</div>
</header>
<!-- Loading Screen -->
<div id="loadingScreen" class="loading-screen">
<div class="loading-spinner">
<div class="spinner"></div>
<p>Loading weather data...</p>
</div>
</div>
<!-- Error Modal -->
<div id="errorModal" class="error-modal hidden">
<div class="error-content">
<i class="fas fa-exclamation-triangle"></i>
<h3>Oops! Something went wrong</h3>
<p id="errorMessage">Unable to fetch weather data. Please try again.</p>
<button id="closeError" class="btn-primary">Try Again</button>
</div>
</div>
<!-- Main Container -->
<div class="container">
<!-- Search Section -->
<section class="search-section">
<div class="search-container">
<div class="search-box">
<i class="fas fa-search search-icon"></i>
<input type="text" id="searchInput" placeholder="Search cities or click for recent searches..." autocomplete="off">
<button id="locationBtn" class="location-btn" title="Use current location">
<i class="fas fa-location-crosshairs"></i>
</button>
</div>
<div id="searchSuggestions" class="search-suggestions hidden"></div>
</div>
</section>
<!-- Hero Section -->
<section class="hero">
<div class="weather-background" id="weatherBackground">
<div class="animated-elements"></div>
</div>
<div class="hero-content">
<div class="current-weather">
<div class="location-info">
<h2 id="currentLocation" class="location-name">Loading...</h2>
<p id="currentDate" class="current-date"></p>
</div>
<div class="weather-main">
<div class="temperature-display">
<span id="currentTemp" class="temperature">--°</span>
<div class="temp-unit">
<button id="unitToggle" class="unit-btn">°C</button>
</div>
</div>
<div class="weather-icon-container">
<div id="mainWeatherIcon" class="weather-icon-main">
<i class="fas fa-sun"></i>
</div>
</div>
</div>
<div class="weather-description">
<p id="weatherCondition" class="condition">Sunny</p>
<p id="feelsLike" class="feels-like">Feels like --°</p>
</div>
</div>
</div>
</section>
<!-- Weather Details -->
<section class="weather-details">
<div class="details-grid">
<div class="detail-card">
<i class="fas fa-wind detail-icon"></i>
<div class="detail-info">
<span class="detail-label">Wind Speed</span>
<span id="windSpeed" class="detail-value">-- km/h</span>
</div>
</div>
<div class="detail-card">
<i class="fas fa-tint detail-icon"></i>
<div class="detail-info">
<span class="detail-label">Humidity</span>
<span id="humidity" class="detail-value">--%</span>
</div>
</div>
<div class="detail-card">
<i class="fas fa-eye detail-icon"></i>
<div class="detail-info">
<span class="detail-label">Visibility</span>
<span id="visibility" class="detail-value">-- km</span>
</div>
</div>
<div class="detail-card">
<i class="fas fa-thermometer-half detail-icon"></i>
<div class="detail-info">
<span class="detail-label">Pressure</span>
<span id="pressure" class="detail-value">-- hPa</span>
</div>
</div>
<div class="detail-card">
<i class="fas fa-sun detail-icon"></i>
<div class="detail-info">
<span class="detail-label">UV Index</span>
<span id="uvIndex" class="detail-value">--</span>
</div>
</div>
<div class="detail-card">
<i class="fas fa-smog detail-icon"></i>
<div class="detail-info">
<span class="detail-label">Air Quality</span>
<span id="airQuality" class="detail-value">--</span>
</div>
</div>
</div>
</section>
<!-- Sun Times -->
<section class="sun-times">
<div class="sun-card">
<div class="sun-info">
<i class="fas fa-sun sun-icon sunrise-icon"></i>
<div>
<span class="sun-label">Sunrise</span>
<span id="sunrise" class="sun-time">--:--</span>
</div>
</div>
<div class="sun-info">
<i class="fas fa-sun sun-icon sunset-icon"></i>
<div>
<span class="sun-label">Sunset</span>
<span id="sunset" class="sun-time">--:--</span>
</div>
</div>
</div>
</section>
<!-- Hourly Forecast -->
<section class="hourly-forecast">
<h2 class="section-title">Hourly Forecast</h2>
<div class="hourly-container">
<button class="scroll-btn scroll-left" id="scrollLeft">
<i class="fas fa-chevron-left"></i>
</button>
<div class="hourly-slider" id="hourlySlider">
<!-- Hourly items will be dynamically inserted here -->
</div>
<button class="scroll-btn scroll-right" id="scrollRight">
<i class="fas fa-chevron-right"></i>
</button>
</div>
</section>
<!-- 7-Day Forecast -->
<section class="daily-forecast">
<h2 class="section-title">7-Day Forecast</h2>
<div class="forecast-grid" id="forecastGrid">
<!-- Forecast cards will be dynamically inserted here -->
</div>
</section>
<!-- Footer -->
<footer class="footer">
<div class="footer-content">
<div class="footer-brand">
<div class="footer-logo">
<i class="fas fa-cloud-sun"></i>
<span>WeatherBuddy</span>
</div>
<p>Your Personal Weather Companion</p>
</div>
<div class="footer-info">
<p>Built with ❤️ by Jayesh</p>
<p>© 2025 All rights reserved by Weather Buddy</p>
</div>
</div>
</footer>
</div>
<!-- Configuration -->
<script src="config.js"></script>
<!-- Scripts -->
<script src="scripts/weather.js"></script>
<script src="scripts/animations.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>