-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
100 lines (85 loc) · 2.56 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
98
99
100
<!DOCTYPE html>
<html>
<head>
<title>Harry Potter Puzzle</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Henny+Penny&display=swap');
body {
text-align: center;
margin-top: 50px;
font-family: 'Henny Penny', cursive;
background-color: #f0e6d6;
color: #1a001a;
}
h2 {
color: #460a46;
}
button {
background-color: #460a46;
color: white;
border: none;
padding: 10px 15px;
border-radius: 5px;
cursor: pointer;
font-size: 20px;
margin: 5px;
}
button:hover {
background-color: #5a0d5a;
}
#infoText {
color: red;
margin-top: 20px;
}
.container {
background-image: url('harry-potter-background.jpg');
background-size: cover;
padding: 20px;
}
@keyframes flicker {
0%,
100% {
opacity: 1;
}
50% {
opacity: 0;
}
}
.flicker {
animation: flicker 0.5s linear 1;
}
</style>
</head>
<body>
<div class="container">
<h2>What is the answer to the final puzzle?</h2>
<!-- Buttons for numbers 1 to 9 -->
<button onclick="checkNumber(1)">1</button>
<button onclick="checkNumber(2)">2</button>
<button onclick="checkNumber(3)">3</button>
<button onclick="checkNumber(4)">4</button>
<button onclick="checkNumber(5)">5</button>
<button onclick="checkNumber(6)">6</button>
<button onclick="checkNumber(7)">7</button>
<button onclick="checkNumber(8)">8</button>
<button onclick="checkNumber(9)">9</button>
<div id="infoText"></div>
</div>
<script>
function checkNumber(number) {
var infoText = document.getElementById("infoText");
if (number === 9) {
window.open("https://youtu.be/3GwjfUFyY6M?feature=shared&t=17", "_blank");
} else if (infoText.textContent == "") {
infoText.textContent = "Alas! Incorrect, muggle.";
} else {
infoText.textContent = "Alas! Incorrect, muggle.";
infoText.classList.add('flicker');
setTimeout(function () {
infoText.classList.remove('flicker');
}, 500);
}
}
</script>
</body>
</html>