-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfront-page.php
More file actions
106 lines (102 loc) · 3.63 KB
/
front-page.php
File metadata and controls
106 lines (102 loc) · 3.63 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
<?php
get_header();
?>
<!-- Body -->
<div class="panel p-2">
<div class="background">
<img
src="<?php echo get_template_directory_uri() . '/assets/images/hand-washing.jpg' ?>"
>
</div>
<div class="front p-2">
<div class="title mx-md-2 mx-0 d-flex justify-content-end flex-column">
<div>
<p class="text-white text-right mb-0 head ml-auto">Sua central de atualizações sobre o Coronavirus</p>
</div>
<p class="text-white text-right by">Por Auge Tecnologia</p>
</div>
</div>
</div>
<div id="brazil-last-data" class="container">
<?php $brazil_data = cvupdates_data_brazil(); ?>
<h1 class="text-center">Últimos números no Brasil</h1>
<div class="card bg-light text-dark text-center p-3 mb-1">
<blockquote class="blockquote mb-1">
<div class="text-center text-dark mb-1">
<span class="h3">Números Gerais</span>
</div>
<div class="d-flex justify-content-between text-success">
<span>Recuperados</span>
<span><?php echo $brazil_data['recovered'] ?></span>
</div>
<div class="d-flex justify-content-between text-warning">
<span>Casos</span>
<span><?php echo $brazil_data['cases'] ?></span>
</div>
<div class="d-flex justify-content-between text-danger">
<span>Mortes</span>
<span><?php echo $brazil_data['deaths'] ?></span>
</div>
</blockquote>
<blockquote class="blockquote mb-0">
<div class="text-center text-dark mb-1">
<span class="h3">Hoje</span>
</div>
<div class="d-flex justify-content-between text-warning">
<span>Casos</span>
<span><?php echo $brazil_data['todayCases'] ?></span>
</div>
<div class="d-flex justify-content-between text-danger">
<span>Mortes</span>
<span><?php echo $brazil_data['todayDeaths'] ?></span>
</div>
</blockquote>
</div>
</div>
<div id="brazil-evolution-chart" class="container card bg-light mx-1">
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.js"></script>
<style src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.9.3/Chart.min.css"></style>
<canvas id="lineChart" class="w-75"></canvas>
<script>
//line
<?php $chart = cvupdates_progression_chart() ?>
var ctxL = document.getElementById("lineChart").getContext('2d');
var myLineChart = new Chart(ctxL, {
type: 'line',
data: {
labels: <?php echo json_encode($chart['labels']) ?>,
datasets: [
{
label: "Casos",
data: <?php echo json_encode($chart['data']['cases'], JSON_HEX_TAG) ?>,
backgroundColor: [
'rgba(105, 0, 132, .2)',
],
borderColor: [
'rgba(200, 99, 132, .7)',
],
borderWidth: 2
},
{
label: "Mortes",
data: <?php echo json_encode($chart['data']['deaths']) ?>,
backgroundColor: [
'rgba(0, 137, 132, .2)',
],
borderColor: [
'rgba(0, 10, 130, .7)',
],
borderWidth: 2
}
]
},
options: {
responsive: true
}
});
</script>
</div>
<!-- /Body -->
<?php
get_footer();
?>