From 586eb580e3e37cf3c16200c1ad687b79970b7699 Mon Sep 17 00:00:00 2001 From: clarkerubber Date: Thu, 20 Nov 2014 21:09:14 +1100 Subject: [PATCH] Position control buttons beneath PGN --- public/stylesheets/analyse.css | 16 +++++++++------ ui/analyse/src/view.js | 36 +++++++++++++++++----------------- 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/public/stylesheets/analyse.css b/public/stylesheets/analyse.css index 4951655f4d..4fa00603d2 100644 --- a/public/stylesheets/analyse.css +++ b/public/stylesheets/analyse.css @@ -98,21 +98,25 @@ div.game_control, div.continue { text-align: center; } +div.game_control { + width: 290px; + margin-left: -6px; +} div.continue { margin: 20px 0; } div.game_control a { - font-size: 16px; - height: 22px; + font-size: 12px; + height: 17px; + width: 12px; display: inline-block; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; - margin-left: -1px; - margin-right: -2px; + margin-right: -1px; } div.game_control .jumps { - margin-left: 1em; + margin-right: 1em; } .lichess_ground { height: 100%; @@ -120,7 +124,7 @@ div.game_control .jumps { .lichess_ground .replay { margin-left: 10px; width: 256px; - height: 100%; + height: 480px; overflow: auto; border: 1px solid #ccc; } diff --git a/ui/analyse/src/view.js b/ui/analyse/src/view.js index d7f3f84925..326555b562 100644 --- a/ui/analyse/src/view.js +++ b/ui/analyse/src/view.js @@ -215,21 +215,6 @@ function buttons(ctrl) { var nbMoves = ctrl.data.game.moves.length; return [ 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', { 'data-hint': 'Tip: use your keyboard arrow keys!' }, [ @@ -247,7 +232,22 @@ function buttons(ctrl) { 'data-icon': b[1], 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', [ m('a.button', { @@ -279,11 +279,11 @@ module.exports = function(ctrl) { if (!isUpdate) setTimeout(partial(autoScroll, el), 100); } }, - renderAnalyse(ctrl))) + renderAnalyse(ctrl)), buttons(ctrl)) ]) ]), m('div.underboard', [ - m('div.center', buttons(ctrl)), + m('div.center'), m('div.right') ]) ];