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
|
<!DOCTYPE html>
<!-- vim:set nowrap: -->
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, height=device-height, user-scalable=no, interactive-widget=resizes-content, viewport-fit=cover">
<meta name="theme-color" content="#444">
<meta charset="UTF-8">
<title>FIELD OF THE CLOTH OF GOLD</title>
<link rel="icon" href="favicon.svg">
<link rel="stylesheet" href="/fonts/fonts.css">
<link rel="stylesheet" href="/common/client.css">
<script defer src="/common/client.js"></script>
<script defer src="play.js"></script>
<style>
@font-face { font-family: "Albert Text"; src: url('fonts/AlbertText-Bold.woff2') format('woff2') }
main {
user-select: none;
background-color: #666;
background-image: url(background.png);
box-shadow: inset 0 0 8px #0008;
}
#role_Red .role_name { background-color: hsl(359,100%,75%); }
#role_Blue .role_name { background-color: hsl(220,100%,80%); }
body.Observer #hand { display: none }
.role_hand_size { float: right }
.checked::before { content: "\2714 " }
.unchecked::before { content: "\2714 "; color: transparent; }
.action { cursor: pointer; }
/* BOARD */
#mapwrap {
width: 825px;
margin: 0px auto;
}
#map {
width: 825px;
height: calc(12px + 80px + 12px + 638px + 12px + 80px + 12px + 80px + 12px);
}
#hand, .court { height: 80px; }
#court1 { top: 12px }
#board { top: calc(12px + 80px + 12px) }
#court2 { top: calc(12px + 80px + 12px + 638px + 12px) }
#hand { top: calc(12px + 80px + 12px + 638px + 12px + 80px + 12px) }
#mapwrap { height: calc(12px + 80px + 12px + 638px + 12px + 80px + 12px + 80px) }
#board, #hand, .court {
box-sizing: border-box;
position: absolute;
width: 825px;
border: 2px solid #0004;
border-color: #fff3 #0004 #0004 #fff3;
box-shadow: 0 0 0 1px #222, 1px 1px 8px #0008;
}
#board {
height: 638px;
background-size: 825px 638px;
background-position: center;
background-image: url(map75.jpg);
border-color: #fff8 #2228 #2228 #fff8;
background-image: url(map75.jpg)
}
@media (min-resolution: 97dpi) {
#board { background-image: url(map150.jpg) }
}
#hand { background-color: hsl(0,0%,50%) }
.red.court { background-color: hsl(359,35%,55%) }
.blue.court { background-color: hsl(220,35%,55%) }
.court, #hand, #darkness_label {
font-family: "Albert Text";
padding: 6px 10px;
text-align: right;
font-size: 20px;
color: #0006;
}
#darkness_label {
position: absolute;
right: -2px;
bottom: -2px;
color: #444;
text-shadow: 0px -1px 10px white;
}
#darkness_button {
position: absolute;
width: 56px;
height: 56px;
left: 10px;
bottom: 10px;
z-index: 1;
}
#darkness_button.action {
background-color: #0002;
box-shadow: inset 0 0 16px 4px black, 0 0 0 3px white;
}
.space {
position: absolute;
box-sizing: border-box;
}
.space.oval {
border-radius: 50%;
}
.space.action {
border: 3px solid white;
}
/* PIECES */
.token, .tile {
position: absolute;
box-sizing: border-box;
transition-property: top, left, opacity;
transition-duration: 500ms;
transition-timing-function: ease;
}
.token {
width: 41px;
height: 44px;
background-size: 41px 44px;
filter: drop-shadow(0px 2px 4px #0008);
}
.token.action {
filter:
drop-shadow(0px 2px 0px white)
drop-shadow(2px 0px 0px white)
drop-shadow(-2px 0px 0px white)
drop-shadow(0px -2px 0px white)
}
.token.selected {
filter:
drop-shadow(0px 2px 0px yellow)
drop-shadow(2px 0px 0px yellow)
drop-shadow(-2px 0px 0px yellow)
drop-shadow(0px -2px 0px yellow)
}
.token.white { background-image: url(images/token_white.svg) }
.token.red { background-image: url(images/token_red.svg) }
.token.blue { background-image: url(images/token_blue.svg) }
.tile {
width: 56px;
height: 56px;
background-repeat: no-repeat;
background-size: 38px 38px;
background-position: center;
border-width: 2px;
border-style: solid;
box-shadow: 0 0 0 1px #222, 1px 2px 4px #0008;
}
.tile.action {
box-shadow: 0 0 0 1px #222, 0 0 0 4px white;
}
.tile.gold { background-image: url(images/gold.png); background-color: hsl(50,81%,59%); }
.tile.blue { background-image: url(images/blue.png); background-color: hsl(201,80%,47%); }
.tile.white { background-image: url(images/white.png); background-color: hsl(0,0%,94%); }
.tile.red { background-image: url(images/red.png); background-color: hsl(0,90%,49%); }
.tile.green { background-image: url(images/green.png); background-color: hsl(125,21%,33%); }
.tile { border-color: #fff5 #0003 #0003 #fff5; }
.tile.gold { border-color: #fff6 #0003 #0003 #fff6 }
.tile.white { border-color: #ddd #bbb #bbb #ddd }
.tile.green { border-color: #fff3 #0003 #0003 #fff3 }
/* LOG */
#log { background-color: whitesmoke }
#log .h1 {
margin: 6px 0;
padding: 2px 8px;
border-top: 1px solid black;
border-bottom: 1px solid black;
background-color: hsl(0,0%,85%);
}
#log .h1.x { background-color: hsl(0,0%,85%); }
#log .h1.r { background-color: hsl(359,85%,85%); }
#log .h1.b { background-color: hsl(220,85%,85%); }
#log .t, #log .c, #log .o {
display: inline-block;
vertical-align: -2px;
width: 11px;
height: 11px;
border: 1px solid #222;
}
#log .c { border-radius: 50%; }
#log .o { border-radius: 0 0 50% 50%; }
#log .o.secrecy { width: 7px; height: 7px; margin: 2px 2px; border-radius: 0; border-color: white; }
#log .c.white { background-color: hsl(0,0%,94%) }
#log .c.red { background-color: hsl(359,85%,50%) }
#log .c.blue { background-color: hsl(220,85%,55%) }
#log .t.gold { background-color: hsl(50,81%,59%); }
#log .t.blue { background-color: hsl(201,80%,47%); }
#log .t.white { background-color: hsl(0,0%,94%); }
#log .t.red { background-color: hsl(0,90%,49%); }
#log .t.green { background-color: hsl(125,21%,43%); }
#log .t.black { background-color: hsl(0,0%,15%); }
#log .o.secrecy { background-color: hsl(0,0%,15%); }
#log .o.gold { background-color: hsl(50,81%,59%); }
#log .o.blue { background-color: hsl(201,80%,47%); }
#log .o.white { background-color: hsl(0,0%,94%); }
#log .o.red { background-color: hsl(0,90%,49%); }
#log .o.purple { background-color: hsl(296,29%,50%); }
</style>
</head>
<body>
<header>
<div id="toolbar">
<details>
<summary><img src="/images/cog.svg"></summary>
<menu>
<li><a href="info/rules.html" target="_blank">Rules</a>
<li class="separator">
<li id="sort_tiles_menu" class="unchecked" onclick="toggle_sort()">Sort tiles
<li class="resign separator">
<li class="resign" onclick="confirm_resign()">Resign
</menu>
</details>
</div>
</header>
<aside>
<div id="roles">
<div class="role" id="role_Red">
<div class="role_name">
Red
<div class="role_hand_size" id="red_hand_size"></div>
<div class="role_user"></div>
</div>
</div>
<div class="role" id="role_Blue">
<div class="role_name">
Blue
<div class="role_hand_size" id="blue_hand_size"></div>
<div class="role_user"></div>
</div>
</div>
</div>
<div id="log"></div>
</aside>
<main data-min-zoom="1" data-max-zoom="1">
<div id="mapwrap">
<div id="map">
<div id="court1" class="red court">Rival Court</div>
<div id="board">
<div id="darkness_button"></div>
<div id="darkness_label"></div>
</div>
<div id="court2" class="blue court">Court</div>
<div id="hand">Hand</div>
</div>
</div>
</main>
<footer id="status"></footer>
</body>
|