-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
428 lines (417 loc) · 22 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>COVID-19 Tracker</title>
<link rel="stylesheet" type="text/css" href="style4.css" />
<link rel="stylesheet" type='text/css' href="https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/1.2.0/tailwind.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.11/vue.min.js"></script>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/dropdown.min.css"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/transition.min.css"
/>
<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/css?family=Lato:100,300,400,900' rel='stylesheet' type='text/css'>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="new-style.css" />
<link rel="stylesheet" href="mobile.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/numeral.js/2.0.6/numeral.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.26.0/moment.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://kit.fontawesome.com/c939d0e917.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.11/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.3.4/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/js/bootstrap.min.js"></script>
<script src="map-style.js"></script>
<script src="script.js"></script>
<script src="charts.js"></script>
<link rel="stylesheet" type="text/css" href="style1.css" />
<link rel="stylesheet" type="text/css" href="style2.css" />
<link rel="stylesheet" type="text/css" href="style3.css" />
<link rel="stylesheet" type="text/css" href="style4.css" />
<script
defer
src="https://cdnjs.cloudflare.com/ajax/libs/d3/5.15.0/d3.min.js"
></script>
</head>
<body>
<div class="container-fluid main">
<div class="row">
<div class="col-12 col-lg-8 d-flex flex-column">
<div class="row header-container">
<div class="col-sm title-container">
<h2>COVID-19 Tracker</h2>
</div>
<div class="col-sm mt-3 mt-sm-0 search-container">
<div class="ui fluid search selection dropdown">
<input type="hidden" name="country" />
<i class="dropdown icon"></i>
<div class="default text">Select Country</div>
<div class="menu"></div>
</div>
</div>
</div>
<div class="row stats-container">
<div class="col-12 col-sm-4 mb-3 mb-sm-0">
<div
class="card cases active"
onclick="changeDataSelection(this, 'cases')"
>
<div class="tab-selection"></div>
<div class="card-body">
<h6 class="card-title">Coronavirus Cases</h6>
<h3 class="card-subtitle mb-2 total-number">1,436,886</h3>
<div class="text-muted font-weight-bold total cases-total">
1.69M Total
</div>
</div>
</div>
</div>
<div class="col-12 col-sm-4 mb-3 mb-sm-0">
<div
class="card recovered"
onclick="changeDataSelection(this, 'recovered')"
>
<div class="tab-selection"></div>
<div class="card-body">
<h6 class="card-title">Recovered</h6>
<h3 class="card-subtitle mb-2 recovered-number">302,964</h3>
<div
class="text-muted font-weight-bold total recovered-total"
>
1.69M Total
</div>
</div>
</div>
</div>
<div class="col-12 col-sm-4 mb-3 mb-sm-0">
<div
class="card deaths"
onclick="changeDataSelection(this, 'deaths')"
>
<div class="tab-selection"></div>
<div class="card-body">
<h6 class="card-title">Deaths</h6>
<h3 class="card-subtitle mb-2 deaths-number">82,191</h3>
<div class="text-muted font-weight-bold total deaths-total">
1.69M Total
</div>
</div>
</div>
</div>
</div>
<div class="row map-container flex-grow-1 mt-3">
<div class="col">
<div id="map"></div>
</div>
</div>
</div>
<div class="col-4 side-panel-container my-3">
<div class="cases-table-container">
<h4>Live Cases by Country</h4>
<div class="country-data">
<table class="table">
<tbody id="table-data">
</tbody>
</table>
</div>
</div>
<div class="chart-container mt-3">
<h4>Total Cases Globally</h4>
<div class="linear-chart p-3">
<canvas id="myChart"></canvas>
</div>
</div>
</div>
<div class="col-12 third">
<h1>COVID-19 Cases Comparison of 2 Countries</h1>
<div class="selection">
<div>
<span><input type="radio"
name="type"
id="confirmed"
value="confirmed"
checked="checked"
/><label for="confirmed">Confirmed</label></span
>
<span
><input
type="radio"
name="type"
id="deaths"
value="deaths"
/><label for="deaths">Deaths</label></span
>
</div>
<div>
<label for="country1">Country 1:</label>
<select id="country1"></select>
<label for="country2">Country 2:</label>
<select id="country2"></select>
</div>
</div>
<main>
<div class="chart">
<div class="loading">LOADING ...</div>
<!--chart will be rendered here-->
</div>
</main>
</div>
<div class="col-12 fourth">
<div id="main">
<div class="default-background"></div>
<transition :name="transition">
<div class="background-image" :key="`image${current_index}`">
<img :src="currentPanel.img" />
</div>
</transition>
<div id="wrapper" @wheel="handleScroll" :style="wrapperStyle">
<div class="intro">
<h1>Covid 19 Timeline</h1>
<div>31 Dec 2019 - 20 Jul 2020</div>
<a
target="_blank"
class="credit-link"
href="https://www.nytimes.com/article/coronavirus-timeline.html"
>
<img
src="https://i.ya-webdesign.com/images/new-york-times-logo-white-png-4.png"
/>
</a>
<div class="scroll-down">
<span>«</span>
</div>
</div>
<div class="inner-wrapper">
<div id="timeline">
<div
class="line"
v-for="(p, i) in panels"
:class="getLineClass(i)"
@mouseenter="current_index = i"
></div>
<div class="time" :style="time_position" ref="time">
{{display_day}} {{display_month}}
</div>
</div>
<div id="panel-wrapper">
<transition :name="transition" mode="out-in">
<div class="panel" :key="`index-${current_index}`">
<h1>{{currentPanel.title}}</h1>
<div class="desc" v-html="currentPanel.desc"></div>
</div>
</transition>
</div>
</div>
</div>
</div>
</div>
<div class="col-12 fifth">
<div class="container">
<div class="row">
<a class="post" href="https://www.ynetnews.com/article/SkT38illP" target="_blank"><div class="col-md-4">
<div class="inner">
<p class="category p">News <span class="date"><i class="fa fa-clock-o"></i>2020.06.26</p>
<h2 class="h2">1,009 new coronavirus cases since midnight, say health officials</h2>
<p class="p">At least 1,009 new coronavirus cases have been recorded in Israel since midnight, the Coronavirus National Knowledge and Information Center said Saturday. The report said that six more people died from complications related to COVID-19, bringing the total nu…</p>
<a class="read-more" href="https://www.ynetnews.com/article/SkT38illP" target="_blank">Read More</a>
</div>
</div></a>
<a class="post" href="https://www.commondreams.org/sites/default/files/views-article/thumbs/trump_resign.jpg" target="_blank"><div class="col-md-4">
<div class="inner">
<p class="category p">News <span class="date"><i class="fa fa-clock-o"></i>2020.06.29</p>
<h2 class="h2">Wake Up, America! We Must Force Trump to Resign or At Least Step Aside</h2>
<p class="p">Your messages tell presidents which way the political winds are blowing. Make this \"rumble of the people\" speak loud and clear NOW!.. Public Citizen’s open letter, co-signed by over twenty nonprofit civic organizations working for the public health, demanded …</p>
<a class="read-more" href="https://www.commondreams.org/sites/default/files/views-article/thumbs/trump_resign.jpg">Read More</a>
</div>
</div></a>
<a class="post" href="https://i.cbc.ca/1.5618240.1593381372!/httpImage/image.jpg_gen/derivatives/16x9_620/covid-19.jpg" target="_blank"><div class="col-md-4">
<div class="inner">
<p class="category p">News <span class="date"><i class="fa fa-clock-o"></i>2020.07.02</p>
<h2 class="h2">No new cases of COVID-19 in N.B. for 3rd straight day</h2>
<p class="p">There are no new cases of COVID-19 in New Brunswick today, the third day in a row since a single case was reported Wednesday.</p>
<a class="read-more" href="https://i.cbc.ca/1.5618240.1593381372!/httpImage/image.jpg_gen/derivatives/16x9_620/covid-19.jpg" target="_blank">Read More</a>
</div>
</div></a>
<a class="post" href="https://indianexpress.com/article/cities/pune/pune-coronavirus-update-hospital-study-oxygen-levels-early-detection-6512441/" target="_blank"><div class="col-md-4">
<div class="inner">
<p class="category p">News <span class="date"><i class="fa fa-clock-o"></i>2020.07.07</p>
<h2 class="h2">Pune hospital study raises concern over dropping oxygen levels, flags need for early detection</h2>
<p class="p">Severe headache, loss of taste among Covid symptoms</p>
<a class="read-more" href="https://indianexpress.com/article/cities/pune/pune-coronavirus-update-hospital-study-oxygen-levels-early-detection-6512441/" target="_blank">Read More</a>
</div>
</div></a>
<a class="post" href="https://www.insideover.com/economy/the-united-kingdoms-5g-decision-taking-a-stand-against-china.html" target="_blank"><div class="col-md-4">
<div class="inner">
<p class="category p">News <span class="date"><i class="fa fa-clock-o"></i>2020.07.10</p>
<h2 class="h2">The Great Britain's 5G decision Taking a stand against China</h2>
<p class="p">It came as no surprise, and has certainly been anticipated in the pages of this publication, that the British government decided to prohibit telecom providers from buying new equipment for 5G networks from Huawei Technologies. It is undoubtedly a U-turn for t…</p>
<a class="read-more" href="https://www.insideover.com/economy/the-united-kingdoms-5g-decision-taking-a-stand-against-china.html" target="_blank">Read More</a>
</div>
</div></a>
<a class="post" href="https://checkyourfact.com/2020/07/18/fact-check-barack-obama-anthony-fauci-melinda-gates-wuhan-institute-virology/" target="_blank"><div class="col-md-4">
<div class="inner">
<p class="category p">News<span class="date"><i class="fa fa-clock-o"></i>2020.07.13</p>
<h2 class="h2">Does This Photo Show Barack Obama, Anthony Fauci And Melinda Gates At The Wuhan Institute Of Virology In 2015?</h2>
<p class="p">An image shared on Facebook purportedly shows Barack Obama, Anthony Fauci and Melinda Gates visiting the Wuhan Institute of Virology in 2015.</p>
<a class="read-more" href="https://checkyourfact.com/2020/07/18/fact-check-barack-obama-anthony-fauci-melinda-gates-wuhan-institute-virology/" target="_blank">Read More</a>
</div>
</div></a>
<a class="post" href="https://indianexpress.com/article/india/maharashtra-dairies-brace-for-further-losses-as-lockdown-returns-in-urban-pockets-6512424/" target="_blank"><div class="col-md-4">
<div class="inner">
<p class="category p">News <span class="date"><i class="fa fa-clock-o"></i>2020.07.16</p>
<h2 class="h2">Maharashtra: Dairies brace for further losses as lockdown returns in urban pockets</h2>
<p class="p">Of the 11.50 lakh litres of milk it collects daily, Gokul dairy said, it was forced to covert around 1 lakh litres into SMP. “This is an improvement from the situation in April- May, when our sales had dipped by 2-2.5 lakh litres per day,” he said.</p>
<a class="read-more" href="https://indianexpress.com/article/india/maharashtra-dairies-brace-for-further-losses-as-lockdown-returns-in-urban-pockets-6512424/" target="_blank">Read More</a>
</div>
</div></a>
<a class="post" href="https://www.rawstory.com/2020/07/top-14-most-startling-things-kanye-west-said-at-his-first-rally-from-his-attack-on-harriet-tubman-to-calling-steve-jobs-a-nazi/" target="_blank"><div class="col-md-4">
<div class="inner">
<p class="category p">News <span class="date"><i class="fa fa-clock-o"></i>2020.07.18</p>
<h2 class="h2">Top 14 most startling things Kanye West said at his first rally — from his attack on Harriet Tubman to calling Steve Jobs a Nazi</h2>
<p class="p">Kanye West is working to be a spoiler candidate for Vice President Joe Biden, pulling away Black voters from supporting the Democratic candidate with his own presidential run. But West’s first rally didn’t appear to go well. Appearing in front of a half-full …</p>
<a class="read-more" href="https://www.rawstory.com/2020/07/top-14-most-startling-things-kanye-west-said-at-his-first-rally-from-his-attack-on-harriet-tubman-to-calling-steve-jobs-a-nazi/" target="_blank">Read More</a>
</div>
</div></a>
<a class="post" href="https://www.seattlepi.com/business/article/Virus-deaths-top-600-000-as-cases-rise-in-15418409.php" target="_blank"><div class="col-md-4">
<div class="inner">
<p class="category p">News <span class="date"><i class="fa fa-clock-o"></i>2020.07.18</p>
<h2 class="h2">Governments around world eye tougher steps to fight virus</h2>
<p class="p">Signs of governments reassessing their coronavirus response were scattered around the world Sunday, with the mayor of Los Angeles saying the city was reopened too quickly, Ohio's governor warning his state is \"going the wrong way,\" Hong Kong issuing tougher n…</p>
<a class="read-more" href="https://www.seattlepi.com/business/article/Virus-deaths-top-600-000-as-cases-rise-in-15418409.php" target="_blank">Read More</a>
</div>
</div></a>
</div>
</div>
</div>
<div class="col-12 sixth">
<div id="app" class="antialiased">
<header class="text-center border-b border-gray-300 mb-6 pb-2">
<h1 class="m-0 text-3xl font-medium">COVID-19 Dashboard</h1>
<p class="my-4 text-md">
<button
@click="fetchCountryData"
class="bg-purple-600 rounded py-2 px-4 text-white text-sm font-semibold ml-auto"
:class="{ 'cursor-not-allowed opacity-50': (!statsLoaded || !countriesLoaded) }"
>
<span v-if="statsLoaded || countriesLoaded">Refresh</span>
<span v-else>Loading…</span>
</button>
</p>
</header>
<alert v-if="errorStats">
<template v-slot:title>
Error Loading Stats!
</template>
<template v-slot:content>
<p>There was an error loading the stats data.</p>
</template>
</alert>
<ul v-if="statsLoaded" class="sm:grid sm:grid-cols-3 sm:gap-4 mb-4">
<li v-for="(value, label, idx) in stats">
<card>
<stat-title>Total {{ label }}:</stat-title>
<stat-num :stat="value" />
</card>
</li>
</ul>
<alert v-if="errorCountries">
<template v-slot:title>
Error Loading Country Data!
</template>
<template v-slot:content>
<p>There was an error loading the country-specific data.</p>
</template>
</alert>
<ul v-if="countriesLoaded" class="md:grid md:grid-cols-2 md:gap-4">
<li v-for="(item, idx) in paginatedData" :key="idx">
<card>
<h3 class="font-bold text-md mb-3 pb-2 border-b border-gray-300">
{{ item.country }}
</h3>
<div class="grid grid-cols-2 gap-4">
<p>
<stat-title>Active:</stat-title>
<stat-num :stat="item.active" />
</p>
<p>
<stat-title>Today:</stat-title>
<stat-num :stat="item.todayCases" />
</p>
<p>
<stat-title>Cases:</stat-title>
<stat-num :stat="item.cases" />
</p>
<p>
<stat-title>Deaths:</stat-title>
<stat-num :stat="item.deaths" />
</p>
<p>
<stat-title>Recovered:</stat-title>
<stat-num :stat="item.recovered" />
</p>
<p>
<stat-title>Critical:</stat-title>
<stat-num :stat="item.critical" />
</p>
</div>
</card>
</li>
</ul>
<div v-if="countriesLoaded">
<div class="text-center my-4 text-sm text-gray-600">
<p>{{ pagePlace }}</p>
</div>
<pagination
:has-prev="pageNumber > 0"
:has-next="pageNumber < pageCount -1"
@next="nextPage"
@prev="prevPage"
/>
</div>
</div>
</div>
</div>
</div>
<script src="script4.js" type="text/javascript"></script>
<script
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDJ7VvobsIYLr3Pe6cTNUnIUvzgpV2Na-o&callback=initMap"
async
defer
></script>
<script
src="https://code.jquery.com/jquery-3.4.1.slim.min.js"
integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"
></script>
<script
src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"
integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6"
crossorigin="anonymous"
></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/dropdown.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/components/transition.min.js"></script>
<script src="script1.js" type="text/javascript"></script>
<script src="script2.js" type="text/javascript"></script>
<script src="script3.js" type="text/javascript"></script>
<script src="script4.js" type="text/javascript"></script>
</body>
</html>