Position control buttons beneath PGN
This commit is contained in:
parent
12ba4b3b98
commit
586eb580e3
|
@ -98,21 +98,25 @@ div.game_control,
|
||||||
div.continue {
|
div.continue {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
div.game_control {
|
||||||
|
width: 290px;
|
||||||
|
margin-left: -6px;
|
||||||
|
}
|
||||||
div.continue {
|
div.continue {
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
div.game_control a {
|
div.game_control a {
|
||||||
font-size: 16px;
|
font-size: 12px;
|
||||||
height: 22px;
|
height: 17px;
|
||||||
|
width: 12px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
-moz-user-select: none;
|
-moz-user-select: none;
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
margin-left: -1px;
|
margin-right: -1px;
|
||||||
margin-right: -2px;
|
|
||||||
}
|
}
|
||||||
div.game_control .jumps {
|
div.game_control .jumps {
|
||||||
margin-left: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
.lichess_ground {
|
.lichess_ground {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -120,7 +124,7 @@ div.game_control .jumps {
|
||||||
.lichess_ground .replay {
|
.lichess_ground .replay {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
width: 256px;
|
width: 256px;
|
||||||
height: 100%;
|
height: 480px;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,21 +215,6 @@ function buttons(ctrl) {
|
||||||
var nbMoves = ctrl.data.game.moves.length;
|
var nbMoves = ctrl.data.game.moves.length;
|
||||||
return [
|
return [
|
||||||
m('div.game_control', [
|
m('div.game_control', [
|
||||||
m('a.button.hint--bottom', {
|
|
||||||
'data-hint': ctrl.trans('flipBoard'),
|
|
||||||
href: ctrl.router.Round.watcher(ctrl.data.game.id, ctrl.data.opponent.color).url
|
|
||||||
}, m('span[data-icon=B]')),
|
|
||||||
m('a.button.hint--bottom', {
|
|
||||||
'data-hint': ctrl.trans('boardEditor'),
|
|
||||||
href: '/' + ctrl.data.game.id + '/edit?fen=' + ctrl.vm.situation.fen,
|
|
||||||
rel: 'nofollow'
|
|
||||||
}, m('span[data-icon=m]')),
|
|
||||||
m('a.button.hint--bottom', {
|
|
||||||
'data-hint': ctrl.trans('continueFromHere'),
|
|
||||||
onclick: function() {
|
|
||||||
ctrl.vm.continue = !ctrl.vm.continue
|
|
||||||
}
|
|
||||||
}, m('span[data-icon=U]')),
|
|
||||||
m('div.jumps.hint--bottom', {
|
m('div.jumps.hint--bottom', {
|
||||||
'data-hint': 'Tip: use your keyboard arrow keys!'
|
'data-hint': 'Tip: use your keyboard arrow keys!'
|
||||||
}, [
|
}, [
|
||||||
|
@ -247,7 +232,22 @@ function buttons(ctrl) {
|
||||||
'data-icon': b[1],
|
'data-icon': b[1],
|
||||||
onclick: enabled ? partial(b[2], ctrl) : null
|
onclick: enabled ? partial(b[2], ctrl) : null
|
||||||
});
|
});
|
||||||
}))
|
})),
|
||||||
|
m('a.button.hint--bottom', {
|
||||||
|
'data-hint': ctrl.trans('flipBoard'),
|
||||||
|
href: ctrl.router.Round.watcher(ctrl.data.game.id, ctrl.data.opponent.color).url
|
||||||
|
}, m('span[data-icon=B]')),
|
||||||
|
m('a.button.hint--bottom', {
|
||||||
|
'data-hint': ctrl.trans('boardEditor'),
|
||||||
|
href: '/' + ctrl.data.game.id + '/edit?fen=' + ctrl.vm.situation.fen,
|
||||||
|
rel: 'nofollow'
|
||||||
|
}, m('span[data-icon=m]')),
|
||||||
|
m('a.button.hint--bottom', {
|
||||||
|
'data-hint': ctrl.trans('continueFromHere'),
|
||||||
|
onclick: function() {
|
||||||
|
ctrl.vm.continue = !ctrl.vm.continue
|
||||||
|
}
|
||||||
|
}, m('span[data-icon=U]'))
|
||||||
]),
|
]),
|
||||||
ctrl.vm.continue ? m('div.continue', [
|
ctrl.vm.continue ? m('div.continue', [
|
||||||
m('a.button', {
|
m('a.button', {
|
||||||
|
@ -279,11 +279,11 @@ module.exports = function(ctrl) {
|
||||||
if (!isUpdate) setTimeout(partial(autoScroll, el), 100);
|
if (!isUpdate) setTimeout(partial(autoScroll, el), 100);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
renderAnalyse(ctrl)))
|
renderAnalyse(ctrl)), buttons(ctrl))
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
m('div.underboard', [
|
m('div.underboard', [
|
||||||
m('div.center', buttons(ctrl)),
|
m('div.center'),
|
||||||
m('div.right')
|
m('div.right')
|
||||||
])
|
])
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue