-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
124 lines (118 loc) · 6.89 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Weather App</title>
<link rel="icon" type="image/x-icon" href="assets/weather.png">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
</head>
<body>
<nav class="navbar navbar-expand-lg bg-body-tertiary" style="position: fixed; width: 100%; top: 0;">
<div class="container-fluid">
<a class="navbar-brand" href="#" onclick="location.href='index.html'">Weather App</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#" onclick="location.href='index.html'">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.html">About this App</a>
</li>
<li class="nav-item">
<a class="nav-link" href="guide.html">Usage Guide</a>
</li>
</ul>
<form class="d-flex" role="search">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" id="search">
<button class="btn btn-outline-success" type="submit" id="submit">Search</button>
</form>
</div>
</div>
</nav>
<div class="initial-container" id="initial-content"
style="text-align: center; display: flex; flex-direction: row; justify-content: space-around; padding: 0px 50px 0px 50px; margin-top: 130px; margin-bottom: 130px; position: relative;">
<!-- Cards for Initial Weather Data -->
<div class="card" style="width: 18rem;">
<div class="card-header">Delhi</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">Cloud PCT : <span id="cloud_pct1"></span>%</li>
<li class="list-group-item">Temp : <span id="temp1"></span>°C</li>
<li class="list-group-item">Feels like : <span id="feels_like1"></span>°C</li>
<li class="list-group-item">Humidity : <span id="humidity1">%</span>%</li>
<li class="list-group-item">Min temp : <span id="min_temp1"></span>°C</li>
<li class="list-group-item">Max temp : <span id="max_temp1"></span>°C</li>
<li class="list-group-item">Wind speed : <span id="wind_speed1"></span>km/h</li>
<li class="list-group-item">Wind degrees : <span id="wind_degrees1"></span>°</li>
<li class="list-group-item">Sunrise : <span id="sunrise1"></span></li>
<li class="list-group-item">Sunset : <span id="sunset1"></span></li>
</ul>
</div>
<div class="card" style="width: 18rem;">
<div class="card-header">London</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">Cloud PCT : <span id="cloud_pct2"></span>%</li>
<li class="list-group-item">Temp : <span id="temp2"></span>°C</li>
<li class="list-group-item">Feels like : <span id="feels_like2"></span>°C</li>
<li class="list-group-item">Humidity : <span id="humidity2"></span>%</li>
<li class="list-group-item">Min temp : <span id="min_temp2"></span>°C</li>
<li class="list-group-item">Max temp : <span id="max_temp2"></span>°C</li>
<li class="list-group-item">Wind speed : <span id="wind_speed2"></span>km/h</li>
<li class="list-group-item">Wind degrees : <span id="wind_degrees2"></span>°</li>
<li class="list-group-item">Sunrise : <span id="sunrise2"></span></li>
<li class="list-group-item">Sunset : <span id="sunset2"></span></li>
</ul>
</div>
<div class="card" style="width: 18rem;">
<div class="card-header">New York</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">Cloud PCT : <span id="cloud_pct3"></span>%</li>
<li class="list-group-item">Temp : <span id="temp3">°C</span></li>
<li class="list-group-item">Feels like : <span id="feels_like3"></span>°C</li>
<li class="list-group-item">Humidity : <span id="humidity3"></span>%</li>
<li class="list-group-item">Min temp : <span id="min_temp3"></span>°C</li>
<li class="list-group-item">Max temp : <span id="max_temp3"></span>°C</li>
<li class="list-group-item">Wind speed : <span id="wind_speed3"></span>km/h</li>
<li class="list-group-item">Wind degrees : <span id="wind_degrees3"></span>°</li>
<li class="list-group-item">Sunrise : <span id="sunrise3"></span></li>
<li class="list-group-item">Sunset : <span id="sunset3"></span></li>
</ul>
</div>
</div>
<div class="search-container" id="search-content"
style="text-align: center; display: none; justify-content: center; padding: 0 50px 0 50px; margin-bottom: 130px; margin-top: 130px;">
<!-- Card for Searched Weather Data -->
<div class="card" style="width: 18rem;">
<div class="card-header">
<span id="cityName"></span>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">Cloud PCT : <span id="cloud_pct"></span>%</li>
<li class="list-group-item">Temp : <span id="temp">°C</span></li>
<li class="list-group-item">Feels like : <span id="feels_like"></span>°C</li>
<li class="list-group-item">Humidity : <span id="humidity"></span>%</li>
<li class="list-group-item">Min temp : <span id="min_temp"></span>°C</li>
<li class="list-group-item">Max temp : <span id="max_temp"></span>°C</li>
<li class="list-group-item">Wind speed : <span id="wind_speed"></span>km/h</li>
<li class="list-group-item">Wind degrees : <span id="wind_degrees"></span>°</li>
<li class="list-group-item">Sunrise : <span id="sunrise"></span></li>
<li class="list-group-item">Sunset : <span id="sunset"></span></li>
</ul>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
<script src="script.js"></script>
</body>
<footer class="footer"
style="display: flex; justify-content: center;align-items: center; flex-direction: column; background-color: #f8f9fa; position:fixed; bottom:0; width: 100%; padding-top: 10px;">
<p>© 2024 Weather App. All Rights Reserved.</p>
<p>Made with ❤️ by Pranav Sharma</p>
</footer>
</html>