This repository has been archived by the owner on Jan 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtablut.css
executable file
·209 lines (179 loc) · 4.33 KB
/
tablut.css
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
/**
*------
* BGA framework: © Gregory Isabelli <gisabelli@boardgamearena.com> & Emmanuel Colin <ecolin@boardgamearena.com>
* -----
*
* tablut.css
*
* Tablut stylesheet
*
*/
/*
This is the CSS stylesheet of your game User Interface.
Styles defined on this file will be applied to the HTML elements you define in your
HTML template (tablut_tablut.tpl), and to HTML elements you create dynamically
(in tablut.js).
Usually, you are using CSS to:
1°) define the overall layout of your game
(ex: place the board on the top left, place player's hand beside, place the deck on the right, ...).
2°) create your CSS-sprites:
All images of your games should be gathered into a small number of image files. Then, using
background-image and background-position CSS properties, you create HTML blocks that can
display these images correctly (see example below).
3°) ... anything else:
It is really easy to add and remove CSS classes dynamically from your Javascript with
dojo.addClass and dojo.removeClass. It is also easy to check if an element has a class
(dojo.hasClass) or to get all elements with a specific class (dojo.query). This is why,
very often, using CSS classes for the logic of your user interface allow you to do complex
thing easily.
Note: on the production platform, this file will be compressed and comments will be removed.
Consequently, don't hesitate to put as many comments as necessary.
*/
@import url(../../../css/csslayer.css); /* Note: you must not use any @import directive other than this one */
/********* You can start writing your CSS below this line: **********/
#board {
position: relative;
margin: 30px auto;
height: 540px;
width: 540px;
background-image: url('img/board.jpg');
}
.square {
position: absolute;
width: 60px;
height: 60px;
border: 1px solid black;
box-sizing: border-box;
}
.border {
position: absolute;
width: 60px;
height: 60px;
box-sizing: border-box;
}
.border-left {
text-align: right;
padding-right: 10px;
line-height: 60px;
}
.border-right {
text-align: left;
padding-left: 10px;
line-height: 60px;
}
.border-top {
text-align: center;
line-height: 100px;
}
.border-bottom {
text-align: center;
}
.throne {
background:
repeating-linear-gradient(
45deg,
#60bcb0,
#60bcb0 10px,
#46988c 10px,
#46988c 20px
);
}
.fortress {
background:
repeating-linear-gradient(
45deg,
#606dbc,
#606dbc 10px,
#465298 10px,
#465298 20px
);
}
.corner.fortress::before {
content: '☆';
color: white;
font-size: 3em;
line-height: 54px;
/* Horizontal centering: */
display: block;
text-align: center;
}
.p1Swede {
width: 54px;
height: 54px;
margin: 3px;
position: absolute;
background-color: white;
border-radius: 30px;
}
.p1King {
width: 54px;
height: 54px;
margin: 3px;
position: absolute;
background-color: white;
border-radius: 30px;
}
.p1King::before {
content: '♕';
font-size: 3em;
line-height: 54px;
/* Horizontal centering: */
display: block;
width: 100%;
text-align: center;
}
.p0Muscovite {
width: 54px;
height: 54px;
margin: 3px;
position: absolute;
background-color: #111;
border-radius: 30px;
}
.selectable {
cursor: pointer;
}
.selectable:hover {
opacity: 0.6;
}
.selected {
background-color: cadetblue;
}
.availableMove::before {
content: ' ';
width: 54px;
height: 54px;
margin: 3px;
position: absolute;
background-color: cadetblue;
border-radius: 30px;
cursor: pointer;
opacity: 0.4;
}
.winningPath::before {
content: ' ';
width: 48px;
height: 48px;
position: absolute;
margin: 3px;
border-radius: 24px;
cursor: pointer;
opacity: 0.4;
border: 3px solid gold;
}
.finalWinningPos::before {
content: ' ';
width: 54px;
height: 54px;
margin: 3px;
position: absolute;
background-color: gold;
border-radius: 30px;
cursor: pointer;
opacity: 0.4;
}
#maintitlebar_topMsg {
display: inline-block;
position: relative;
width: 100%;
}