forked from broadinstitute/covid19-testing
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdaily_page_template.html
94 lines (89 loc) · 3.82 KB
/
daily_page_template.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
<!DOCTYPE html>
<html>
<head>
<title>Broad COVID-19 Test Processing Daily Report</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<meta name="description" content="Daily report on COVID-19 testing at the Broad Institute of MIT and Harvard in Cambridge, MA, USA.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<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=Lato:wght@300;400;700&display=swap" rel="stylesheet">
<meta http-equiv="refresh" content="600">
<style type="text/css">
body {
font-family: 'Lato', sans-serif;
}
h1 {
color: #006DB6;
font-size: 6rem;
font-weight: 700;
}
h2 {
color: #006DB6;
font-size: 5rem;
font-weight: 700;
}
h3 {
font-size: 1.5rem;
font-weight: 400;
}
@media (min-height: 1944px) {
h1 {
color: #006DB6;
font-size: 12rem;
font-weight: 700;
}
h2 {
color: #006DB6;
font-size: 7.5rem;
font-weight: 700;
}
h3 {
font-size: 3rem;
font-weight: 400;
}
.spacer {
height: 10rem;
}
}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body class="d-flex flex-column min-vh-100">
<header><div id="banner" style="background-color:#00AFD7; height:15px;"></div></header>
<content class="justify-content-center" style="margin: 3em;">
<div class="spacer"></div>
<h3>Updated <span id="today">2020, ##, ##</span></h3>
<h2>COVID-19 Test Processing <br/> Daily Report</h2>
<div class="row" style="margin: 5rem 0rem 0 0rem;">
<div class="col-lg-5 col-xl-12">
<div class="spacer"></div>
<h3>TESTS RUN YESTERDAY</h3>
<div style="white-space: nowrap">
<h1 id="yesterday-total">yesterday</h1>
</div>
<div class="spacer"></div>
</div><!-- col -->
<div class="col-lg-6 col-xl-12">
<h3>TOTAL TESTS SINCE MARCH 25, 2020</h3>
<div style="white-space: nowrap">
<h1>{{TOTAL_COMPLETED}}</h1>
</div>
</div><!-- col -->
</div><!-- row -->
</content>
<footer class="mt-auto text-lg-right" style="background-color:#00afd7; padding: 1em;">
<img src="/static/BroadLogo_White.png" width="200" />
</footer>
</body>
</html>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script>
let data = {{DATA|tojson}};
let today = new Date().toLocaleDateString('en-US');
let currentTime = new Date(today);
// console.log(data); // dev purpose only
$('#today').text(today);
let yesterday = data[data.length-2];
let yesterdayTotal = yesterday.negative + yesterday.positive + yesterday.inconclusive;
$('#yesterday-total').text(yesterdayTotal.toLocaleString());
</script>