board borders

pull/132/head
Thibault Duplessis 2014-10-04 11:03:42 +02:00
parent 9be978eac1
commit 212e95dc8d
6 changed files with 13 additions and 12 deletions

View File

@ -2,6 +2,10 @@
position: relative;
min-height: 600px;
}
#board_editor .cg-board-wrap {
width: 512px;
height: 512px;
}
#board_editor .cg-board {
width: 512px;
height: 512px;
@ -62,7 +66,7 @@
width: 40px;
}
#board_editor .copyable {
width: 460px;
width: 462px;
}
#editor-side > div.color {
margin-bottom: 1em;

View File

@ -1,3 +1,6 @@
.cg-board-wrap {
border: 1px solid #ccc;
}
.cg-board {
-webkit-user-select: none;
-moz-user-select: none;
@ -9,7 +12,6 @@
width: 100%;
height: 100%;
cursor: pointer;
border: 1px solid #ccc;
}
.cg-square {
position: absolute;

View File

@ -35,8 +35,7 @@ body.dark div.undertable_inner,
body.dark div.undertable td,
body.dark #tv_history td,
body.dark #chat form input,
body.dark div.lichess_board_wrap,
body.dark div.cg-board,
body.dark div.cg-board-wrap,
body.dark #translation_call,
body.dark #footer_wrap,
body.dark div.game_config .optional_config,

View File

@ -109,7 +109,7 @@ module.exports = function(ctrl) {
}
}, [
ctrl.costly(partial(sparePieces, ctrl, opposite)),
chessground.view(ctrl.chessground),
m('div.cg-board-wrap', chessground.view(ctrl.chessground)),
ctrl.costly(partial(sparePieces, ctrl, color)),
ctrl.costly(partial(controls, ctrl, fen)),
ctrl.costly(partial(inputs, ctrl, fen))

View File

@ -279,7 +279,7 @@ module.exports = function(ctrl) {
return m('div#puzzle.training', [
renderSide(ctrl),
m('div.board_and_ground', [
chessground.view(ctrl.chessground),
m('div.cg-board-wrap', chessground.view(ctrl.chessground)),
m('div.right', ctrl.data.mode == 'view' ? renderViewTable(ctrl) : renderPlayTable(ctrl))
]),
m('div.center', [

View File

@ -49,7 +49,7 @@ function renderResult(ctrl) {
ctrl.trans(winner.color == 'white' ? 'whiteIsVictorious' : 'blackIsVictorious')
])
]) :
m('div.lichess_player', renderStatus(ctrl));
m('div.lichess_player', m('p', renderStatus(ctrl)));
}
function renderRematchButton(ctrl) {
@ -71,11 +71,7 @@ function renderTableEnd(ctrl) {
m('form[method=post]', {
action: router.Pool.leave(d.game.pool.id)
}, m('button.button[type=submit]', 'Leave the pool'))
] : (d.game.tournament ? m('a[data-icon=G]', {
class: classSet({
button: true,
strong: d.game.tournament.running
}),
] : (d.game.tournament ? m('a.button' + (d.game.tournament.running ? '.strong' : '') + '[data-icon=G]', {
href: ctrl.router.Tournament.show(d.game.tournament.id)
}, ctrl.trans('backToTournament')) : (d.opponent.ai ? renderRematchButton(ctrl) : [
m('div.lichess_separator'),