-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
305 lines (286 loc) · 16.1 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
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>你咋不上天呢?</title>
</head>
<body>
<link href="https://cdn.bootcss.com/flat-ui/2.3.0/css/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.bootcss.com/flat-ui/2.3.0/js/vendor/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/flat-ui/2.1.3/js/bootstrap.min.js"></script>
<style>
html, body {
overflow: hidden;
width : 100%;
height : 100%;
margin : 0;
padding : 0;
background-color: #CC0033;
}
.screen{
width: 94%;
height: 60%;
text-align: center;
margin: 3%;
background-color: black;
border-radius: 5px;
}
@media(max-width:768px){
#controller{
width: 100%;
height: 25%;
}
.renderCanvas {
height: 76%;
touch-action: none;
margin-top: 8%;
width: 86%;
border-radius: 2px;
overflow-y: scroll;
}
}
@media(min-width:768px){
#controller{
width: 100%;
height: 20%;
}
.renderCanvas {
height: 76%;
touch-action: none;
margin-top: 3%;
width: 86%;
border-radius: 2px;
}
}
.round-btn{
width: 36px;
height: 36px;
/* border-radius: 20px; */
background-color: black;
border: none;
box-shadow: 0 0 6px black;
/* transition-duration: 0.3s; */
color: white;
}
#score{
height: 7%;
line-height: 200%;
padding-left: 26px;
padding-right: 5px;
/* display: none; */
color: white;
text-align: left;
padding-right: 30px;
}
.round-btn:hover{
outline: none;
color: #993300;
box-shadow: none;
}
.table th{text-align: center;}
.table{border-color: black;}
.bind{margin-bottom: 5px;}
</style>
<audio id="bgm" controls="controls" style="display:none;">
<source src="./dist/htf.mp3" type="audio/mpeg">
<embed src="./dist/htf.mp3" />
</audio>
<div id="welcome" style="width:100%;height:100%;z-index:1;">
<div class="screen" style="padding-top:7%;">
<div class="renderCanvas container" style="height:87%;margin-top:0;background-image:url('./dist/christmas1.png');background-size:cover;background-position:center;"></div>
</div>
<div id="controller">
<div style="width: 40%;padding-left:5%;float: left;height: 75%;">
<div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button class="round-btn">F</button></div>
<div style="float:left;width:36px;height:36px;"></div>
</div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"><button class="round-btn">L</button></div>
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button class="round-btn">R</button></div>
</div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button class="round-btn">B</button></div>
<div style="float:left;width:36px;height:36px;"></div>
</div>
</div>
</div>
<div style="width: 50%;text-align: center;float: left;height: 100%;font-size:10px;">
<div><button style="margin-top: 25px;margin-left: 120px;border-radius: 20px;" class="round-btn">起飞</button></div>
<div><button style="margin-top: 5px;margin-left: 0px;border-radius: 20px;" class="round-btn">降落</button></div>
</div>
</div>
<div style="width:100%;text-align:center;">
<button id="enter" style="height:25px;width:80px;" class="round-btn">开始</button>
</div>
</div>
<div id="gameover" style="width:100%;height:100%;z-index:1;display:none;">
<div class="screen" style="padding-top:7%;">
<div class="renderCanvas container" style="height:87%;margin-top:0;overflow-y: scroll;">
<div class="container" style="text-align:center;background-image:url('./dist/ct1.png');background-position:center;background-size:cover;height:103%;color:white;">
<div style="min-height:80%;">
<div id="score-board">
<div style="font-size:25px;">Gameover</div>
<div id="check_successful" style="display:none;overflow:hidden;height:60px;margin-top:28px;">
<label style="font-size:18px">
<span>你好,</span><span id="username"></span>
</label>
<div class="col-xs-6 col-xs-offset-3">
<a id="release">解绑</a>
</div>
</div>
<div id="check_failed" style="display:none;"></div>
<div><span>本次得分:</span><span id="score_now_1"></span></div>
<div><span>最高纪录:</span><span id="score_his_1"></span></div>
</div>
<div id="bind_form">
<div class="bind" style="text-align:center;">
<label style="font-size:15px;">绑定iBeiKe账号,参与排名,精美奖品等你拿哦!</label>
</div>
<div class="bind">
<input type="text" name="username" class="form-control" id="usn" placeholder="iBeiKe账号" />
</div>
<div class="bind">
<input type="password" name="password" class="form-control" id="pwd" placeholder="密码" />
</div>
<div class="bind"><button id="login" class="btn btn-success" style="width:100%;">绑定</button></div>
</div>
</div>
<div class="bind">
<div class="col-xs-6" style="padding-left:0;">
<button class="btn btn-warning"id="reset" style="width:100%;">再来一次</button>
</div>
<div class="col-xs-6" style="padding-right:0;">
<button class="btn btn-danger"id="rank" style="width:100%;">排行榜</button>
</div>
</div>
</div>
</div>
</div>
<div id="controller">
<div style="width: 40%;padding-left:5%;float: left;height: 75%;">
<div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button class="round-btn">F</button></div>
<div style="float:left;width:36px;height:36px;"></div>
</div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"><button class="round-btn">L</button></div>
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button class="round-btn">R</button></div>
</div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button class="round-btn">B</button></div>
<div style="float:left;width:36px;height:36px;"></div>
</div>
</div>
</div>
<div style="width: 50%;text-align: center;float: left;height: 100%;font-size:10px;">
<div><button style="margin-top: 25px;margin-left: 120px;border-radius: 20px;" class="round-btn">起飞</button></div>
<div><button style="margin-top: 5px;margin-left: 0px;border-radius: 20px;" class="round-btn">降落</button></div>
</div>
</div>
<div style="width:100%;text-align:center;">
<button id="enter" style="height:25px;width:80px;" class="round-btn">开始</button>
</div>
</div>
<div id="rank_list" style="height:100%;display:none;">
<!-- <div class="container">
<div style="text-align:center"><h1>排行榜</h1></div>
<table class="table table-hover">
<thead><th>用户名</th><th>得分</th></thead>
<tbody id="rank_content"></tbody>
</table>
</div>
<div class="container" style="text-align:center;">
<button id="return" class="btn btn-info">返回首页</button>
</div> -->
<div class="screen" style="padding-top:7%;">
<div class="renderCanvas container" style="height:87%;margin-top:0;background-image:url('./dist/paper.jpg');background-position:center;background-size:cover;">
<div style="text-align:center;font-size:20px;margin-top:5px;">排行榜</div>
<table class="table table-condensed container" style="width:80%;">
<thead><th>用户名</th><th>得分</th></thead>
<tbody id="rank_content"></tbody>
</table>
<div style="text-align:center">
<button id="return" class="btn btn-danger">返回首页</button>
</div>
</div>
</div>
<div id="controller">
<div style="width: 40%;padding-left:5%;float: left;height: 75%;">
<div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button class="round-btn">F</button></div>
<div style="float:left;width:36px;height:36px;"></div>
</div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"><button class="round-btn">L</button></div>
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button class="round-btn">R</button></div>
</div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button class="round-btn">B</button></div>
<div style="float:left;width:36px;height:36px;"></div>
</div>
</div>
</div>
<div style="width: 50%;text-align: center;float: left;height: 100%;font-size:10px;">
<div><button style="margin-top: 25px;margin-left: 120px;border-radius: 20px;" class="round-btn">起飞</button></div>
<div><button style="margin-top: 5px;margin-left: 0px;border-radius: 20px;" class="round-btn">降落</button></div>
</div>
</div>
<div style="width:100%;text-align:center;">
<button id="enter" style="height:25px;width:80px;" class="round-btn">开始</button>
</div>
</div>
<div style="height:100%;">
<div class="screen">
<canvas id="renderCanvas" class="renderCanvas"></canvas>
<!-- <div class="renderCanvas" style="background-color:white;"></div> -->
<div id="score">
<div style="float:left;width:50%;">score:<span id="score_now">0</span></div>
<div style="float:left;width:50%;text-align:right">max:<span id="score_history">0</span></div>
</div>
</div>
<div id="controller">
<div style="width: 40%;padding-left:5%;float: left;height: 75%;">
<div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button id="Ft" class="round-btn">F</button></div>
<div style="float:left;width:36px;height:36px;"></div>
</div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"><button id="Lt" class="round-btn">L</button></div>
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button id="Rt" class="round-btn">R</button></div>
</div>
<div style="height:36px;">
<div style="float:left;width:36px;height:36px;"></div>
<div style="float:left;width:36px;height:36px;"><button id="Bk" class="round-btn">B</button></div>
<div style="float:left;width:36px;height:36px;"></div>
</div>
</div>
</div>
<div style="width: 50%;text-align: center;float: left;height: 100%;font-size:10px;">
<div><button id="Up" style="margin-top: 25px;margin-left: 120px;border-radius: 20px;" class="round-btn">起飞</button></div>
<div><button id="Dn" style="margin-top: 5px;margin-left: 0px;border-radius: 20px;" class="round-btn">降落</button></div>
</div>
</div>
<div style="width:100%;text-align:center;">
<button id="start" style="height:25px;width:80px;" class="round-btn">开始</button>
</div>
</div>
<script src="./dist/app.js"></script>
</body>
</html>