chiark / gitweb /
Organise the JS menus/buttons bar more like a menu.
authorSimon Tatham <anakin@pobox.com>
Tue, 5 Sep 2017 06:06:48 +0000 (07:06 +0100)
committerSimon Tatham <anakin@pobox.com>
Tue, 5 Sep 2017 19:54:19 +0000 (20:54 +0100)
commit5e53ec5e36de0485467cb9553b8fa0bb580dc403
tree70ab8d3cdadaed4bc297987e0292d5b5c914d775
parentafc2134d26ef3bf05852b3e4413565becc1f0b1e
Organise the JS menus/buttons bar more like a menu.

I'm about to introduce a few more options, and the button bar is
already a bit wide, so I think I should shrink it horizontally before
putting more stuff on it. So I've organised the options into something
more like the Game and Type submenus that the desktop versions use.

However, I haven't gone quite all the way, on the basis that the web
versions will be at least slightly playable on devices without much
keyboard, which makes it worth keeping the in-play actions (Undo,
Redo, and to a lesser extent Restart and Solve) accessible as
top-level buttons in a single click each.

As part of this change, I've also separated the menu bar into a
drop-down menus section and a top-level buttons section with a gap
between them, and put a signalling "..." on the end of the titles in
the former section.

This change also removes the class="left" on the game-type menu and
its submenus, which were previously there to deal with that menu being
all the way over on the far right of the menu bar. But the CSS for
those classes is still there in jspage.pl, and should still work if I
need it again in future.
emcclib.js
html/jspage.pl