-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
178 lines (159 loc) · 8.81 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="assets/css/index.css" media="screen">
<link rel="stylesheet" type="text/css" href="assets/css/grid.css" media="screen">
<link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./node_modules/nes.css/css/nes.min.css">
<link rel="icon" href="assets/img/pacman.png">
<title>Start</title>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-md-2 col-lg-2"></div>
<div class="col-xs-12 col-md-8 col-lg-8">
<!-- MAIN PAGE -->
<div id="menu_page">
<img id="logo" src="assets/img/pacman_logo.png" class="responsive" width="700px"><br>
<span class="nes-text is-primary"><h2>Online</h2></span>
<button id="host_button" type="button" class="nes-btn is-warning menu_button mobile_button"><h2>New game</h2></button><br>
<button id="join_button" type="button" class="nes-btn is-success menu_button mobile_button"><h3>Join game</h3></button><br>
</div>
<!-- JOIN PAGE -->
<div id="join_page" style="display:none;">
<button id="join_game_number_button" type="button" class="nes-btn is-warning menu_button mobile_button"><h2>Game number</h2></button><br>
<button id="list_games_button" type="button" class="nes-btn is-primary menu_button mobile_button"><h3>Games' list</h3></button><br>
</div>
<!-- GAMES LIST PAGE -->
<div id="games_list_page" style="display:none;">
</div>
<div id="games_list_controls">
<button id="previous_games_list_page" type="button" class="nes-btn is-success active" style="width: 70px;"><h1>↤</h1></button>
<button id="next_games_list_page" type="button" class="nes-btn is-success active" style="width: 70px;"><h1>↦</h1></button>
</div>
<!-- NICKNAME SELECTION PAGE -->
<div id="nickname_page" style="display:none;">
<div style="background-color:#000; padding: 1rem;" class="nes-field is-inline">
<label for="dark_field" style="color:#fff;">Nickname</label>
<input type="text" id="dark_nickname_field" class="nes-input is-dark" autocomplete="off" placeholder="ex. BATMAN">
<button id="nickname_button" type="button" class="nes-btn is-success mobile_button">Ok</button>
</div>
<span id="nickname_error" class="nes-text is-error"></span>
</div>
<!-- GAME NUMBER SELECTION PAGE -->
<div id="game_number_page" style="display:none;">
<div style="background-color:#000; padding: 1rem;" class="nes-field is-inline">
<label for="dark_field" style="color:#fff;">n. Game</label>
<input type="text" id="dark_game_number_field" class="nes-input is-dark" autocomplete="off" placeholder="#56729">
<button id="game_number_button" type="button" class="nes-btn is-success mobile_button">Ok</button>
</div>
<span id="game_number_error" class="nes-text is-error"></span>
</div>
<!-- PLAYER LIST PAGE -->
<div id="player_list_page" style="display:none;">
<section id="player_list_section" class="nes-container is-dark member-card">
Game number: #<span id="game_number"></span>
<div class="nes-table-responsive" id="player_list">
<table id="player_table" class="nes-table is-bordered is-centered">
<thead>
<tr style="background-color: #209cee;">
<th># player</th>
<th>nickname</th>
</tr>
</thead>
<tbody>
<tr style="background-color: #92cc41;">
<td>1</td>
<td id="pl1"> </td>
</tr>
<tr style="background-color: #f7d51d;">
<td>2</td>
<td id="pl2"> </td>
</tr>
<tr style="background-color: #e59400;">
<td>3</td>
<td id="pl3"> </td>
</tr>
<tr style="background-color: #ce372b;">
<td>4</td>
<td id="pl4"> </td>
</tr>
</tbody>
</table>
</div>
</section>
<button id="play_button" type="button" class="nes-btn is-success active"><h1>►</h1></button><br>
</div>
</div>
<div class="col-md-2 col-lg-2"></div>
</div>
</div>
<div id="scores" class="container" style="display:none;">
<div class="row">
<div class="col-md-2 col-lg-2"></div>
<div class="col-xs-12 col-md-8 col-lg-8">
<!-- SCORES SECTION -->
<div id="scoreboard">
<!-- VIEW OF THE PLAYER'S SCORE -->
<div class="score score_left">
<span id="my_score" class="nes-text is-disabled inline_block">
</span>
</div>
<!-- VIEW OF THE SCORE OF THE OTHER PLAYERS -->
<div class="score score_right no_mobile">
<span class="nes-text is-disabled inline_block other_scores"></span><br>
</div>
</div>
</div>
<div class="col-md-2 col-lg-2"></div>
</div>
</div>
<!-- GAME SECTION -->
<canvas id="canvas" width="810" height="690" class="responsive" style="display:none;"></canvas>
<!-- VIEW OF THE SCORE OF THE OTHER PLAYERS IN MOBILE -->
<div class="container mobile" style="display:none;">
<div class="row">
<div class="col-xs-12">
<div id="score-mobile">
<div class="score top score_right">
<span class="nes-text is-disabled other_scores inline_block"></span><br>
</div>
</div>
</div>
</div>
</div>
<!-- INFORMATION SECTION ABOUT THE SWIPE -->
<span id="swipe_info" class="nes-text is-disabled inline_block" style="display:none;">
Swipe left, right, up and down to move
</span>
<!-- END OF GAME CARD -->
<div id="win" style="display:none;">
<div class="centered_card">
<section class="nes-container is-dark member-card win_section">
<div style="position: absolute; top: 80px">
<span class="nes-text is-success inline_block">
<!-- GAME WINNER SECTION -->
<h1><span id="winner"></span></h1><br>
<!-- PLAYERS RANKING SECTION -->
<section id="ranking" class="nes-container is-dark member-card">
<span class="nes-text is-success inline_block">
Pacman:
</span><br>
<span id="pacman_score" class="nes-text is-success inline_block">
</span>
</section>
<button id="win_button" type="button" class="nes-btn is-success" onclick="location.reload();"><h3>New game</h3></button>
</span>
</div>
</section>
</div>
</div>
<script src="/socket.io/socket.io.js"></script>
<script src="assets/js/jquery-3.5.1.min.js"></script>
<script src="assets/js/swiped-events.min.js"></script>
<script src="assets/js/game.js" type="module"></script>
</body>
</html>