summaryrefslogtreecommitdiff
path: root/play.html
blob: 5b114c6cc5f2594dce6d4020c8f0a38ca3c0e47d (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
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
<!DOCTYPE html>
<!-- vim:set nowrap: -->
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1">
<meta charset="UTF-8">
<title>THE FIELD OF THE CLOTH OF GOLD</title>
<link rel="icon" href="favicon.png">
<link rel="stylesheet" href="/fonts/fonts.css">
<link rel="stylesheet" href="/common/play.css">
<script defer src="/common/play.js"></script>
<script defer src="play.js"></script>
<style>

main {
	background-color: #666;
	background-image: url(background.png);
	box-shadow: inset 0 0 8px #0008;
}

#log {
	background-color: oldlace;
}

#role_Red .role_name { background-color: hsl(359,100%,75%); }
#role_Blue .role_name { background-color: hsl(220,100%,80%); }

#mapwrap {
	width: 827px;
	margin: 0px auto;
}

#map {
	width: 825px;
	height: calc(12px + 80px + 12px + 638px + 12px + 80px + 12px + 80px + 12px);
}

#board, #hand, .court {
	box-sizing: border-box;
	position: absolute;
	width: 825px;
	border: 2px solid #0004;
	border-color: #fff4 #0004 #0004 #fff4;
	box-shadow: 0 0 0 1px #222, 1px 1px 8px -2px #000;
	border-radius: 8px;
}

#hand, .court {
	height: 80px;
}

#board {
	height: 638px;
	background-size: 825px 638px;
	background-position: center;
	background-image: url(map75.jpg);
	border-color: #fff8 #2228 #2228 #fff8;
}

#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) }

.red.court { background-color: hsl(359,35%,45%) }
.blue.court { background-color: hsl(220,35%,45%) }

X#hand { background-color: hsl(46, 63%, 56%) }
#hand { background-color: hsl(46, 35%, 45%) }
X#hand { background-image: url(bg_gold3.png); background-size: 256px 256px; }
X#hand { background-color: #666 }

@media (min-resolution: 97dpi) {
	#board { background-image: url(map150.jpg) }
}

#map div {
	position: absolute;
	transition-property: top, left;
	transition-duration: 500ms;
	transition-timing-function: ease;
}

.action {
	cursor: pointer;
}

.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)
}

.tile {
	width: 52px;
	height: 52px;
	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.selected {
	box-shadow: 0 0 0 1px #222, 0 0 0 4px yellow;
}

.space {
	box-sizing: border-box;
	border-radius: 50%;
	border: 3px solid transparent;
}

.space.action {
	border: 3px solid white;
}

.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.white { background-image: url(images/white.png) }
.tile.red { background-image: url(images/red.png) }
.tile.blue { background-image: url(images/blue.png) }
.tile.gold { background-image: url(images/gold.png) }
.tile.green { background-image: url(images/green.png) }

.tile.red { background-color: hsl(0,90%,49%); border-color: hsl(0,90%,59%) hsl(0,90%,39%) hsl(0,90%,39%) hsl(0,90%,59%); }
.tile.white { background-color: hsl(0,0%,94%); border-color: hsl(0,0%,100%) hsl(0,0%,84%) hsl(0,0%,84%) hsl(0,0%,100%); }
.tile.blue { background-color: hsl(201,80%,47%); border-color: hsl(201,80%,57%) hsl(201,80%,37%) hsl(201,80%,37%) hsl(201,80%,57%); }
.tile.gold { background-color: hsl(50,81%,59%); border-color: hsl(50,81%,69%) hsl(50,81%,49%) hsl(50,81%,49%) hsl(50,81%,69%); }
.tile.green { background-color: hsl(125,21%,33%); border-color: hsl(125,21%,43%) hsl(125,21%,23%) hsl(125,21%,23%) hsl(125,21%,43%); }

</style>
</head>
<body>

<header>
	<div id="toolbar">
	<div class="menu">
		<div class="menu_title"><img src="/images/cog.svg"></div>
		<div class="menu_popup">
			<a class="menu_item" href="info/rules.html" target="_blank">Rules</a>
			<div class="resign menu_separator"></div>
			<div class="resign menu_item" onclick="confirm_resign()">Resign</div>
		</div>
	</div>
	<div class="icon_button" onclick="toggle_zoom()"><img src="/images/magnifying-glass.svg"></div>
	</div>
	<div id="prompt"></div>
	<div id="actions"></div>
</header>

<aside>
	<div id="roles">
		<div class="role" id="role_Red">
			<div class="role_name">
				Red &#x2013;
				<span class="role_user"></span>
			</div>
		</div>
		<div class="role" id="role_Blue">
			<div class="role_name">
				Blue &#x2013;
				<span class="role_user"></span>
			</div>
		</div>
	</div>
	<div id="log"></div>
</aside>

<main>

<div id="mapwrap">
<div id="map">

<div id="court1" class="red court"></div>
<div id="board"></div>
<div id="court2" class="blue court"></div>
<div id="hand" class="blue hand"></div>

</div>
</div>

</main>

<footer id="status"></footer>

</body>