This repository has been archived by the owner on Apr 9, 2022. It is now read-only.
/
index.html
110 lines (109 loc) · 3.74 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="author" content="Rahul Gurung" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Covid19Web | Get LIVE Corona stats</title>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<link
rel="stylesheet"
href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh"
crossorigin="anonymous"
/>
<link
href="https://fonts.googleapis.com/css2?family=Righteous&family=Roboto&display=swap"
rel="stylesheet"
/>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.13.0/moment.min.js"></script>
<link rel="stylesheet" href="style.css" />
<link rel="shortcut icon" type="image/png" href="./assets/favicon.ico" />
</head>
<body>
<div class="container covid-container">
<div class="row">
<div class="col-sm-12 col-lg-6">
<h3 class="text-left covid-title">Covid19Web</h3>
</div>
</div>
</div>
<div class="container covid-container" id="app" v-cloak>
<div class="row">
<div class="col-sm-12 col-lg-7">
<table class="table table-sm">
<thead>
<tr>
<th>State</th>
<th>Confirmed</th>
<th>Deaths</th>
<th>Recovered</th>
</tr>
</thead>
<tbody v-for="(result, index) in results">
<tr v-bind:class="{'table-active' : index == 0}">
<td>{{result.state}}</td>
<td>
{{result.confirmed}}
<span v-if="result.deltaconfirmed > 0">
<span class="covid-danger">
+{{ result.deltaconfirmed }}
</span>
</span>
</td>
<td>
{{result.deaths}}
<span v-if="result.deltadeaths > 0">
<span class="covid-danger">
+{{ result.deltadeaths }}
</span>
</span>
</td>
<td>
{{result.recovered}}
<span v-if="result.deltarecovered > 0">
<span class="covid-safe">
+{{ result.deltarecovered }}
</span>
</span>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-sm-12 col-lg-5">
<canvas id="canvas" width="400" height="300"></canvas>
<div class="display-options">
<button
v-bind:class="{ 'active-display': displaydays === 7 }"
v-on:click="updateDisplay(7)"
>
7 Days
</button>
<button
v-bind:class="{ 'active-display': displaydays === 15 }"
v-on:click="updateDisplay(15)"
>
15 Days
</button>
<button
v-bind:class="{ 'active-display': displaydays === 30 }"
v-on:click="updateDisplay(30)"
>
30 Days
</button>
<button
v-bind:class="{ 'active-display': displaydays === 60 }"
v-on:click="updateDisplay(60)"
>
60 Days
</button>
</div>
</div>
</div>
</div>
<script src="app.js"></script>
</body>
</html>