-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
550 lines (424 loc) · 14.7 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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
<!DOCTYPE html>
<html lang="en"> <head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="pic2.png" sizes="any" type="image/svg+xml">
<meta name="theme-color" content="#000">
<meta name="description" content="Covid-19 India Live Updates-Realtime Covid-19 Tracker. Get live & accurate covid-19 india realtime updates along with states live updates. Also get regular updates on India's district covid-19 situation & zones ">
<meta name="keywords" content="Corona Virus Tracker, Covid-19 India Tracker , Covid-19 Tracker">
<meta name="author" content="The Codezine">
<!-- Bootstrap CSS --> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" /> <!--Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.4.1.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script> <!-- Font Awesome -->
<script src="https://kit.fontawesome.com/996973c893.js" crossorigin="anonymous" ></script>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<style>
body {
margin: 0;
font-family: "courier", cursive ;
font-size: 15px;
background-color: transparent!important;
}
.topnav {
overflow: hidden;
background-color: #333;
}
.topnav a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 16px;
text-decoration: none;
font-size: 17px;
}
.topnav a:hover {
background-color: #696666;
padding: 14px 16px;
color: black;
}
.hr {
color: white;
}
.topnav a.active {
background-color: #fff;
padding: 14px 16px;
color: white;
}
.topnav a.translator {
background-color: #fff;
color: white;
}
.topnav a.translator {
background-color:#343a40;
padding: 14px 16px;
color: white;
}
.topnav .icon {
display: none;
}
@media screen and (max-width: 600px) {
.topnav a:not(:first-child) {display: none;}
.topnav a.icon {
float: right;
display: block;
}
}
@media screen and (max-width: 600px) {
.topnav.responsive {position: relative;}
.topnav.responsive .icon {
position: absolute;
right: 0;
top: 0;
}
.topnav.responsive a {
float: none;
display: block;
text-align: left;
}
}
.card {
/* Add shadows to create the "card" effect */
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
transition: 0.3s;
background-color: transparent!important;
border-radius: 5px; /* 5px rounded corners */
}
/* On mouse-over, add a deeper shadow */
.card:hover {
box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);
}
.confirmed{
background-color: #ff384c;
padding: 2px 16px;
border-radius: 5px;
}
.active{
background-color: #6159ff;
padding: 2px 16px;
border-radius: 5px;
}
.recover{
background-color: #04db04;
padding: 2px 16px;
border-radius: 5px;
}
.deaths{
background-color: #9d9e9d;
padding: 2px 16px;
border-radius: 5px;
}
#google_translate_element img
{
display: none !important;
}
.goog-te-banner-frame.skiptranslate {
border: 2px solid black;
display: none !important;
}
@import url(https://fonts.googleapis.com/css?family=Lato);
@import url(https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.css);
a {
text-decoration: none;
color: #ff2424;
}
a:hover{
color: #bfbdbd;
text-decoration: none;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin: 1% 0 1% 0;
}
._12 {
font-size: 1.2em;
}
._14 {
font-size: 1.4em;
}
ul {
padding:0;
list-style: none;
}
.footer-social-icons {
width: 350px;
display:block;
margin: 0 auto;
}
.social-icon {
color: #fff;
}
ul.social-icons {
margin-top: 10px;
}
.social-icons li {
vertical-align: top;
display: inline;
height: 100px;
}
.social-icons a {
color: #fff;
text-decoration: none;
}
.fa-facebook {
padding:10px 14px;
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s;
-webkit-transition:.5s;
transition: .5s;
background-color: #322f30;
}
.fa-facebook:hover {
background-color: #3d5b99;
}
.fa-twitter {
padding:10px 12px;
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s;
-webkit-transition:.5s;
transition: .5s;
background-color: #322f30;
}
.fa-twitter:hover {
background-color: #00aced;
}
.fa-rss {
padding:10px 14px;
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s;
-webkit-transition:.5s;
transition: .5s;
background-color: #322f30;
}
.fa-rss:hover {
background-color: #eb8231;
}
.fa-youtube {
padding:10px 14px;
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s;
-webkit-transition:.5s;
transition: .5s;
background-color: #322f30;
}
.fa-youtube:hover {
background-color: #e64a41;
}
.fa-linkedin {
padding:10px 14px;
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s;
-webkit-transition:.5s;
transition: .5s;
background-color: #322f30;
}
.fa-linkedin:hover {
background-color: #0073a4;
}
.fa-github {
padding:10px 14px;
-o-transition:.5s;
-ms-transition:.5s;
-moz-transition:.5s;
-webkit-transition:.5s;
transition: .5s;
background-color: #322f30;
}
.fa-github:hover {
background-color: #5a32a3;
}
[data-theme="dark"] {
background-color: #111 !important;
color: #eee;
}
[data-theme="dark"] .bg-light {
background-color: #333 !important;
}
[data-theme="dark"] .bg-white {
background-color: #000 !important;
}
[data-theme="dark"] .bg-black {
background-color: #eee !important;
}
input
{
padding: 5px;
border-radius: 10px;
border-style: solid;
border-color: red;
transition-duration: 0.5s;
width: 80%;
}
input:focus
{
border-color: red;
transition-duration: 0.5s;
}
</style>
<script>
//** replace with your api
$(document).ready(function () { $.getJSON("https://api.covid19india.org/data.json", function (data) { var states = []; var confirmed = []; var recovered = []; var deaths = []; var total_active; var total_confirmed; var total_recovered; var total_deaths; total_active = data.statewise[0].active; total_confirmed = data.statewise[0].confirmed; total_recovered = data.statewise[0].recovered; total_deaths = data.statewise[0].deaths; $.each(data.statewise, function (id, obj) { states.push(obj.state); confirmed.push(obj.confirmed); recovered.push(obj.recovered); deaths.push(obj.deaths); }); states.shift(); confirmed.shift(); recovered.shift();deaths.shift(); $("#confirmed").append(total_confirmed); $("#active").append(total_active); $("#recovered").append(total_recovered); $("#deaths").append(total_deaths); var myChart = document.getElementById("chartbar").getContext("2d"); var chart = new Chart(myChart, { type: "line", fill: true,
backgroundColor: "rgba(244, 144, 128, 0.8)",data: { labels: states, datasets: [ { label: "Confirm No", data: confirmed, backgroundColor: "#ff384c", minBarLength: 100, }, { label: "Recover No", data: recovered, backgroundColor: "#04db04", minBarLength: 100, }, { label: "Deaths No", data: deaths, backgroundColor: "#9d9e9d", minBarLength: 100, }, ], }, option: {}, }); });});
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
<script>
$(document).ready(function () { $.getJSON("https://api.covid19india.org/data.json", function (data) { var deltastates = []; var deltaconfirmed = []; var deltarecovered = []; var deltadeaths = []; var total_deltaconfirmed; var total_deltarecovered; var total_deltadeaths; total_deltaconfirmed = data.statewise[0].deltaconfirmed; total_deltarecovered = data.statewise[0].deltarecovered; total_deltadeaths = data.statewise[0].deltadeaths; $.each(data.statewise, function (id, obj) { deltastates.push(obj.state); deltaconfirmed.push(obj.deltaconfirmed); deltarecovered.push(obj.deltarecovered); deltadeaths.push(obj.deltadeaths); }); deltastates.shift(); deltaconfirmed.shift(); deltarecovered.shift(); deltadeaths.shift(); var myChart = document.getElementById("chartbar1").getContext("2d"); var chart = new Chart(myChart, { type: "line", fill: true,
backgroundColor: "rgba(244, 144, 128, 0.8)", borderColor: 'rgba(33, 232, 234, 1)',
borderWidth: 1,
fill: false,data: { labels: deltastates, datasets: [ { label: "Daily Confirm No", data: deltaconfirmed, backgroundColor: "#a303ff", minBarLength: 100, }, { label: "Daily Recover No", data: deltarecovered, backgroundColor: "#ff039a", minBarLength: 100, }, { label: "Daily Deaths No", data: deltadeaths, backgroundColor: "#ffd70f", minBarLength: 100, }, ], }, option: {}, }); });});
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
<!-- Google Fonts -->
<!-- My Stylesheet -->
<!-- Chart.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script>
<script src="https://thecodezine.com/covid19/animated.js"></script><title>Covid-19 India Live Updates- Real time tracker</title>
</head>
<body onload="fetch();">
<div align="center"> <a href="https://www.thecodezine.com/covid19">
<img border="0" src="https://thecodezine.com/covid19/pic2.png" alt="Corona live update" style="width:100px;height:100px;"></a></div>
<div class="container-fluid bg-transparent p-5 text-center my-3">
<div class="custom-control custom-switch" align="right">
<input type="checkbox" class="custom-control-input" id="darkSwitch">
<label class="custom-control-label" for="darkSwitch">Mode</label>
</div>
<div class="topnav" id="myTopnav">
<i class="fa fa-bars"></i>
</a>
</div>
</div>
</div>
</div>
<div align="center" class="container my-3">
<div align="center"><p id="LUD" ></p> </div>
<div class="card"> <div class="confirmed"><h4 style="color:#fff;"><b>Confirmed 😟 </b></h4></div><p style="color:#f54242;">[+]</p><p id="TC" style="color:#f54242;"></p>
<div class="confirmed">
<h4 id="confirmed" style="color:#fff;"></h4></div> </div>
<hr>
<div class="card"> <div class="active"><h4 style="color:#fff;"><b>Active 😓</b></h4></div><p style="color:#6159ff;">[+]</p><p style="color:#6159ff;">*</p><div class="active"> <h4 id="active" style="color:#fff;"></h4> </div>
</div>
<hr>
<div class="card"> <div class="recover"><h4 style="color:#fff;"><b>Recovered 😃</b></h4></div><p style="color:#04db04;">[+]</p><p id="TR" style="color:#04db04;"></p></b>
<div class="recover">
<h4 id="recovered" style="color:#fff;"></h4> </div></div>
<hr>
<div class="card"> <div class="deaths"> <h4 style="color:#fff;"><b>Deceased 😢</b></h4></div><p style="color:#9d9e9d;">[+]</p><p id="TD" style="color:#9d9e9d;"></p></b></p>
<div class="deaths">
<h4 id="deaths" style="color:#fff;"></h4> </div> </div> </div>
<hr>
<center>
<div align="center"> <iframe src="https://vm.di91.com/" ref="nofollow" id="statewise" scrolling="no" frameBorder="0" width="100%" height="700"></iframe></div>
<h5 class=" border border-danger">*Covid-19 India Analysis*</h5></center>
<hr>
<canvas id="chartbar"></canvas>
<canvas id="chartbar1"></canvas>
<div class="container text-center my-5">
<h6 class="border border-danger"> *Click on the bar to see state data individually.* </h6> </div>
<hr>
<section class=" corona-update container-fluid">
<div class="mb-4">
</div>
<!--All India-->
<div class="row text-center">
</div>
<footer class="footer mt-5 py-3 bg-muted text-light " align="center">
<div id="google_translate_element" align="center"></div>
<hr>
<script>
const darkSwitch = document.getElementById('darkSwitch');
window.addEventListener('load', () => {
if (darkSwitch) {
initTheme();
darkSwitch.addEventListener('change', () => {
resetTheme();
});
}
});
/**
* Summary: function that adds or removes the attribute 'data-theme' depending if
* the switch is 'on' or 'off'.
*
* Description: initTheme is a function that uses localStorage from JavaScript DOM,
* to store the value of the HTML switch. If the switch was already switched to
* 'on' it will set an HTML attribute to the body named: 'data-theme' to a 'dark'
* value. If it is the first time opening the page, or if the switch was off the
* 'data-theme' attribute will not be set.
* @return {void}
*/
function initTheme() {
const darkThemeSelected =
localStorage.getItem('darkSwitch') !== null &&
localStorage.getItem('darkSwitch') === 'dark';
darkSwitch.checked = darkThemeSelected;
darkThemeSelected ? document.body.setAttribute('data-theme', 'dark') :
document.body.removeAttribute('data-theme');
}
function resetTheme() {
if (darkSwitch.checked) {
document.body.setAttribute('data-theme', 'dark');
localStorage.setItem('darkSwitch', 'dark');
} else {
document.body.removeAttribute('data-theme');
localStorage.removeItem('darkSwitch');
}
}
</script>
<div id="google_translate_element" align="center"></div>
<script type="text/javascript">
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en', includedLanguages: 'en,hi,bn',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
</script>
<script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
<div class="footer-social-icons" align="center">
<h5 class="text-danger"><strong>Follow us on</strong></h5>
<ul class="social-icons">
<li><a href="https://facebook.com/thecodezine" class="social-icon"> <i class="fa fa-facebook"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-twitter"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-youtube"></i></a></li>
</ul>
</div>
<div class="container text-center"><span class="text-primary" >Built by <a href="https://thecodezine.com">The Codezine</a></span> <span class="text-primary" >Data from api.covid19india.org</span > </div>
</footer>
<script>
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
<script src="jquery.min.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
</body></html>
<!-- CODE BY DARK SOULZ -->