-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
285 lines (236 loc) · 9.91 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
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Accueil</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="style/navbar.css">
<link rel="stylesheet" href="style/style-home.css">
<link rel="stylesheet" href="/style/custom-cursor.css">
<script src="js/index-lang.js"></script>
</head>
<style>
</style>
<body>
<div class="cursor"></div>
<div class="cursor2"></div>
<div class="black-background">
<section>
<div class="parallax">
<div class="background-layer" data-speed="5"></div>
<img src="media/Forestpt1.png" class="layer" id="plain" data-speed="0">
<img src="media/Forestpt2.png" class="layer" id="sky" data-speed="2">
<a href="./index/download.html"><img src="media/logo_v0.png" class="logo-rotate" id="logo" alt="Logo"></a>
</div>
</section>
</div>
<header>
<div class="logo-bg">
<div class="logo-container">
<a href="index/download.html"><img src="media/iboren.png" id="ibo" alt="iboren"></a>
</div>
</div>
<div class="language-switcher">
<button id="lang-en" style="display: none;">English</button>
<button id="lang-fr" class="active">Français</button>
</div>
<nav>
<ul>
<li><a href="index.html" class ="active a-nav">Home</a></li>
<li><a href="index/download.html" class="a-nav" id="download-nav">Download</a></li>
<li><a href="index/about.html" class="a-nav">About</a></li>
<li><a href="index/leaderboard.html" class="a-nav">Ranking</a></li>
</ul>
</nav>
</header>
<div class="sec">
<div class="translucent-background">
<div class="wrapper">
<div class="text-box">
<h3>Welcome to Treashunt</h3>
</div>
</div>
</div>
<div class="video-container">
<div class="text-left">
<p>T<br>R<br>E<br>A<br>S<br>H<br>U<br>N<br>T</p>
</div>
<div class="video-frame">
<div id="player">
</div>
</div>
<div class="text-right">
<p>T<br>R<br>A<br>I<br>L<br>E<br>R</p>
</div>
</div>
<div class="animated-title" style="margin-top: 50%;">
<h1>Set off on an adventure !</h1>
</div>
<div class="background-Picture">
<div class="picture-treashunt">
<div class="grid-item">
<img src="media/forestchap1.png" alt="Forest">
<div class="text-overlay">
<h3>Adventure</h3>
</div>
</div>
<div class="grid-item">
<img src="media/beach.png" alt="Beach">
<div class="text-overlay">
<h3>Emotional</h3>
</div>
</div>
<div class="grid-item large">
<img src="media/trader.png" alt="Trader">
<div class="text-overlay">
<h3>History</h3>
</div>
</div>
</div>
</div>
</div>
<div class="Story-content">
<div class="story-background">
<div class="story-header">
<h2>What is TreasHunt ?</h2>
</div>
<div class="story-content">
<div class="story-text">
<p>A thrilling adventure game that transports you into a world full of mysteries and captivating challenges.
You play as a fearless young adventurer who has just arrived on a legendary island in the heart of the ocean,
known for its volatile volcano. In this epic yet dangerous journey, your goal is to reach the summit of the volcano
and claim a priceless treasure that bestows extraordinary powers upon those who are worthy. <br>
However, the path to the summit is anything but easy. You will have to navigate dense, lush forests,
climb steep mountains, and overcome formidable trials. Each stage of your journey brings you closer to the coveted treasure,
but you'll need to use your intelligence, agility, and bravery to conquer the obstacles that stand in your way.
</p>
</div>
<div class="story-image">
<img src="media/dessin.png" alt="Volcano">
</div>
</div>
</div>
</div>
<img src="media/runner.gif" class="runner" alt="LBonet">
<img src="media/bubble.png" class="bubble" alt="Bubblet">
<div class="footer-container">
<ul class="footer-links">
<li class="footer-item">
<a href="https://github.com/frost-phoenix/treashunt" target="_blank">
<img src="media/github-logo.png" id="github-logo" alt="GitHub" class="footer-icon">
GitHub
</a>
</li>
<li class="footer-item">
<a href="https://mail.google.com" target="_blank" class="contact-link">
<img src="media/contact-logo.png" id="contact-logo" alt="Contact" class="footer-icon">
<span id="contact">Contact us</span>
</a>
</li>
<li class="footer-item">
Made with <img src="media/heart-logo.png" alt="Heart" class="footer-icon"> by Iboren
</li>
</ul>
</div>
<script>
window.addEventListener('scroll', function() {
const header = document.querySelector('header');
if (window.scrollY > 100) {
document.body.classList.add('scrolled');
} else {
document.body.classList.remove('scrolled');
}
});
</script>
<script>
window.addEventListener('scroll', function() {
const layers = document.querySelectorAll('.layer, .background-layer');
layers.forEach(layer => {
const speed = parseFloat(layer.getAttribute('data-speed'));
const yPos = -(window.pageYOffset * speed / 2);
layer.style.transform = `translateY(${yPos}px)`;
});
const scrollY = window.scrollY;
const sky = document.getElementById('sky');
if (sky) {
sky.style.top = `${scrollY * 1.6}px`;
}
if (logo) {
const scrollY = window.scrollY || window.pageYOffset;
const opacity = scrollY > 550 ? 0 : 1;
const initialTopPercent = 18;
const initialTopPixels = (initialTopPercent / 100) * window.innerHeight;
const newTopPixels = initialTopPixels - scrollY *1.5 ;
logo.style.top = `${newTopPixels}px`;
logo.style.opacity = opacity;
}
});
window.addEventListener('scroll', function() {
const textBox = document.querySelector('.text-box');
const textBoxPosition = textBox.getBoundingClientRect().top;
const screenPosition = window.innerHeight / 1.3;
if (textBoxPosition < screenPosition) {
textBox.classList.add('reveal');
textBox.classList.add('visible');
}
});
window.addEventListener('scroll', function() {
const animatedTitle = document.querySelector('.animated-title');
const titlePosition = animatedTitle.getBoundingClientRect().top;
const screenPosition = window.innerHeight / 1.3;
const trad = document.querySelector('language-switcher');
if (titlePosition < screenPosition) {
animatedTitle.classList.add('visible');
}
});
</script>
<script>
var tag = document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";
var firstScriptTag = document.getElementsByTagName('script')[0];
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
var player;
function onYouTubeIframeAPIReady() {
player = new YT.Player('player', {
height: '390',
width: '640',
videoId: 'hZgV6ss62sE',
events: {
'onReady': onPlayerReady,
'onStateChange': onPlayerStateChange
}
});
}
function onPlayerReady(event) {
event.target.playVideo();
}
var done = false;
function onPlayerStateChange(event) {
if (event.data == YT.PlayerState.PLAYING && !done) {
done = true;
}
}
function stopVideo() {
player.stopVideo();
}
document.addEventListener("DOMContentLoaded", function() {
const btnEnglish = document.getElementById('lang-en');
const btnFrench = document.getElementById('lang-fr');
btnEnglish.addEventListener('click', function() {
btnEnglish.style.display = 'none';
btnFrench.style.display = 'inline-block';
btnEnglish.classList.remove('active');
btnFrench.classList.add('active');
});
btnFrench.addEventListener('click', function() {
btnFrench.style.display = 'none';
btnEnglish.style.display = 'inline-block';
btnFrench.classList.remove('active');
btnEnglish.classList.add('active');
});
});
</script>
</body>
</html>