From 06fcc887fc8ee257765a7f02f8bcb835a3921a24 Mon Sep 17 00:00:00 2001 From: Jesse McDonald Date: Sat, 14 Mar 2020 00:48:24 -0500 Subject: [PATCH] add local stepping through move history & flexbox layout --- css/chess.css | 56 +++++++- index.html | 345 ++++++++++++++++++++++++++++---------------------- js/chess.js | 137 ++++++++++++++++---- 3 files changed, 361 insertions(+), 177 deletions(-) diff --git a/css/chess.css b/css/chess.css index f4cc610..134c534 100644 --- a/css/chess.css +++ b/css/chess.css @@ -1,4 +1,36 @@ +body { + font-family: 'Roboto', sans-serif; +} + +h1 { + font-family: 'Vollkorn', serif; +} + +button:disabled .silhouette { + fill: #c0c0c0; +} + +.screen-reader { + height: 1px; + overflow: hidden; + position: absolute; + width: 1px; +} + +#content { + display: flex; + flex-flow: row nowrap; +} + +/*@media only screen and (max-width: 8in) {*/ +@media only screen and (max-aspect-ratio: 4/3) { + #content { + flex-flow: column nowrap; + } +} + #cb_outer2 { + width: 100%; max-width: 66.7vh; } @@ -37,10 +69,18 @@ width: 8em; } -#cb_controls, #cb_names, #cb_game { +#cb_control_container { + margin-left: 1em; +} + +#cb_controls, #cb_names, #cb_game, #cb_navigate { margin-top: 0.5em; } +#cb_history { + max-width: 7.5in; +} + #cb_reset, #cb_pass { display: none; } @@ -92,6 +132,10 @@ vertical-align: middle; } +.cb-archive .cb-horiz-label, .cb-archive .cb-vert-label, .cb-archive .cb-corner { + background-color: #ffeeee; +} + .cb-lt-bg { background-color: #FFFFF0; } @@ -133,10 +177,6 @@ height: 65%; } -#cb_phantom > .cb-dk-piece { - left: 22.5%; -} - .cb-lt-piece { position: absolute; top: 17.5%; @@ -145,7 +185,13 @@ height: 65%; } +#cb_phantom > .cb-dk-piece { + top: 22.5%; + left: 22.5%; +} + #cb_phantom > .cb-lt-piece { + top: 22.5%; left: 22.5%; } diff --git a/index.html b/index.html index d3aeadd..db30954 100644 --- a/index.html +++ b/index.html @@ -4,164 +4,211 @@ + Paco Ŝako

Paco Ŝako

-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A
B
C
D
E
F
G
H
8
8
7
7
6
6
5
5
4
4
3
3
2
2
1
1
A
B
C
D
E
F
G
H
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
A
B
C
D
E
F
G
H
8
8
7
7
6
6
5
5
4
4
3
3
2
2
1
1
A
B
C
D
E
F
G
H
+
-
-
-
-
- - - - - -
-
-
- - vs. -
-
- - -
-
-

+
+
+
+ + + + + +
+
+
+ + vs. +
+
+ + +
+
+ + + + + + +
+
+

+