-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
195 lines (177 loc) · 6.82 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
<!DOCTYPE html>
<html lang="en">
<head>
<!--Link Fonts-->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&family=Mouse+Memoirs&display=swap"
rel="stylesheet"
/>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./assets/images/favicon-32x32.png"
/>
<link rel="stylesheet" href="./styles.css" />
<script type="module" src="./game.js"></script>
<title>Hangman JS</title>
</head>
<body>
<header>
<div class="menu-header display-none">
<button title="back" class="circle-btn back-btn">
<img alt="back" src="./assets/images/icon-back.svg" />
</button>
<h1 class="menu-header-title">How to Play</h1>
</div>
<div class="game-screen-header display-none">
<div class="flex-row">
<button title="pause" class="circle-btn pause-menu-btn">
<img alt="pause" src="./assets/images/icon-menu.svg" />
</button>
<h1 class="category-header"></h1>
</div>
<div class="flex-row">
<div class="progress-bar-container">
<div class="progress-bar"></div>
</div>
<img alt="heart" src="./assets/images/icon-heart.svg" />
</div>
</div>
</header>
<main>
<!-- Categories -->
<section class="category-container display-none">
<button class="category-btn btn-primary" value="Movies">
<h3>Movies</h3>
</button>
<button class="category-btn btn-primary" value="TV Shows">
<h3>Tv Shows</h3>
</button>
<button class="category-btn btn-primary" value="Countries">
<h3>Countries</h3>
</button>
<button class="category-btn btn-primary" value="Capital Cities">
<h3>Capital Cities</h3>
</button>
<button class="category-btn btn-primary" value="Animals">
<h3>Animals</h3>
</button>
<button class="category-btn btn-primary" value="Sports">
<h3>Sports</h3>
</button>
</section>
<!-- Home -->
<section class="menu-bg home-screen-container">
<div class="home-screen-menu menu">
<img alt="home-logo" src="./assets/images/logo.svg" />
<button title="play" class="circle-btn big-circle play-btn">
<img alt="play" src="./assets/images/icon-play.svg" />
</button>
<button class="how-to-btn btn-primary">
<h4>How to play</h4>
</button>
</div>
</section>
<!-- Category menu -->
<section class="how-to-container display-none">
<div class="instruction">
<h2>01</h2>
<h3>Choose a category</h3>
<p>
First, choose a word category, like animals or movies. The computer
then randomly selects a secret word from that topic and shows you
blanks for each letter of the word.
</p>
</div>
<div class="instruction">
<h2>02</h2>
<h3>Guess letters</h3>
<p>
Take turns guessing letters. The computer fills in the relevant
blank spaces if your guess is correct. If it's wrong, you lose some
health, which empties after eight incorrect guesses.
</p>
</div>
<div class="instruction">
<h2>03</h2>
<h3>Win or lose</h3>
<p>
You win by guessing all the letters in the word before your health
runs out. If the health bar empties before you guess the word, you
lose.
</p>
</div>
</section>
<!-- Main Game -->
<section class="game-screen display-none">
<div class="hidden-word-container"></div>
<div class="keyboard-container">
<div class="keyboard-row">
<button class="key-btn" value="a"><h3>a</h3></button>
<button class="key-btn" value="b"><h3>b</h3></button>
<button class="key-btn" value="c"><h3>c</h3></button>
<button class="key-btn" value="d"><h3>d</h3></button>
<button class="key-btn" value="e"><h3>e</h3></button>
<button class="key-btn" value="f"><h3>f</h3></button>
<button class="key-btn" value="g"><h3>g</h3></button>
<button class="key-btn" value="h"><h3>h</h3></button>
<button class="key-btn" value="i"><h3>i</h3></button>
</div>
<div class="keyboard-row">
<button class="key-btn" value="j"><h3>j</h3></button>
<button class="key-btn" value="k"><h3>k</h3></button>
<button class="key-btn" value="l"><h3>l</h3></button>
<button class="key-btn" value="m"><h3>m</h3></button>
<button class="key-btn" value="n"><h3>n</h3></button>
<button class="key-btn" value="o"><h3>o</h3></button>
<button class="key-btn" value="p"><h3>p</h3></button>
<button class="key-btn" value="q"><h3>q</h3></button>
<button class="key-btn" value="r"><h3>r</h3></button>
</div>
<div class="keyboard-row">
<button class="key-btn" value="s"><h3>s</h3></button>
<button class="key-btn" value="t"><h3>t</h3></button>
<button class="key-btn" value="u"><h3>u</h3></button>
<button class="key-btn" value="v"><h3>v</h3></button>
<button class="key-btn" value="w"><h3>w</h3></button>
<button class="key-btn" value="x"><h3>x</h3></button>
<button class="key-btn" value="y"><h3>y</h3></button>
<button class="key-btn" value="z"><h3>z</h3></button>
<button title="space" class="key-btn hidden" value=" "></button>
</div>
</div>
</section>
<!-- Menu -->
<section class="pause-menu-container game-menu overlay display-none">
<div class="menu-bg">
<div class="game-menu-container menu">
<h1 class="game-menu-heading pause-menu-heading">Paused</h1>
<button
class="game-menu-btn btn-primary continue-game-btn"
value="continue"
>
<h4>Continue</h4>
</button>
<button
class="game-menu-btn btn-primary new-category-btn"
value="new"
>
<h4>New category</h4>
</button>
<button
class="game-menu-btn btn-primary btn-secondary quit-game-btn"
value="quit"
>
<h4>Quit game</h4>
</button>
</div>
</div>
</section>
</main>
</body>
</html>