-
Notifications
You must be signed in to change notification settings - Fork 0
/
weather.html
161 lines (159 loc) · 6.55 KB
/
weather.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body>
<style>
.ilf{
background-color: white;
border: 2px solid;
}
</style>
<script src = "location.js"></script>
<script src = "weather.js"></script>
<section class="py-5" style="background-color: mediumslateblue;">
<div class="container">
<div class="row">
<div class="col-3">
<label for="country">Select Country</label>
<select name="country" class="form-control" id="country" onchange="loadStates()">
<option value="" selected> </option>
</select>
</div>
<div class="col-3">
<label for="state">Select State</label>
<select name="state" class="form-control" id="state" onchange="loadCities()">
<option value="" selected> </option>
</select>
</div>
<div class="col-3">
<label for="city">Select City</label>
<select name="city" class="form-control" id="city">
<option value="" selected> </option>
</select>
</div>
</div>
<div class="row pt-5">
<div class="col-3">
<button type="button" class="btn btn-success" onclick="getWeatherDetails()">Weather Report</button>
</div>
</div>
</div>
</section>
<section style="background-color: linen; display: none;" id = 'weatherBlock'>
<div class="container">
<div class="row py-3" >
<div class="col ilf">
<span id = "date">Today</span>
<!-- <img src="cloudy.png" style="max-width: 80%;" alt="cloudy"> -->
<br>
<img src="" alt="" id = "img0">
<br>
Temp- <span id = "current"></span>°c
<br>
Wind- <span id = "windSpeed"></span> Km/hr
<br>
Humidity- <span id = "humidity"></span> gm³
<br>
Max- <span id = "max0"></span>°c
<br>
Min- <span id = "min0"></span>°c
<br>
Sunrise- <span id = "sunrise0"></span>
<br>
Sunset- <span id = "sunset0"></span>
</div>
<div class="col ilf">
Tomorrow
<!-- <img src="cloudy.png" style="max-width: 80%;" alt="cloudy"> -->
<br>
<img src="" alt="" id = "img1">
<br>
Max- <span id = "max1"></span>°c
<br>
Min- <span id = "min1"></span>°c
<br>
Sunrise- <span id = "sunrise1"></span>
<br>
Sunset- <span id = "sunset1"></span>
</div>
<div class="col ilf">
<span id = 'date2'></span>
<br>
<img src="" alt="" id = "img2">
<!-- <img src="cloudy.png" style="max-width: 80%;" alt="cloudy"> -->
<br>
Max- <span id = "max2"></span>°c
<br>
Min- <span id = "min2"></span>°c
<br>
Sunrise- <span id = "sunrise2"></span>
<br>
Sunset- <span id = "sunset2"></span>
</div>
<div class="col ilf">
<span id = 'date3'></span>
<br>
<img src="" alt="" id = "img3">
<br>
<!-- <img src="cloudy.png" style="max-width: 80%;" alt="cloudy"> -->
Max- <span id = "max3"></span>°c
<br>
Min- <span id = "min3"></span>°c
<br>
Sunrise- <span id = "sunrise3"></span>
<br>
Sunset- <span id = "sunset3"></span>
</div>
<div class="col ilf">
<span id = 'date4'></span>
<br>
<img src="" alt="" id = "img4">
<br>
<!-- <img src="cloudy.png" style="max-width: 80%;" alt="cloudy"> -->
Max- <span id = "max4"></span>°c
<br>
Min- <span id = "min4"></span>°c
<br>
Sunrise- <span id = "sunrise4"></span>
<br>
Sunset- <span id = "sunset4"></span>
</div>
<div class="col ilf">
<span id = 'date5'></span>
<br>
<img src="" alt="" id = "img5">
<!-- <img src="cloudy.png" style="max-width: 80%;" alt="cloudy"> -->
<br>
Max- <span id = "max5"></span>°c
<br>
Min- <span id = "min5"></span>°c
<br>
Sunrise- <span id = "sunrise5"></span>
<br>
Sunset- <span id = "sunset5"></span>
</div>
<div class="col ilf">
<span id = 'date6'></span>
<br>
<img src="" alt="" id = "img6">
<!-- <img src="cloudy.png" style="max-width: 80%;" alt="cloudy"> -->
<br>
Max- <span id = "max6"></span>°c
<br>
Min- <span id = "min6"></span>°c
<br>
Sunrise- <span id = "sunrise6"></span>
<br>
Sunset- <span id = "sunset6"></span>
</div>
</div>
</div>
</section>
</body>
</html>