-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
92 lines (85 loc) · 3.4 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Classic snake game built with vanilla Javascript">
<meta name="author" content="Eli Almario">
<link rel="stylesheet" href="./css/styles.css">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./favicon-16x16.png">
<link rel="manifest" href="./site.webmanifest">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300&family=Press+Start+2P&display=swap" rel="stylesheet">
<title>Classic Snake Game</title>
<script src="./js/game.js" defer type="module"></script>
<script src="https://kit.fontawesome.com/f62d360eff.js" crossorigin="anonymous"></script>
</head>
<body id="mainContainer">
<div class="overlay display-none" id="gameOverModal">
<div class="game-over-modal">
<h2>Game Over!</h2>
<p class="reminder">Do you want to try again?</p>
<button id="yes" class="button yes">Yes!</button>
<button id="no" class="button outline">Nah, I'm good.</button>
</div>
</div>
<div class="overlay" id="overlayModal">
<div class="overlay-modal" id="titleModal">
<h1>Classic Snake</h1>
<p class="reminder">Don't forget to press the arrow buttons upon clicking the play button!</p>
<button class="play button" id="play">Play</button>
<button class="instructions button" id="instructions">Instructions</button>
</div>
<div class="inst-modal display-none" id="instModal">
<h2>Instructions</h2>
<!-- <p class="reminder info">Swipe gestures supported for mobile</p> -->
<p class="controls">Controls:</p>
<ul>
<li>Up - W</li>
<li>Left - A</li>
<li>Right - D</li>
<li>Down - S</li>
</ul>
<p class="reminder">Don't forget to press the arrow buttons upon clicking the play button!</p>
<div class="btn-container">
<button id="back" class="button">Back</button>
</div>
</div>
</div>
<main class="container">
<div class="scores-container">
<p class="score-container">Score:<span id="score"></span></p>
<p class="high-score-container">Hi-Score:<span id="highScore"></span>
</div>
<div id="gameBoard" class="game-board"></div>
<div class="mobile-container" id="mobileContainer">
<button class="button outline switch" id="switch">
Switch to <span id="position">left</span>
</button>
<div class="mobile-controls">
<div class="row">
<button class="arrow-up">
<i class="fas fa-arrow-circle-up" id="arrowUp"></i>
</button>
</div>
<div class="row">
<button class="arrow-left">
<i class="fas fa-arrow-circle-left" id="arrowLeft"></i>
</button>
<button class="arrow-right">
<i class="fas fa-arrow-circle-right" id="arrowRight"></i>
</button>
</div>
<div class="row">
<button class="arrow-down">
<i class="fas fa-arrow-circle-down" id="arrowDown"></i>
</button>
</div>
</div>
</div>
</main>
</body>
</html>