-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
179 lines (163 loc) · 6.94 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>Corona Virus </title>
<!-- <link rel="stylesheet" href="css/bootstrap.min.css"> -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="css/mystyle.css"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0" crossorigin="anonymous" />
<link href="https://fonts.googleapis.com/css2?family=Righteous&display=swap" rel="stylesheet"/>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Audiowide&display=swap" rel="stylesheet">
</head>
<body>
<span id="logo-text"></i>powered_by Navjot Singh <i class="fa fa-thumbs-o-up" aria-hidden="true"></i><span class="spinner-grow"></span><span class="spinner-grow"></span></span>
<a href="india.html" title="Click Here" class="btn btn-dark">Go To India</a>
<div class="main-heading"><h1 class="text-dark">COVID-19 (CORONA VIRUS) PANDEMIC</h1></div>
<!-- ************************Main case Section start***************** -->
<section class="header-extra-div">
<div class="container-fluid ">
<div class="row livestatus">
<div class="col-md-4 col-12 same extra-div1" >
<li class="fa-3x fa fa-hand-o-down one" aria-hidden="true"></li>
<h2> Total Cases:</h2>
<!-- <div class="spinner-border text-primary"></div> -->
<p id="totalcases" class="spinner-border"></p>
</div>
<div class="col-md-4 col-12 same extra-div2">
<li class="fa-3x fa fa-hand-o-down two" aria-hidden="true" ></li>
<h2>Total Deaths:</h2>
<p id="totaldeaths" class="spinner-border"></p>
</div>
<div class="col-md-4 col-12 same extra-div3">
<li class="fa-3x fa fa-hand-o-down three" aria-hidden="true"></li>
<h2>Total Recovered:</h2>
<p id="totalrecovered" class="spinner-border"></p>
</div>
</div>
</div>
</section>
<!-- ************************Main case Section start***************** -->
<!-- **************************Active closed cases start*********************** -->
<section class="serviceoffers" id="casecontainer">
<div class="container-fluid">
<div class="row">
<div class="col-md-6 border border-dark">
<h1>Active Cases</h1>
<div class="case-dataparent">
<div class="casedata case1">
<h2 >Updating....</h2>
<span class="span1">Currently Infected Patients</span>
</div>
<div class="casedata case2">
<h2>Updating....</h2>
<span class="span2">in Mild Condition</span>
</div>
</div>
<div class="case-dataparent">
<div class="casedata case3">
<h2>Updating....</h2>
<span class="span3">Serious or Critical</span>
</div>
</div>
</div>
<br><br><br><br>
<div class="col-md-6 border border-dark">
<h1>Closed Cases</h1>
<div class="case-dataparent">
<div class="casedata case4">
<h2>Updating....</h2>
<span class="span4">Cases which had an outcome</span>
</div>
<div class="casedata case5">
<h2>Updating....</h2>
<span class="span5">Recovered / Discharged</span>
</div>
</div>
<div class="case-dataparent">
<div class="casedata case6">
<h2>Updating....</h2>
<span class="span6">Deaths</span>
</div>
</div>
</div>
</div>
</div>
</section>
<br>
<div class="table-responsive" id="table-container">
<table class="table table-striped table-bordered">
<thead>
<tr>
<th scope="col">Countries<br />List</th>
<th scope="col">Total<br />Cases</th>
<th scope="col">New<br />Cases</th>
<th scope="col">Total<br />Deaths</th>
<th scope="col">New<br />Deaths</th>
<th scope="col">Total<br />Recovered</th>
<th scope="col">Active<br/>Cases</th>
<th scope="col">Serious,<br/>Critical</th>
<th scope="col">Total<br/>Tests</th>
<th scope="col">Deaths/<br/>1M pop</th>
</tr>
</thead>
<tbody id="load-table">
</tbody>
</table>
</div>
<br><br>
<script src="js/jquery.js" charset="utf-8"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(function(){
$.ajax({
url: "https://covid19api.io/api/v1/AllReports",
type: "GET",
dataType: "JSON",
success:function(data){
var total_cases=data.reports[0].table[0][0].TotalCases;
var total_deaths=data.reports[0].table[0][0].TotalDeaths;
var total_recovered=data.reports[0].table[0][0].TotalRecovered;
var currently_infected_patients= data.reports[0].active_cases[0].currently_infected_patients;
var seriouus_or_critical= data.reports[0].active_cases[0].criticalStates;
var mild_condition= data.reports[0].active_cases[0].inMidCondition;
var case_had_outcome=data.reports[0].closed_cases[0].cases_which_had_an_outcome;
var Recovered_Discharged=data.reports[0].recovered;
var deaths=data.reports[0].deaths;
$(".header-extra-div .container-fluid .livestatus #totalcases").html(total_cases).removeClass("spinner-border");
$(".header-extra-div .container-fluid .livestatus #totaldeaths").html(total_deaths).removeClass("spinner-border");
$(".header-extra-div .container-fluid .livestatus #totalrecovered").html(total_recovered).removeClass("spinner-border");
$("#casecontainer .case1 h2").html(currently_infected_patients);
$("#casecontainer .case2 h2").html(mild_condition);
$("#casecontainer .case3 h2").html(seriouus_or_critical);
$("#casecontainer .case4 h2").html(case_had_outcome);
$("#casecontainer .case5 h2").html(Recovered_Discharged);
$("#casecontainer .case6 h2").html(deaths);
$.each(data.reports[0].table[0],function(key,value){
$("#table-container #load-table").append("<tr>"+
"<th scope='row'>"+value.Country+"</th>"+
"<td>"+value.TotalCases+"</td>"+
"<td>"+value.NewCases+"</td>"+
"<td>"+value.TotalDeaths+"</td>"+
"<td>"+value.NewDeaths+"</td>"+
"<td>"+value.TotalRecovered+"</td>"+
"<td>"+value.ActiveCases+"</td>"+
"<td>"+value.Serious_Critical+"</td>"+
"<td>"+value.TotalTests+"</td>"+
"<td>"+value.Deaths_1M_pop+"</td>"+
"</tr>"
);
});
}
});
$('[data-toggle="popover"]').popover() //ENABLE POPOVER
$('[data-toggle="tooltip"]').tooltip(); //ENABLE TOOLTIP
$('.toast').toast('show'); //ENABLE TOAST
});
</script>
</body>
</html>