-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
98 lines (92 loc) · 3.32 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Last the Night</title>
<script src="dist/bundle.js"></script>
<link rel="stylesheet" href="dist/assets/css/master.css" media="screen" title="no title" charset="utf-8">
<script src="https://use.fontawesome.com/releases/v5.15.2/js/all.js" data-auto-a11y="true"></script>
<link rel="shortcut icon" type="image/x-icon" href="dist/assets/docs/favicon.ico">
<meta property="og:title" content="Last the Night" />
<meta property="og:image" content="dist/assets/docs/game-screenshot.png" />
<meta property="og:description" content="JavaScipt game where all players have to survive the dark is their light." />
<meta property="og:url" content="https://colineckert.github.io/last-the-night/" />
</head>
<body>
<script>
function toggleMusic(el) {
if (el.value === "musicOn") {
document.getElementById('piano-music').muted = false;
el.className = "fas fa-volume-up";
el.value = "musicOff"
} else {
document.getElementById('piano-music').muted = true;
el.className = "fas fa-volume-mute";
el.value = "musicOn"
}
}
</script>
<audio id="piano-music" loop autoplay="true" preload="auto">
<source src="https://good-times-surfing-game.s3-us-west-1.amazonaws.com/piano_music.mp3">
</audio>
<header>
<h1 class="game-title">Last the Night</h1>
<div class="volume-button">
<i onclick=toggleMusic(this) value="musicOn" class="fas fa-volume-up"></i>
</div>
<div class="nav-list">
<a href="https://github.com/colineckert/">
<i class="fab fa-github"></i>
</a>
<a href="https://www.linkedin.com/in/colin-eckert/">
<i class="fab fa-linkedin"></i>
</a>
<a href="https://angel.co/u/colin-eckert">
<i class="fab fa-angellist"></i>
</a>
</div>
</header>
<div class="game-area">
<!-- <progress id="battery" value="1000" max="1000"></progress> -->
<div id="splash" class="splash">
<div class="splash-text">
<h1 class="level"></h1><br><br>
<div class="dialogue">
<h2>What is this place?</h2>
<h2>I can't see beyond my <strong>light.</strong></h2>
<h2>I have to get out of here.</h2>
</div>
<div class="controls">
<h3><strong>WASD</strong> KEYS TO MOVE</h3>
<h3>CONTROL LIGHT WITH <strong>MOUSE</strong></h3>
<p>PRESS ANY KEY TO BEGIN</p>
</div>
</div>
</div>
<div id="level-splash" class="splash level-splash">
<div class="splash-text">
<h2 id="level-victory"></h2>
<h3 id="level_header"><h3>
<h3 id="level_header_2"></h3>
<p>PRESS ANY KEY TO CONTINUE</p>
</div>
</div>
<div id="win-splash" class="splash win-splash">
<div class="splash-text">
<h2>YOU'VE ESCAPED THE NIGHT!</h2>
<h3>But could you do it faster?<h3>
<p>PRESS ANY KEY TO PLAY AGAIN</p>
</div>
</div>
<div id="lose-splash" class="splash lose-splash">
<div class="splash-text">
<h2>THE NIGHT HAS TAKEN YOU</h2>
<h3>Maybe you can escape with another try<h3>
<p>PRESS ANY KEY TO PLAY AGAIN</p>
</div>
</div>
<canvas id="canvas"></canvas>
</div>
</body>
</html>