-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.html
68 lines (57 loc) · 2.33 KB
/
admin.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
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-giJF6kkoqNQ00vy+HMDP7azOuL0xtbfIcaT9wjKHr8RbDVddVHyTfAAsrekwKmP1" crossorigin="anonymous">
<script src="/socket.io/socket.io.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<style type="text/css">
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
#center_div {
text-align: center;
margin: auto;
width: 50%;
}
@media screen and (max-width:540px) {
#center_div {
text-align: center;
margin: auto;
width: 80%;
}
}
img {
max-height: 100%;
max-width: 100%;
display: block; /* remove extra space below image */
/* filter: invert(1%) sepia(1%) saturate(1%) hue-rotate(1deg) brightness(1000%) contrast(80%); */
}
</style>
<script>
var urlParams = new URLSearchParams(window.location.search);
var password = urlParams.get('password');
$(function () {
var socket = io();
$('#countdownButton').click(function() {
var countdownLength = $('#countdownInput').val();
socket.emit('set_countdown', password, countdownLength);
});
$('#resetButton').click(function() {
socket.emit('reset_game', password);
});
});
</script>
</head>
<body style="background-color: blue;">
<div id="center_div">
<h1 style="font-size: 50px; margin: 25px; color: white;">MathRacer</h1>
<div id="countdownContainer" style="margin: auto; margin-top: 25px; width: 100%;" class="input-group mb-3">
<input id="countdownInput" type="number" class="form-control" placeholder="Countdown seconds" aria-label="Countdown" aria-describedby="basic-addon2">
<div class="input-group-append">
<button id="countdownButton" class="btn btn-success" type="button">Start Countdown</button>
</div>
</div>
<button style="width: 100%;" id="resetButton" class="btn btn-danger" type="button">Reset game</button>
</div>
</body>