-
Notifications
You must be signed in to change notification settings - Fork 0
/
inaugration.html
64 lines (60 loc) · 1.8 KB
/
inaugration.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Err404 4.0 | Inaugration</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<style>
#logo {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
#launch-btn {
position: absolute;
top: 80%;
left: 50%;
transform: translate(-50%, -50%);
}
audio {
visibility: hidden;
}
</style>
</head>
<body>
<audio src="./assets/inaguration sound.mp3" id="audio"></audio>
<img id="logo" class="title-img" src="./assets/err404 4.0 dark.png" alt="LOGO" width="500px"/>
<button id="launch-btn" class="btn-lg btn-outline-dark" onclick="confetti()">LAUNCH</button>
<script src="./party.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0" crossorigin="anonymous"></script>
<script>
let intervalID = 0;
var count = 3;
function playConfetti() {
party.screen({
count: 500 * (window.innerWidth / 1980),
countVariation: 0.5,
angleSpan: 0,
yVelocity: -100,
yVelocityVariation: 2,
rotationVelocityLimit: 6,
scaleVariation: 0.8
});
count--;
if (count == 0) {
clearInterval(intervalID);
window.location = "./index.html";
}
}
var audio = document.getElementById("audio");
function confetti() {
audio.play();
playConfetti();
intervalID = setInterval(playConfetti, 3000);
}
</script>
</body>
</html>