-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
335 lines (254 loc) · 10.1 KB
/
index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather Website</title>
<link rel="stylesheet" href="Style/styles.css">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet">
<!-- Include Leaflet CSS -->
<link rel="stylesheet" href="https://unpkg.com/leaflet/dist/leaflet.css" />
<!-- Include Leaflet JS -->
<script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
<!-- Bootstrap CSS v5.2.1 -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous" />
</head>
<body>
<!-- Header Section -->
<header>
<div class="header-container">
<div class="logo">WeatherSite</div>
<nav>
<a href="#" onclick="location.reload()">Home</a>
<a href="#mapsok">Maps</a>
<a class="alertnav" href="#" onclick="showAlert()">Alerts</a>
</nav>
</div>
</header>
<!-- Weather Alert Section -->
<div class="alert-banner">
<span>⚠️ Severe Weather Alert: Thunderstorm Warning</span>
<button class="dismiss-btn">Dismiss</button>
</div>
<div class="fullBox ">
<div class="leftBox">
<div class="card leftmain" style="width: 450px;">
<!-- <img src="..." class="card-img-top" alt="..."> -->
<div class="card-body">
<div class="Seachbosandbutton">
<input type="text" id="search" placeholder="Search for a city...">
<button type="submit" id="searchBtn" class="btn1 btn-light1">Search</button>
</div>
<img id="Mainwiconone" src="Img/img1.png" alt="Weather Icon" class="weather-icon mb-1">
<div class="cfvalue">
<h2 id="MTempValue" class="mainF">72°C </h2>
<h2 class="mainF2">°C</h2>
</div>
<div class="cityRow">
<h1 id="MLocationName" class="mainC">New York </h1>
<p id="nowdateclocation" class="card-text mainCDay">Tuesday, September 6, 2024</p>
</div>
<p class="bar">-----------------------------------------------------------------</p>
<div class="Mantimebox">
<p class="card-text mainC">Time</p>
<p id="nowtimeclocation" class="card-text mainC">Time</p>
</div>
</div>
</div>
</div>
<!-- right 6 boxs and 3boxes -->
<div class="container text-white">
<!-- right 6 boxs -->
<!-- Header Section with Settings and Dark Mode Toggle -->
<div class="d-flex justify-content-between align-items-center mt-4">
<section class="hourly-forecast1">
<h1>FORECASTS</h1>
</section>
<div class="d-flex align-items-center">
<!-- Celsius and Fahrenheit Toggle -->
<div class="btn-group" role="group" aria-label="Temperature Unit">
<button type="button" class="btn btn-light">°C</button>
<button type="button" class="btn btn-dark" >°F</button>
</div>
<!-- Light/Dark Mode Toggle -->
<button class="btn btn-dark mx-2 DLMode1" id="darkModeToggle">
<i class="DLMode1"><img src="Img/DLMode.png" alt="Cloudy" class="DLMode"></i>
</button>
<!-- Settings Icon -->
<button class="btn btn-dark DLMode1">
<i class="DLMode1"><img src="Img/setting.png" alt="Cloudy" class="DLMode"></i>
</button>
</div>
</div>
<!-- Weather Boxes Section -->
<div class="row mt-4" id="weather-container">
<!-- Weather Box 1 -->
<div class="col-2">
<div class="weather-box bg-dark text-center p-3 rounded" id="day1">
<p id="day1-date">Tue</p>
<img id="day1-icon" class="weather-iconb" src="Img/img 2 sun.png" alt="Cloudy" >
<p id="day1-temp">12°C</p>
</div>
</div>
<!-- Weather Box 2 -->
<div class="col-2">
<div class="weather-box bg-dark text-center p-3 rounded" id="day2">
<p id="day2-date">Wed</p>
<img id="day2-icon" src="Img/img 3.png" alt="Cloudy" class="weather-iconb">
<p id="day2-temp">22°C</p>
</div>
</div>
<!-- Weather Box 3 -->
<div class="col-2">
<div class="weather-box bg-dark text-center p-3 rounded" id="day3">
<p id="day3-date">Thu</p>
<img id="day3-icon" src="Img/img 4.png" alt="Cloudy" class="weather-iconb">
<p id="day3-temp">1°C</p>
</div>
</div>
<!-- Weather Box 4 -->
<div class="col-2">
<div class="weather-box bg-dark text-center p-3 rounded" id="day4">
<p id="day4-date">Fri</p>
<img id="day4-icon" src="Img/img 5.png" alt="Clear Night" class="weather-iconb">
<p id="day4-temp">21°C</p>
</div>
</div>
<!-- Weather Box 5 -->
<div class="col-2">
<div class="weather-box bg-dark text-center p-3 rounded" id="day5">
<p id="day5-date">Sat</p>
<img id="day5-icon" src="Img/img 6.png" alt="Thunderstorm" class="weather-iconb">
<p id="day5-temp">6°C</p>
</div>
</div>
<!-- Weather Box 6 -->
<div class="col-2">
<div class="weather-box bg-dark text-center p-3 rounded" id="day6">
<p id="day6-date">Mon</p>
<img id="day6-icon" src="Img/img 7.png" alt="Sunny" class="weather-iconb">
<p id="day6-temp">8°C</p>
</div>
</div>
</div>
<!-- right 6 boxs -->
<!-- right 3 boxs -->
<div class="container my-5">
<h3 class="Highlight1">Today's Highlights</h3>
<div class="d-flex justify-content-between">
<!-- UV Index Box -->
<div class="highlight-box p-3 text-center mx-2">
<div class="highlight-icon">
<i class="fas fa-sun fa-3x"></i>
</div>
<h5>Region</h5>
<p >*** <span id="Rehiontxt" class="highlight-level">4</span> ***</p>
</div>
<!-- Wind Status Box -->
<div class="highlight-box p-3 text-center mx-2">
<div class="highlight-icon">
<i class="fas fa-wind fa-3x"></i>
</div>
<h5>Wind Status</h5>
<div class="windbox">
<p id="windsn0w" class="wind-status">7.70 </p>
<span>km/h</span>
</div>
</div>
<!-- Sunrise & Sunset Box -->
<div class="highlight-box p-3 text-center mx-2">
<div class="highlight-icon">
<i class="fas fa-sun fa-3x"></i>
<i class="fas fa-moon fa-3x"></i>
</div>
<h5>Sunrise & Sunset</h5>
<p><span id="sunrise3box" class="highlight-level">06:30 AM</span> -1m 32s</p>
<p><span id="sunset3box" class="highlight-level">07:45 PM</span> +2m 43s</p>
</div>
</div>
</div>
<!-- right 3 boxs -->
</div>
<!-- right 6 boxs and 3boxes -->
</div>
<!-- Main Weather Display -->
<!-- <section class="weather-display">
<div class="location">
<h1>New York City, NY</h1>
<p >Tuesday, September 6, 2024</p>
</div>
<div class="current-weather">
<h2>72°F</h2>
<img src="weather-icon.png" alt="Sunny">
<p>Sunny</p>
<p>Feels Like: 75°F</p>
<p>Wind Speed: 5 mph</p>
<p>Humidity: 60%</p>
<p>Pressure: 1012 mb</p>
</div>
</section> -->
<!-- Forecast Section -->
<!-- <section class="forecast">
<h3>Hourly Forecast</h3>
<div class="hourly-forecast">
<div class="hour">
<p>1 PM</p> -->
<!-- <img src="weather-icon.png" alt="Sunny">-->
<!-- <p>70°F</p>
</div> -->
<!-- Repeat for each hour -->
<!-- </div> -->
<!-- <h3>Daily Forecast</h3>
<div class="daily-forecast">
<div class="day">
<p>Wednesday</p> -->
<!-- <img src="weather-icon.png" alt="Cloudy"> -->
<!-- <p>High: 76°F / Low: 64°F</p>
<p>Precipitation: 10%</p>
</div> -->
<!-- Repeat for each day -->
<!-- </div>
</section> -->
<!-- Interactive Map Section -->
<section id="mapsok" class="map">
<h3>Interactive Weather Map</h3>
<div id="map" style="height: 400px; width: 100%;">Map Placeholder</div>
</section>
<!-- Interactive Map Section -->
<!-- Footer Section -->
<footer>
<div class="footer-container">
<div>
<a href="#">Privacy Policy</a> |
<a href="#">Terms of Service</a> |
<a href="#">Contact</a>
</div>
<div class="social-icons">
<a href="https://www.facebook.com/people/Shiwantha-Prasad/100088610513417/?locale=et_EE" target="_blank"><img src="Img/facebook.jpg" alt="Facebook"></a>
<a href="https://github.com/SHIWANTHAofficial" target="_blank"><img src="Img/github.png" alt="GitHub"></a>
<a href="https://www.instagram.com/shiwantha_prasad/" target="_blank"><img src="Img/inster.jpg" alt="Instagram"></a>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-0pUGZvbkm6XF6gxjEnlmuGrJXVbNuzT9qBBavbLwCsOGabYfZo0T0to5eqruptLy"
crossorigin="anonymous"></script>
<script src="./Sever/sever.js"></script>
<script>
// Dismiss alert banner
const dismissBtn = document.querySelector('.dismiss-btn');
const alertBanner = document.querySelector('.alert-banner');
dismissBtn.addEventListener('click', () => {
alertBanner.style.display = 'none'; // Hide the alert banner
});
// Function to show the alert banner again
function showAlert() {
alertBanner.style.display = 'flex'; // Show the alert banner again
}
</script>
</body>
</html>