-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
97 lines (92 loc) · 3.49 KB
/
Copy pathindex.html
File metadata and controls
97 lines (92 loc) · 3.49 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Weather App in JavaScript</title>
<link rel="stylesheet" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css' rel='stylesheet'>
</head>
<body>
<main class="app-container">
<section class="main" role="main">
<header>
<h1>Weather App</h1>
</header>
<section class="input-part">
<form class="content" role="search">
<label for="city" class="sr-only">Enter city name</label>
<input id="city" type="text" placeholder="Enter city name" required aria-describedby="city-help">
<div id="city-help" class="sr-only">Type a city name to get weather information</div>
<div class="separator"></div>
<button id="result" type="submit">Submit</button>
<div class="separatorGet"></div>
<button id="getLocation" type="button">Get Location</button>
</form>
</section>
<div id="loading" class="loading-spinner" style="display: none;" aria-live="polite">
<div class="spinner"></div>
<p>Loading weather data...</p>
</div>
<div id="error-message" class="error-message" style="display: none;" role="alert" aria-live="assertive"></div>
</section>
<section class="weather" style="display:none;" aria-labelledby="weather-header">
<header>
<button id="back" aria-label="Go back to search"><i class='bx bx-left-arrow-alt'></i></button>
<h2 id="weather-header">Weather App</h2>
<button id="unit-toggle" aria-label="Toggle temperature unit">°C</button>
</header>
<div class="weather-content">
<div id="data-top">
<img id="sky" alt="Weather icon">
<p id="temp" aria-label="Current temperature"></p>
<p id="description" aria-label="Weather description"></p>
<p id="location" aria-label="Location"></p>
</div>
<div class="data-bottom">
<div class="column">
<i class='bx bxs-thermometer' aria-hidden="true"></i>
<div class="details">
<p id="feels_like"></p>
<span>Feels Like</span>
</div>
</div>
<div class="column">
<i class='bx bxs-droplet-half' aria-hidden="true"></i>
<div class="details">
<p id="humidity"></p>
<span>Humidity</span>
</div>
</div>
<div class="column">
<i class='bx bx-wind' aria-hidden="true"></i>
<div class="details">
<p id="wind_speed"></p>
<span>Wind Speed</span>
</div>
</div>
<div class="column">
<i class='bx bx-tachometer' aria-hidden="true"></i>
<div class="details">
<p id="pressure"></p>
<span>Pressure</span>
</div>
</div>
<div class="column">
<i class='bx bx-show' aria-hidden="true"></i>
<div class="details">
<p id="visibility"></p>
<span>Visibility</span>
</div>
</div>
</div>
</div>
</section>
<section id="forecast" style="display:none;" aria-labelledby="forecast-header">
<h3 id="forecast-header">5-Day Forecast</h3>
<div id="forecast-list" class="forecast-list" role="list"></div>
</section>
</main>
<script src="script.js"></script>
</body>
</html>