-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcovid.html
More file actions
221 lines (214 loc) · 7.08 KB
/
covid.html
File metadata and controls
221 lines (214 loc) · 7.08 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
<!DOCTYPE html>
<html>
<head>
<title>COVID 19</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie-edge">
<link rel="stylesheet" type="text/css" href="homepage_style.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
</head>
<body>
<div id="navbarc" class="navbarc">
<a href="index.html" id="home">Home</a>
<a href="aboutme.html" class="right">About Us</a>
<a href="conme.html" class="right">Contact Us</a>
<a href="GSA.html" class="right"><i class="fa fa-book" aria-hidden="true"></i></a>
<a href="covid.html" class="right"><i class="fa fa-user-md" aria-hidden="true"></i></a>
<a href="sort.html" class="right"><i class="fa fa-code" aria-hidden="true"></i></a>
</div>
<div class="row" style="background-image: url('covidbkg2.png'); background-repeat: no-repeat; background-attachment: fixed; background-size: 100% 100%;">
<div>
<h1 style="padding-left: 380px; padding-top: 30px; color: white">COVID - 19 Stats</h1>
</div>
<div class="content">
<div class="container" style="padding-left: 160px;">
<h1 style="color: white; padding-left: 100px;"class="text-center mt-5" >India - Covid 19 Live tracker</h1>
<br><br>
<div style="padding-left: 50px; width: 700px; table-layout: auto;">
<table class="table table-hover" style="background-color: #bfbfbf;">
<thead>
<tr>
<th>Total Cases</th>
<th>Total Deaths</th>
<th>Total Recovered</th>
</tr>
</thead>
<tbody>
<tr id="data">
</tr>
</tbody>
</table>
<button onclick="refreshData()" class="btn btn-danger btn-block">
Refresh Data
</button>
<hr style="border-width: 20px; border-color: black;">
<table class="table table-hover" style="background-color: #bfbfbf;">
<thead>
<tr>
<th>Cases in last 24 hours</th>
<th>Deaths in last 24 hours</th>
<th>Recovered in last 24 hours</th>
</tr>
</thead>
<tbody>
<tr id="data3">
</tr>
</tbody>
</table>
<button onclick="refreshData3()" class="btn btn-danger btn-block">
Refresh Data
</button>
<hr style="border-width: 20px; border-color: black;">
</div>
<br><br>
<h1 style="color: white; padding-left: 100px;"class="text-center mt-5">World - Covid 19 Live tracker</h1>
<br><br>
<div style="padding-left: 50px; width: 700px; table-layout: auto;">
<table class="table table-hover" style="background-color: #bfbfbf;">
<thead>
<tr>
<th>Total Cases</th>
<th>Total Deaths</th>
<th>Total Recovered</th>
</tr>
</thead>
<tbody>
<tr id="data2">
</tr>
</tbody>
</table>
<button onclick="refreshData2()" class="btn btn-danger btn-block">
Refresh Data
</button>
<hr style="border-width: 20px; border-color: black;">
<table class="table table-hover" style="background-color: #bfbfbf;">
<thead>
<tr>
<th>Cases in last 24 hrs</th>
<th>Deaths in last 24 hrs</th>
<th>Recovered in last 24 hrs</th>
</tr>
</thead>
<tbody>
<tr id="data4">
</tr>
</tbody>
</table>
<button onclick="refreshData4()" class="btn btn-danger btn-block">
Refresh Data
</button>
<hr style="border-width: 20px; border-color: black;">
</div>
</div>
</div>
</div>
<footer>
<div style="float: right; padding-right: 600px;">
<a href="https://www.facebook.com/" class="fa fa-facebook"></a>
<a href="https://www.twitter.com/" class="fa fa-twitter"></a>
<a href="https://www.youtube.com/" class="fa fa-youtube"></a>
<a href="https://www.instagram.com/" class="fa fa-instagram"></a>
</div>
<h4 style="color: white; padding-left: 20px; padding-top: 10px; text-align: left;">Reach us</h4>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
window.onscroll = function() {myFunction()};
var navbarc = document.getElementById("navbarc");
var sticky = navbarc.offsetTop;
function myFunction() {
if (window.pageYOffset >= sticky) {
navbarc.classList.add("sticky")
} else {
navbarc.classList.remove("sticky");
}
}
init()
function init(){
var url = "https://api.covid19api.com/summary"
var data = ''
$.get(url, function(data){
console.log(data.Countries[76])
data=`
<td>${data.Countries[76].TotalConfirmed}</td>
<td>${data.Countries[76].TotalDeaths}</td>
<td>${data.Countries[76].TotalRecovered}</td>
`
$("#data").html(data)
})
}
function refreshData() {
clearData()
init()
}
function clearData() {
$("#data").empty()
}
init3()
function init3(){
var url = "https://api.covid19api.com/summary"
var data = ''
$.get(url, function(data){
console.log(data.Countries[76])
data=`
<td>${data.Countries[76].NewConfirmed}</td>
<td>${data.Countries[76].NewDeaths}</td>
<td>${data.Countries[76].NewRecovered}</td>
`
$("#data3").html(data)
})
}
function refreshData3() {
clearData3()
init3()
}
function clearData3() {
$("#data3").empty()
}
init2()
function init2(){
var url = "https://api.covid19api.com/summary"
var data = ''
$.get(url, function(data){
console.log(data.Global)
data=`
<td>${data.Global.TotalConfirmed}</td>
<td>${data.Global.TotalDeaths}</td>
<td>${data.Global.TotalRecovered}</td>
`
$("#data2").html(data)
})
}
function refreshData2() {
clearData2()
init2()
}
function clearData2() {
$("#data2").empty()
}
init4()
function init4(){
var url = "https://api.covid19api.com/summary"
var data = ''
$.get(url, function(data){
console.log(data.Global)
data=`
<td>${data.Global.NewConfirmed}</td>
<td>${data.Global.NewDeaths}</td>
<td>${data.Global.NewRecovered}</td>
`
$("#data4").html(data)
})
}
function refreshData4() {
clearData4()
init4()
}
function clearData4() {
$("#data4").empty()
}
</script>
</body>
</html>