-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathindex.html
More file actions
81 lines (67 loc) · 2.71 KB
/
index.html
File metadata and controls
81 lines (67 loc) · 2.71 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Dodge the Falling Objects</title>
<link rel="stylesheet" href="./CSS/index.css" />
</head>
<body>
<main class="page">
<section class="game-shell">
<!-- HEADER -->
<header class="game-header">
<h1 class="game-title">Dodge the Falling Objects</h1>
<!-- 🔊 SOUND TOGGLE BUTTON (UI ONLY) -->
<div class="game-stats">
<button id="pause-button" class="sound-toggle-header" aria-label="Toggle sound">
<img id="pause-icon" src="./assets/pause.png" alt="Pause" />
</button>
<button id="sound-toggle" class="sound-toggle-header" aria-label="Toggle sound" title="Toggle sound">
<img id="sound-icon" src="./assets/Sound_On.png" alt="Sound On" />
</button>
<div class="stat">
<span class="stat-label">Time</span>
<span id="current-time" class="stat-value">0.00s</span>
</div>
<div class="stat">
<span class="stat-label">Best</span>
<span id="best-time" class="stat-value">0.00s</span>
</div>
</div>
</header>
<!-- GAME AREA -->
<div class="game-wrapper">
<div id="game-area" class="game-area">
<div id="player" class="player"></div>
<div id="overlay" class="overlay overlay--hidden" aria-hidden="true">
<div class="overlay-content">
<h2 class="overlay-title" id="overlay-title">Game Over</h2>
<p class="overlay-text">
Survived for <span id="final-time">0.00s</span>
</p>
<button id="restart-button" class="btn-primary" type="button">
Restart
</button>
</div>
</div>
</div>
</div>
<!-- FOOTER -->
<footer class="game-footer">
<p class="hint">
Controls: <span class="hint-key">←</span>
<span class="hint-key">→</span> or <span class="hint-key">A</span>
<span class="hint-key">D</span> to move. Press
<span class="hint-key">Space</span> to start.
<span class="hint-key">P</span> to pause.
On mobile: <span class="hint-key">Swipe</span> left/right to move,
<span class="hint-key">Tap</span> to start.
</p>
<button id="ui-restart-button" class="btn-restart" type="button">Restart Game</button>
</footer>
</section>
</main>
<script src="./JS/index.js"></script>
</body>
</html>