-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
238 lines (216 loc) · 10.7 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
<!DOCTYPE html>
<html>
<head>
<script src="./jquery-3.4.1.slim.min.js"></script>
<script type="text/javascript" src="./app.js"></script>
<script type="text/javascript" src="./welcome.js"></script>
<style type="text/css">
body {
background-image: url(./resources/pacmanImage.jpg);
background-size: cover;
background-attachment: fixed;
}
</style>
<link rel="stylesheet" type="text/css" href="./style.css">
</head>
<body>
<div class="contents">
<div id="menu" align="center">
<button type="button" id="welcomeMenuButton" value="Welcome" class="button">Welcome</button>
<button type="button" id="signupMenuButton" value="Signup" class="button">Signup</button>
<button type="button" id="loginMenuButton" value="Login" class="button">Login</button>
<button type="button" id="aboutMenuButton" value=" About" class="button">About</button>
</div>
<div id="welcome">
<br />
<img src="./resources/pacCoro.jpg" class="center">
<br />
<div class="center">
<button type="button" id="signupButtom" name="signup" value="Signup" class="button">Signup</button>
<button type ="button" id="loginByttom" name="login" value="Login" class="button">Login</button>
</div>
</div>
<div id="signup" name="signup" style="display: none;" class="centerDiv">
<p name="usernameP">
<label for="username">Username</label>
<input type="text" id="username" name="username"><br>
</p>
<p name="passwordP">
<label for="password">Password</label>
<input type="password" id="password" name="password"><br>
</p>
<p name="passwordConfirmP">
<label for="passwordConfirm">Confirm-Password</label>
<input type="password" id="passwordConfirm" name="passwordConfirm"><br>
</p>
<p name="fullNameP">
<label for="fullName">Full name</label>
<input type="text" id="fullName" name="fullName"><br>
</p>
<p name="emailP">
<label for="email">Email</label>
<input type="email" id="email" name="email"><br>
</p>
<p action="/action_page.php" name="birthdateP">
<label for="birthday">Birthday:</label>
<input type="date" id="birthday" name="birthday">
</p>
<p>
<button type="button" id="submit" name="submit" value="Submit" class="button">Submit</button>
</p>
</div>
<div id="login" style="display: none;" class="centerDiv">
<p>
<label for="usernameConnect">Username</label>
<input type="text" id="usernameConnect" name="usernameConnect"><br>
</p>
<p>
<label for="passwordConnect">Password</label>
<input type="password" id="passwordConnect" name="passwordConnect"><br>
</p>
<p>
<button type="button" id="connect" name="connect" value="Connect" class="button">Connect</button>
</p>
</div>
<div id="aboutModal" class="modal" style="display: none;">
<div class="modal-content">
<div class="modal-header">
<span id="spanId" class="close">×</span>
<h1>About</h1>
<h3>THE CREATORS: Merav Shaked & Yiftach Savransky</h3>
</div>
<div class="modal-body">
<p>jQuery plugins used: none Template used: none</p>
<p>struggles: We basically had to teach ourselves three different programming langauges at the same time from google. </p>
</div>
<div class="modal-footer">
<p>sise bgu 2020</p>
</div>
</div>
</div>
<div id="defsForm" style="display: none;">
<div id="usernameDefs" style="display: inline-block;"></div>
<form id="form" autocomplete="off">
<fieldset>
<legend>Decide the intensity of your challenge</legend>
<div id="chooseKeysDiv">
<p>
Press to choose controls
</p>
<label for="upKeybutton">move UP:</label>
<input id="upKeybutton" value="ArrowUp" name="upKeybutton" type="button">
<label for="downKeybutton">move DOWN:</label>
<input id="downKeybutton" value="ArrowDown" name="downKeybutton" type="button">
<label for="leftKeybutton">move LEFT:</label>
<input id="leftKeybutton" value="ArrowLeft" name="leftKeybutton" type="button">
<label for="rightKeybutton">move RIGHT:</label>
<input id="rightKeybutton" value="ArrowRight" name="rightKeybutton" type="button">
<p>
<label for="foodQuantity">Food Quantity (between 50 and 90)</label>
<input type="number" id="foodQuantity" value="50" name="foodQuantity" min="50" max="90">
</p>
</div>
<p>
Choose colors
</p>
<p>
<label for="lowScoreColor">Low score color:</label>
<input type="color" id="lowScoreColor" name="lowScoreColor" value="#ff0000">
<label for="medScoreColor">Medium score color:</label>
<input type="color" id="medScoreColor" name="medScoreColor" value="#E9FF00">
<label for="highScoreColor">High score color:</label>
<input type="color" id="highScoreColor" name="highScoreColor" value="#00FF1B">
</p>
<p>
<label for="timeLimitNum">Time Limit (min: 60 sec, we don't want to make it to hard now, do we?)</label>
<input type="number" id="timeLimitNum" name="timeLimitNum" value="60" min="60">
</p>
<p>
<label for="enemiesQuantity">How many enemies? (between 1 and 4)</label>
<input type="number" id="enemiesQuantity" name="enemiesQuantity" value="2" min="1" max="4">
</p>
<p>
<button type="button" id="randomButton" name="randomButton" value="random" class="button">random</button>
<button type="button" id="startButton" name="startButton" value="Let's GO!!!" class="button">Let's GO!!!</button>
</p>
</fieldset>
</form>
</div>
<div id="game" hidden style="display: none;">
<div style="display: table-row;">
<div style="display: table-cell;">
<div id="gamesVarsDisplay">
<div id="usernameDiv" style="display: inline-block;">
</div>
<br />
<div id="scoreDiv" style="display: inline-block;">
</div>
<div id="lifeDiv" style="display: inline-block;">
</div>
<div id="eatenDiv" style="display: inline-block;">
</div>
<div id="timeDiv" style="display: inline-block;">
</div>
</div>
<canvas id="canvas" height="600" width="600"></canvas>
</div>
<div style="display: table-cell;" class="center">
<div id="definitionDisplay">
<em><strong><u>Definitions</u></strong></em>
<div id="upKeyDisplay"></div>
<div id="downKeyDisplay"></div>
<div id="leftKeyDisplay"></div>
<div id="rightKeyDisplay"></div>
<div id="foodQuantityDisplay"></div>
<label for="lowColorDisplay">Low score color:</label>
<input type="color" id="lowColorDisplay" disabled>
<label for="medColorDisplay"><br />Medium score color:</label>
<input type="color" id="medColorDisplay" disabled>
<label for="highColorDisplay"><br />High score color:</label>
<input type="color" id="highColorDisplay" disabled>
<div id="timeLimitNumDisplay"></div>
<div id="enemiesQuantityDisplay"></div>
<br />
</div>
<div id="restartDiv">
<em id="restartText"><strong><u>Re-Start the game</u></strong></em>
<em id="restartStrong" hidden><strong><u>Re-Start the game!!!</u></strong></em>
<br />
<button type="button" id="restartButton" name="restartButton" value="Play again" class="button">Play again</button>
</div>
</div>
</div>
</div>
</div>
<script>
let modal = document.getElementById("aboutModal");
// Get the button that opens the modal
let btn = document.getElementById("aboutMenuButton");
// Get the <span> element that closes the modal
let span = document.getElementById("spanId");
// When the user clicks on the button, open the modal
btn.onclick = function () {
modal.style.display = "block";
}
// When the user clicks on <span> (x), close the modal
span.onclick = function () {
modal.style.display = "none";
}
// When the user clicks anywhere outside of the modal, close it
window.onclick = function (event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
document.addEventListener("keydown", function (event) {
let key = event.keyCode || event.which;
if (key == 27) {
modal.style.display = "none";
}
});
</script>
<footer>
<p>sise bgu 2020 contact: <a href="mailto:shmera@post.bgu.ac.il">shmera@post.bgu.ac.il</a> <a href="mailto:yiftachs@post.bgu.ac.il">yiftachs@post.bgu.ac.il</a></p>
</footer>
</body>
</html>