blob: d7ae9dacf3b1ac0721086775fc5cdb0e963cede1 (
plain)
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
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Board</title>
<style>
:root {
--square-side-length: 6rem;
--dark-color: #779556;
--light-color: #ebecd0;
--selected-color: #f37f6b;
--background-color: #0f0f0f;
--text-color: #fefefe;
}
body {
display: flex;
flex-direction: column;
align-items: center;
background-color: var(--background-color);
color: var(--text-color);
}
#board {
display: grid;
grid-template-columns: repeat(9, 1fr);
grid-template-rows: repeat(9, 1fr);
}
.dark {
background-color: var(--dark-color);
}
.light {
background-color: var(--light-color);
}
.selected {
background-color: var(--selected-color);
}
.rendering_marker {
width: 2rem;
height: 2rem;
border-radius: 50%;
}
.possible_move {
background-color: #0f0f0f55;
}
.square {
width: var(--square-side-length);
height: var(--square-side-length);
background-size: cover;
display: flex;
justify-content: center;
align-items: center;
}
.label {
width: var(--square-side-length);
height: var(--square-side-length);
display: flex;
align-items: center;
justify-content: flex-end;
}
.horizontal_label {
width: var(--square-side-length);
height: var(--square-side-length);
display: flex;
justify-content: center;
}
#mouse {
position: absolute;
width: var(--square-side-length);
height: var(--square-side-length);
transform: translate(-50%, -50%);
transition: 0.1s ease out;
pointer-events: none;
background-size: cover;
}
button {
border: none;
padding-left: 1rem;
padding-right: 1rem;
padding-top: 0.5rem;
padding-bottom: 0.5rem;
margin-bottom: 2rem;
cursor: pointer;
}
button:hover {
opacity: 0.9;
}
</style>
<script src="./assets/board.js"></script>
</head>
<body>
<button onclick="connectSocket()">Reconnect</button>
<div id="board">
</div>
<div id="output">
</div>
<div id="mouse">
</div>
</body>
</html>
|