-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
89 lines (80 loc) · 2.42 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Chaos game</title>
<style>
:root {
--interval: 250ms;
--background-color: #000000;
--live-tracker-color: #005e21;
--tracker-color: #ff9d15;
--tracker-size: 8px;
--number-of-trackers: 20;
}
body {
margin: 0;
padding: 0;
background-color: var(--background-color);
overflow: hidden;
font-family: sans-serif;
color: var(--tracker-color);
}
a, a:hover, a:active, a:visited {
color: var(--tracker-color);
text-decoration: none;
border-bottom: 1px solid var(--tracker-color);
}
.container {
position: absolute;
width: 800px;
height: 600px;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
#canvas, #tracker-layer {
position: absolute;
width: 100%;
height: 100%;
}
.tracker {
position: absolute;
width: var(--tracker-size);
height: var(--tracker-size);
border-radius: calc(var(--tracker-size) / 2);
background-color: var(--live-tracker-color);
transition: var(--interval) ease-in-out;
}
.title {
position: absolute;
left: 20px;
top: 20px;
font-size: 3em;
}
.footer {
position: absolute;
right: 20px;
bottom: 20px;
font-size: 1.2em;
}
</style>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-101273659-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<div class="title">The Chaos Game</div>
<div class="container">
<canvas id="canvas"></canvas>
<div id="tracker-layer"></div>
</div>
<div class="footer">by <a href="https://luciopaiva.com">Lucio Paiva</a> 2018</div>
<script src="index.js"></script>
</body>
</html>