-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
44 lines (44 loc) · 1.84 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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Matching Marms - Start</title>
<link rel="stylesheet" href="style.css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400&display=swap" rel="stylesheet">
<script>
async function startGame() {
PlayAudioFile('sounds/zapsplat_multimedia_game_sound_retro_basic_synth_buzz_positive_musical_007_64984.mp3');
document.getElementById('buttonStart').id = 'buttonStarting';
document.body.style = 'pointer-events: none'
await sleep(1500);
window.location.replace("main.html");
}
function PlayAudioFile(src) {
var sound = document.createElement('audio');
sound.src = src;
sound.type = 'audio/mpeg';
document.body.appendChild(sound);
sound.load();
sound.play().catch(() => void 0);
}
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
</script>
</head>
<body>
<div class="title-container">
<div class="title-board">
<h1 id="title">PARCEL PETS</h3>
<h2 id="title-text">The postal chaps need to match up their friends in rows/columns of 3, 4 or 5!</h1>
<h2 id="title-text">They need to be quick though, and matching Fig or Marm will give you some extra time!</h1>
<h2 id="title-text">Score big and see what Fig and Marm deserve as a treat</h1>
</div>
<div class="button-container">
<img style="padding-right: 10px;" src="images/fig.png" alt="Picture of figgy pudding">
<a id="buttonStart" onclick="startGame()">Start!</a>
<img style="padding-left: 10px;" src="images/marm.png" alt="Picture of marmalade">
</div>
</div>
</body>
</html>