-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
80 lines (67 loc) · 3.16 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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="assets/img/favicon.png">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js"
integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI="
crossorigin="anonymous"></script>
<style type="text/css">
.g-sleep { color: #11A9ED }
.w-green { color: #1BF103 }
.g-heart { color: #D12138 }
.g-orange { color: #EA8708 }
.g-grey { color: #696969 }
.band-image { width: 24px; }
</style>
<script type="text/javascript">
function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min) + min); //The maximum is exclusive and the minimum is inclusive
}
const recovery = getRandomInt(80, 100)
const sleep_hrs = getRandomInt(7,9)
const sleep_mins = getRandomInt(0, 59)
const rhr = getRandomInt(40, 45)
const hrv = getRandomInt(90, 140)
const images = ['assets/img/yoga-silhouette.png', 'assets/img/yoga-silhouette-2.png']
$(function() {
$('.recovery-rating').text(recovery + '%')
$('.sleep-hrs').text(sleep_hrs + 'h ' + sleep_mins + 'mins')
$('.rhr-bpm').text(rhr + 'bpm')
$('.hrv-txt').text('HRV ' + hrv + 'ms')
$('.recovery-image').attr('src', images[getRandomInt(0, images.length)])
});
</script>
<title>Great recovery shouldn't be hard to get</title>
</head>
<body>
<div><span class="badge alert-warning"><img src="assets/img/heartrate.png" class="band-image" />Fitness band coming soon!</span></div>
<div class="px-4 pt-5 my-5 text-center">
<h1 class="display-4 fw-bold g-grey">Recovery: <span class="recovery-rating w-green">81%</span></h1>
<div class="col-lg-6 mx-auto">
<p class="lead mb-4">
<span class="sleep-hrs g-sleep">8h 13min</span> of sleep last night contributed to an amazing recovery today. Your resting heart rate is <span class="rhr-bpm g-heart">42bpm</span>, <span class="hrv-txt g-orange">HRV 50ms</span>, and you're at your freshest this week. Now that you have the energy to do great things, go do it!
</p>
</div>
<div class="overflow-hidden" style="max-height: 50vh;">
<div class="container px-5">
<img src="assets/img/yoga-silhouette.png" class="recovery-image img-fluid rounded-3 mb-4" width="200" height="200" loading="lazy" />
</div>
</div>
</div>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9X4LCWQYZJ"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-9X4LCWQYZJ');
</script>
</body>
</html>