-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
247 lines (233 loc) · 10.2 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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>test game</title>
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css" media="screen,projection">
<link href="style.css" rel="stylesheet" media="screen">
<script src="/socket.io/socket.io.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/js/materialize.min.js"></script>
<script src="client.js"></script>
</head>
<body>
<div class="container">
<div id="login-element">
<div class="row">
<div class="col s10 offset-s1 m8 offset-m2 l10 offset-l1 xl8 offset-xl2 center-align">
<h1 class="teal-text">Guess The Word!</h1>
<h3 class="orange-text">Do you dare?</h3>
</div>
</div>
<div class="row">
<div class="col s8 offset-s2 m6 offset-m3 l6 offset-l3 xl4 offset-xl4 center-align">
<form id="login-form">
<div class="row">
<div class="row">
<div class="input-field col s12">
<input id="username" type="text" name="username" class="validate">
<label for="username">Username</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<input id="password" type="password" name="password" class="validate">
<label for="password">Password</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<button
class="btn waves-effect waves-light"
type="submit"
name="action"
><i class="material-icons left">input</i>Login</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<!-- start lobby element -->
<div id="lobby-element">
<div class="row">
<div class="col s4 m4 l3 xl3"> <!-- left -->
<div class="row">
<div class="col s12 m12 l12 xl12">
<div class="card grey lighten-5">
<div class="card-image waves-effect waves-block waves-light">
<img src="" class="activator" id="profile-picture" alt="">
</div>
<div class="card-content black-text">
<span class="activator card-title"><span id="profile-username">@user</span> <i class="material-icons right">more_vert</i></span>
<span class="grey-text" id="profile-ranking">Ranking: 10</span>
</div>
<div class="card-action">
<a href="#" id="logout"><i class="material-icons left">exit_to_app</i>Logout</a>
</div>
<div class="card-reveal">
<span class="card-title grey-text text-darken-4">Description<i class="material-icons right">close</i></span>
<div id="profile-description"></div>
</div>
</div>
</div>
</div>
</div>
<div class="col s8 m8 l9 xl9"> <!-- Right -->
<div class="row" id="alert-box"></div>
<div class="row" id="end-game-element">
<div class="col s12 m12 l12">
<div class="row">
<div class="card teal">
<div class="card-content black-text">
<i class="material-icons right" id="close-end-game-element">close</i>
<div class="row">
<div class="col s12 m12 l12 xl12">
<span style="font-size: 1em; position: absolute; top: 55px;" class="orange-text flow-text">THE WORD:</span>
<h2 id="end-word" class="flow-text">ARCHITECTURE</h2>
</div>
</div>
<div class="row">
<div class="col s6 m6 l6 xl6" style="position: relative;" id="end-game-winner-label">
<span style="font-size: 1em; position: absolute; top: -20px;" class="orange-text flow-text">THE WINNER:</span>
<div id="end-game-winner" class="flow-text">
WINNER
</div>
</div>
<div class="col s6 m6 l6 xl6" style="position: relative;" id="end-game-loser-label">
<span style="font-size: 1em; position: absolute; top: -20px;" class="orange-text flow-text">THE LOSER:</span>
<div id="end-game-loser" class="flow-text">
LOSER
</div>
</div>
<div class="col s12 m12 l12 xl12 "style="position: relative;" id="end-game-losers-label">
<span style="font-size: 1em; position: absolute; top: -20px;" class="orange-text flow-text">THE LOSERS:</span>
<div id="end-game-losers" class="flow-text">
LOSER(S)
</div>
</div>
</div>
<!-- <div class="row flow-text" id="end-game-losers">
<div class="col s12 m12 l12 xl12">
LOSER(S)
</div>
</div> -->
<!-- <div class="row">
<div class="col s12 m12 l12 xl12">
<div>attempts: <span id="end-attempts"></span></div>
<div>correct letters: <span id="end-correct-letters"></span></div>
<div>incorrect letters: <span id="end-incorrect-letters"></span></div>
<div>played letters: <span id="end-played-letters"></span></div>
<div><span id="end-game-state"></span></div>
</div>
</div> -->
<!-- <div>
word is <span class="wordIsGuessed"></span> *if [guessed]* [by [player name] in [attempts]]
</div> -->
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col s12 m12 l12">
<div class="card grey lighten-5">
<div class="card-content black-text">
<span class="card-title">Online players</span>
<ul id="users-list" class="collection"></ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- ending lobby element -->
<!-- start game element -->
<div id="game-element">
<div class="row">
<div class="col s3 m3 l3 xl3">
<div class="card teal darken-1">
<div class="card-content white-text">
<div class="row">
<div class="col">
<button class="btn" id="forfeit-button">Forfeit</button>
</div>
</div>
<div class="row">
<div class="col">
<img class="responsive-img" id="guessesImage" src="resources/bars-0.jpg" />
</div>
</div>
<div class="row">
<div class="col">
Player one: @<span id="playerOneName"></span><br>
Player two: @<span id="playerTwoName"></span>
</div>
</div>
</div>
</div>
</div>
<div class="col s9 m8 l9 xl9">
<div class="row">
<div class="card teal darken-1">
<div class="card-content white-text center-align">
<h4 id="word">W _ I _ _ B A _ G S</h4><!-- WHIZZBANGS -->
</div>
</div>
</div>
<div class="row" id="game-opponents-turn">
<div class="col s12 m12 l12 xl12">
<div class="card teal darken-1">
<div class="card-content white-text">
<div class="row">
<div class="col s12 m12 l12 xl12">
It is your opponents turn!
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row" id="game-input">
<div class="col">
<div class="row">
<div class="card teal darken-1">
<div class="card-content white-text">
<div class="row">
<div class="input-field col s12 m12">
<input type="text" value="" id="i-know-the-word" />
<label for="i-know-the-word" class="orange-text">Your guess!</label>
</div>
<div class="col s12 m12 right-align">
<button class="btn" onclick="guessTheWord()">I know!</button>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="card teal darken-1">
<div class="card-content white-text">
<div class="row">
<div class="col s12 m12 l12 xl12" id="alphabet-buttons">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end game element -->
<div id="debug-element">
<ul id="updates"></ul>
</div>
</div>
<script src="index.js"></script>
</body>
</html>