forked from patrickwroach/nice-nice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
62 lines (43 loc) · 1.61 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
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="main-styles.css">
<title>Paaaaacccckkks</title>
</head>
<body>
<div class="content-container highlight-color" id="nice-landing-wrapper">
<div class="content">
<div class="section">
<div class="copy-container">
<div id="nice">
</div>
</div>
</div>
<div id="bottom-anchor"></div>
</div>
</div>
<script>
window.setInterval(
function () {
var node = document.createElement("P");
var textnode = document.createTextNode("packs");
node.appendChild(textnode);
document.getElementById("nice").appendChild(node);
var niceServed = document.getElementById("nice").querySelectorAll('P').length;
var fontSizer = (15 - (niceServed / 1.25) + "vw")
var smallestFontSize = ("6vw")
var x = document.getElementById("nice").querySelectorAll('P');
var i;
if (niceServed < 11) {
for (i = 0; i < x.length; i++) {
x[i].style.fontSize = fontSizer;
}
}
else {
for (i = 0; i < x.length; i++) {
x[i].style.fontSize = smallestFontSize;
}
}
}, 1000);
</script>
</body>