-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
97 lines (86 loc) · 3.31 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
90
91
92
93
94
95
96
97
<html>
<head>
<title>dani bovee.</title>
<meta name="description" content="dani bovee.">
</head>
<style>
body {
margin: 0;
}
.background {
width: 100%;
height: 100%;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none;
overflow: hidden;
background: #fff0cd;
padding: 0;
font-size: 32px;
}
.dani {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
position: fixed;
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Old versions of Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}
</style>
<body>
<p id="dani" class="dani"></p>
<div id="background" class="background"></div>
</body>
<script>
var danibovee = "dani bovee.";
var background = "d a n i b o v e e "
var dani = document.getElementById("dani");
var backgroundNode = document.getElementById("background");
backgroundNode.textContent = "";
setInterval(function(){
backgroundNode.textContent = "";
for(let x = 300; x > 0; x--) {
background.split('').forEach(x => {
var r = Math.round((Math.random() * 254));
var g = Math.round((Math.random() * 254));
var b = Math.round((Math.random() * 254));
var newSpan = document.createElement('span');
newSpan.textContent = x;
newSpan.style.color = `rgba(${r},${g},${b},0.3)`;
backgroundNode.appendChild(newSpan);
})
}
}, 1000)
danibovee.split('').forEach(x => {
var newSpan = document.createElement('span');
newSpan.textContent = x;
dani.appendChild(newSpan);
})
document.body.addEventListener("click", function() {
dani.textContent = "";
danibovee.split('').forEach(x => {
var r = Math.round((Math.random() * 254));
var g = Math.round((Math.random() * 254));
var b = Math.round((Math.random() * 254));
var newSpan = document.createElement('span');
newSpan.textContent = x;
newSpan.style.fontSize = getRandomArbitrary(15, 200);
newSpan.style.color = `rgb(${r},${g},${b})`;
dani.appendChild(newSpan);
})
})
function getRandomArbitrary(min, max) {
return Math.round(Math.random() * (max - min) + min);
}
</script>
</html>