-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnine.html
158 lines (142 loc) · 4.84 KB
/
nine.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Clue #9</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
margin: 50px;
}
.button-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
}
.button-group {
width: 200px;
text-align: left;
}
button {
width: 100%;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
border: 1px solid #333;
background-color: #f0f0f0;
transition: background-color 0.3s;
}
button:hover {
background-color: #ddd;
}
.button-red {
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
border: 2px solid #d32f2f;
background-color: #f44336;
color: white;
transition: background-color 0.3s ease;
}
.button-red:hover {
background-color: #d32f2f;
}
.hidden-text, .hidden-image {
display: none;
margin-top: 10px;
font-size: 16px;
}
img {
width: 100%;
max-width: 300px;
height: auto;
border: 1px solid #ddd;
border-radius: 5px;
}
.fade-in {
opacity: 0;
display: none;
transition: opacity 1s ease-in-out;
}
.fade-in.visible {
display: block;
opacity: 1;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<h1>Clue #9</h1>
<!-- Current Clue Text -->
<div id="currentClue" style="font-size: 18px; margin-bottom: 20px;">I help you plan your time to play, behind me is where your clue will stay. </div>
<div class="button-container">
<!-- First Button: Reveals Text and Shows Second Button -->
<div class="button-group" id="firstButtonGroup">
<button onclick="revealTextAndSecondButton('text1', 'secondButtonGroup')">Give me a hint</button>
<div id="text1" class="hidden-text">In the lounge, where rooms are booked, look behind me and take a look!</div>
</div>
<!-- Second Button: Reveals Image, Text, and Shows Third Button -->
<div class="button-group hidden" id="secondButtonGroup">
<button onclick="revealImageTextAndThirdButton('image1', 'text2', 'thirdButtonGroup')">Reveal the answer</button>
<div id="text2" class="hidden-text">On the back of the whiteboard in the lounge, under the paper with the combos listed on it.</div>
<div id="image1" class="hidden-image">
<img src="nine.jpg" alt="Placeholder Image">
</div>
</div>
<!-- Third Button: Initially Hidden -->
<div class="button-group hidden fade-in" id="thirdButtonGroup">
<button class="button-red" onclick="askConfirmation()">Skip to next clue</button>
</div>
</div>
<!-- Bottom Text: Initially Hidden -->
<div class="fade-in hidden" id="finalText">
<br/>Are you extra stuck, and none of the hints are helping you?<br/>
You can contact this secret email address (but it might take a while to respond!):<br/>
<a href="mailto:[email protected]">[email protected]</a>
</div>
<script>
// First button: Reveals text and makes second button visible
function revealTextAndSecondButton(textId, secondButtonGroupId) {
const textElement = document.getElementById(textId);
const secondButtonGroup = document.getElementById(secondButtonGroupId);
// Reveal the hint text
textElement.style.display = 'block';
// Reveal the second button group
secondButtonGroup.classList.remove('hidden');
secondButtonGroup.classList.add('fade-in', 'visible');
}
// Second button: Reveals image, text, third button, and bottom text
function revealImageTextAndThirdButton(imageId, textId, thirdButtonGroupId) {
const imageElement = document.getElementById(imageId);
const textElement = document.getElementById(textId);
const thirdButtonGroup = document.getElementById(thirdButtonGroupId);
const finalText = document.getElementById('finalText');
// Reveal the image and text
imageElement.style.display = 'block';
textElement.style.display = 'block';
// Reveal the third button group
thirdButtonGroup.classList.remove('hidden');
thirdButtonGroup.classList.add('fade-in', 'visible');
// Reveal the bottom text
finalText.classList.remove('hidden');
finalText.classList.add('fade-in', 'visible');
}
// Third button: Ask for confirmation
function askConfirmation() {
const confirmed = confirm("Are you sure? This is the last clue. The answer will reveal the location of the prize.");
if (confirmed) {
goToLink('https://poultrypants.github.io/ScavengerHunt/ten');
}
}
function goToLink(url) {
// Redirect to the provided URL
window.location.href = url;
}
</script>
</body>
</html>