-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
80 lines (79 loc) · 2.15 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>
<head>
<meta charset="utf-8">
<title>.beats by @pkqk</title>
<style>
body {
background: #e2001a;
margin: 0;
padding: 0;
}
#bmt {
color: white;
font-family: "Helvetica";
text-shadow: 3px 3px 3px black;
display: flex;
height: 100vh;
margin: 0;
padding: 0;
justify-content: center;
align-items: center;
}
h1 {
text-align: left;
width: 85vw;
font-size: 18vw;
}
em {
font-style: normal;
}
footer {
color: white;
position: absolute;
bottom: 0;
right: 0;
padding: 1em;
font-family: "Helvetica";
}
footer a {
color: white;
text-decoration: none;
}
footer a:hover {
border-bottom: 1px solid white;
}
</style>
</head>
<body>
<main id="bmt">
<h1><em>@</em><time id="beats">0</time></h1>
</main>
<footer>
<a href="https://en.wikipedia.org/wiki/Swatch_Internet_Time">beats</a>
by
<a href="http://pkqk.net">@pkqk</a>
</footer>
<script>
var beats = document.getElementById("beats");
var beater = function() {
var time = new Date();
var bmtHour = ((time.getUTCHours() + 1) % 24) * 3600;
var bmtMin = time.getUTCMinutes() * 60;
var bmtSec = time.getUTCSeconds();
var bmtUSec = time.getUTCMilliseconds() / 1000.0;
var beat = (bmtSec + bmtMin + bmtHour + bmtUSec) / 86.4;
beats.innerHTML = ("000" + beat.toFixed(3)).slice(-7);
window.requestAnimationFrame(beater);
};
window.requestAnimationFrame(beater);
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-3429132-5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-3429132-5');
</script>
</body>
</html>