diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml new file mode 100644 index 00000000..3f8e1638 --- /dev/null +++ b/.github/workflows/create_release.yml @@ -0,0 +1,53 @@ +name: Create GitHub Release + +on: + push: + tags: + - '*' + +jobs: + create_release: + name: Create Release + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + + - name: Set up + run: | + cd files/scripts + mkdir electron_zipped + cd electron_zipped + wget https://github.com/electron/electron/releases/download/v9.4.4/electron-v9.4.4-win32-x64.zip + wget https://github.com/electron/electron/releases/download/v9.4.4/electron-v9.4.4-linux-x64.zip + + - name: Install + run: python files/scripts/builder.py + + - name: Compress + run: | + cd files/scripts/dist/ + zip -r nibbler-windows.zip nibbler-*-windows + zip -r nibbler-linux.zip nibbler-*-linux + mv nibbler-*.zip $GITHUB_WORKSPACE/ + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + tag_name: ${{ github.ref_name }} + name: ${{ github.ref_name }} + draft: true + files: | + nibbler-linux.zip + nibbler-windows.zip diff --git a/README.md b/README.md index 5653af76..dc85fe34 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ These days, Nibbler more-or-less works with traditional engines like [Stockfish] For prebuilt binary releases, see the [Releases](https://github.com/rooklift/nibbler/releases) section. For help, the [Discord](https://discordapp.com/invite/pKujYxD) may be your best bet, or open an issue here. - + ## Features diff --git a/files/.gitignore b/files/.gitignore index 43f17e38..de61c20e 100644 --- a/files/.gitignore +++ b/files/.gitignore @@ -1,3 +1,4 @@ .DS_Store scripts/dist scripts/electron_zipped +scripts/update_my_installation.py diff --git a/files/scripts/install.sh b/files/scripts/install.sh index 62d70f44..236f8309 100755 --- a/files/scripts/install.sh +++ b/files/scripts/install.sh @@ -64,11 +64,12 @@ ICON_SVG_PATH="/usr/local/share/icons/hicolor/scalable/apps/nibbler.svg" echo "Installing Nibbler to ${INSTALL_DIR}" echo "Creating binary symlink at ${BIN_SYMLINK_PATH}" echo "Installing desktop entry to ${DESKTOP_ENTRY_PATH}" -echo "Installing icon to ${ICON_PATH}" +echo "Installing icons to ${ICON_PNG_PATH} and ${ICON_SVG_PATH}" echo "This will require sudo privilege." # remove old and make sure directories are created -for FILE in "${INSTALL_DIR}" "${BIN_SYMLINK_PATH}" "${DESKTOP_ENTRY_PATH}" "${ICON_PATH}"; do +for FILE in "${INSTALL_DIR}" "${BIN_SYMLINK_PATH}" "${DESKTOP_ENTRY_PATH}" \ + "${ICON_PNG_PATH}" "${ICON_SVG_PATH}"; do sudo rm -rf "$FILE" sudo mkdir -p $(dirname "$FILE") done diff --git a/files/src/main.js b/files/src/main.js index 120233f6..543f20c8 100644 --- a/files/src/main.js +++ b/files/src/main.js @@ -244,8 +244,12 @@ function startup() { case "hash": let mb = parseInt(msg.val, 10); if (Number.isNaN(mb) === false) { - let gb = Math.floor(mb / 1024); - set_checks("Engine", "Hash", `${gb} GB`); + if (mb >= 1024) { + let gb = Math.floor(mb / 1024); + set_checks("Engine", "Hash", `${gb} GiB`); + } else { + set_checks("Engine", "Hash", `${mb} MiB`); + } } else { set_checks("Engine", "Hash", ""); // i.e. clear all } @@ -371,7 +375,10 @@ function menu_build() { alert(win, messages.save_not_enabled); return; } - let file = save_dialog(win, {defaultPath: config.pgn_dialog_folder}); + let file = save_dialog(win, { + defaultPath: config.pgn_dialog_folder, + filters: [{name: "PGN", extensions: ["pgn"]}, {name: "All files", extensions: ["*"]}] + }); if (typeof file === "string" && file.length > 0) { win.webContents.send("call", { fn: "save", @@ -810,6 +817,16 @@ function menu_build() { }); } }, + { + label: "Auto-evaluate line, backwards (ucinewgame)", + accelerator: "Ctrl+Shift+F12", + click: () => { + win.webContents.send("call", { + fn: "set_behaviour", + args: ["back_analysis_ucinewgame"] + }); + } + }, { type: "separator" }, @@ -2579,6 +2596,30 @@ function menu_build() { { type: "separator" }, + { + label: "10,000,000,000", + type: "checkbox", + checked: false, + click: () => { + win.webContents.send("call", { + fn: "set_node_limit", + args: [10 * billion] + }); + // Will receive an ack IPC which sets menu checks. + } + }, + { + label: "5,000,000,000", + type: "checkbox", + checked: false, + click: () => { + win.webContents.send("call", { + fn: "set_node_limit", + args: [5 * billion] + }); + // Will receive an ack IPC which sets menu checks. + } + }, { label: "1,000,000,000", type: "checkbox", @@ -2591,6 +2632,30 @@ function menu_build() { // Will receive an ack IPC which sets menu checks. } }, + { + label: "500,000,000", + type: "checkbox", + checked: false, + click: () => { + win.webContents.send("call", { + fn: "set_node_limit", + args: [500 * million] + }); + // Will receive an ack IPC which sets menu checks. + } + }, + { + label: "250,000,000", + type: "checkbox", + checked: false, + click: () => { + win.webContents.send("call", { + fn: "set_node_limit", + args: [250 * million] + }); + // Will receive an ack IPC which sets menu checks. + } + }, { label: "100,000,000", type: "checkbox", @@ -2604,97 +2669,97 @@ function menu_build() { } }, { - label: "10,000,000", + label: "50,000,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit", - args: [10 * million] + args: [50 * million] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "1,000,000", + label: "25,000,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit", - args: [1 * million] + args: [25 * million] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "100,000", + label: "10,000,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit", - args: [100000] + args: [10 * million] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "10,000", + label: "5,000,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit", - args: [10000] + args: [5 * million] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "1,000", + label: "1,000,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit", - args: [1000] + args: [1 * million] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "100", + label: "100,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit", - args: [100] + args: [100000] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "10", + label: "10,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit", - args: [10] + args: [10000] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "2", + label: "1,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit", - args: [2] + args: [1000] }); // Will receive an ack IPC which sets menu checks. } @@ -2739,6 +2804,30 @@ function menu_build() { { label: "Limit - auto-eval / play", submenu: [ + { + label: "10,000,000,000", + type: "checkbox", + checked: false, + click: () => { + win.webContents.send("call", { + fn: "set_node_limit_special", + args: [10 * billion] + }); + // Will receive an ack IPC which sets menu checks. + } + }, + { + label: "5,000,000,000", + type: "checkbox", + checked: false, + click: () => { + win.webContents.send("call", { + fn: "set_node_limit_special", + args: [5 * billion] + }); + // Will receive an ack IPC which sets menu checks. + } + }, { label: "1,000,000,000", type: "checkbox", @@ -2751,6 +2840,30 @@ function menu_build() { // Will receive an ack IPC which sets menu checks. } }, + { + label: "500,000,000", + type: "checkbox", + checked: false, + click: () => { + win.webContents.send("call", { + fn: "set_node_limit_special", + args: [500 * million] + }); + // Will receive an ack IPC which sets menu checks. + } + }, + { + label: "250,000,000", + type: "checkbox", + checked: false, + click: () => { + win.webContents.send("call", { + fn: "set_node_limit_special", + args: [250 * million] + }); + // Will receive an ack IPC which sets menu checks. + } + }, { label: "100,000,000", type: "checkbox", @@ -2764,97 +2877,97 @@ function menu_build() { } }, { - label: "10,000,000", + label: "50,000,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit_special", - args: [10 * million] + args: [50 * million] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "1,000,000", + label: "25,000,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit_special", - args: [1 * million] + args: [25 * million] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "100,000", + label: "10,000,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit_special", - args: [100000] + args: [10 * million] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "10,000", + label: "5,000,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit_special", - args: [10000] + args: [5 * million] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "1,000", + label: "1,000,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit_special", - args: [1000] + args: [1 * million] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "100", + label: "100,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit_special", - args: [100] + args: [100000] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "10", + label: "10,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit_special", - args: [10] + args: [10000] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "2", + label: "1,000", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_node_limit_special", - args: [2] + args: [1000] }); // Will receive an ack IPC which sets menu checks. } @@ -2911,369 +3024,345 @@ function menu_build() { label: "Threads", submenu: [ { - label: "128", + label: "12", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 128], + args: ["Threads", 12], }); // Will receive an ack IPC which sets menu checks. } }, { - label: "96", + label: "10", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 96], + args: ["Threads", 10], }); // Will receive an ack IPC which sets menu checks. } }, { - label: "64", + label: "8", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 64], + args: ["Threads", 8], }); // Will receive an ack IPC which sets menu checks. } }, { - label: "48", + label: "7", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 48], + args: ["Threads", 7], }); // Will receive an ack IPC which sets menu checks. } }, { - label: "32", + label: "6", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 32], + args: ["Threads", 6], }); // Will receive an ack IPC which sets menu checks. } }, { - label: "24", + label: "5", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 24], + args: ["Threads", 5], }); // Will receive an ack IPC which sets menu checks. } }, { - label: "16", + label: "4", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 16], + args: ["Threads", 4], }); // Will receive an ack IPC which sets menu checks. } }, { - label: "14", + label: "3", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 14], + args: ["Threads", 3], }); // Will receive an ack IPC which sets menu checks. } }, { - label: "12", + label: "2", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 12], + args: ["Threads", 2], }); // Will receive an ack IPC which sets menu checks. } }, { - label: "10", + label: "1", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 10], + args: ["Threads", 1], }); // Will receive an ack IPC which sets menu checks. } }, { - label: "8", - type: "checkbox", - checked: false, + type: "separator" + }, + { + label: "Warning about threads", click: () => { - win.webContents.send("call", { - fn: "set_uci_option_permanent", - args: ["Threads", 8], - }); - // Will receive an ack IPC which sets menu checks. + alert(messages.thread_warning); } }, + ] + }, + { + label: "Hash", + submenu: [ { - label: "7", + label: "16 GiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 7], + args: ["Hash", 16 * 1024] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "6", + label: "12 GiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 6], + args: ["Hash", 12 * 1024] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "5", + label: "10 GiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 5], + args: ["Hash", 10 * 1024] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "4", + label: "8 GiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 4], + args: ["Hash", 8 * 1024] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "3", + label: "6 GiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 3], + args: ["Hash", 6 * 1024] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "2", + label: "4 GiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 2], + args: ["Hash", 4 * 1024] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "1", + label: "2 GiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Threads", 1], + args: ["Hash", 2 * 1024] }); // Will receive an ack IPC which sets menu checks. } }, { - type: "separator" - }, - { - label: "Warning about threads", - click: () => { - alert(win, messages.thread_warning); - } - }, - ] - }, - { - label: "Hash", - submenu: [ - { - label: "120 GB", + label: "1 GiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Hash", 120 * 1024] + args: ["Hash", 1 * 1024] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "56 GB", + label: "512 MiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Hash", 56 * 1024] + args: ["Hash", 1 * 512] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "24 GB", + label: "256 MiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Hash", 24 * 1024] + args: ["Hash", 1 * 256] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "12 GB", + label: "128 MiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Hash", 12 * 1024] + args: ["Hash", 1 * 128] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "8 GB", + label: "64 MiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Hash", 8 * 1024] + args: ["Hash", 1 * 64] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "6 GB", + label: "16 MiB", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Hash", 6 * 1024] + args: ["Hash", 1 * 16] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "4 GB", - type: "checkbox", - checked: false, + type: "separator" + }, + { + label: "I want other hash options!", click: () => { - win.webContents.send("call", { - fn: "set_uci_option_permanent", - args: ["Hash", 4 * 1024] - }); - // Will receive an ack IPC which sets menu checks. + alert(messages.about_hashes); } - }, + } + ] + }, + { + label: "MultiPV", + submenu: [ { - label: "2 GB", + label: "500", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Hash", 2 * 1024] + args: ["MultiPV", 500] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "1 GB", + label: "256", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Hash", 1 * 1024] + args: ["MultiPV", 256] }); // Will receive an ack IPC which sets menu checks. } }, { - label: "0 GB", + label: "10", type: "checkbox", checked: false, click: () => { win.webContents.send("call", { fn: "set_uci_option_permanent", - args: ["Hash", 1] // 1 MB is Stockfish actual minimum. + args: ["MultiPV", 10] }); // Will receive an ack IPC which sets menu checks. } }, - { - type: "separator" - }, - { - label: "I want other hash options!", - click: () => { - alert(win, messages.about_hashes); - } - } - ] - }, - { - label: "MultiPV", - submenu: [ { label: "5", type: "checkbox", @@ -3383,6 +3472,16 @@ function menu_build() { }); } }, + { + label: "Start self-play (ucinewgame)", + accelerator: "Ctrl+F11", + click: () => { + win.webContents.send("call", { + fn: "set_behaviour", + args: ["self_play_ucinewgame"], + }); + } + }, { label: "Halt", click: () => { @@ -4130,6 +4229,17 @@ function menu_build() { }); } }, + { + label: "Use unique logfile each time", + type: "checkbox", + checked: config.logfile_timestamp, + click: () => { + win.webContents.send("call", { + fn: "toggle", + args: ["logfile_timestamp"], + }); + } + }, { type: "separator" }, diff --git a/files/src/modules/config_io.js b/files/src/modules/config_io.js index 0b7a9b08..9933bfe7 100644 --- a/files/src/modules/config_io.js +++ b/files/src/modules/config_io.js @@ -28,28 +28,28 @@ exports.defaults = { "width": 1280, "height": 835, - "board_size": 640, - "info_font_size": 16, - "pgn_font_size": 16, - "fen_font_size": 16, + "board_size": 416, + "info_font_size": 18, + "pgn_font_size": 18, + "fen_font_size": 18, "arrow_width": 8, "arrowhead_radius": 12, "board_font": "18px Arial", - "graph_height": 96, + "graph_height": 192, "graph_line_width": 2, "graph_minimum_length": 41, // Desired depth + 1 - "light_square": "#dadada", - "dark_square": "#b4b4b4", - "active_square": "#66aaaa", - "move_squares_with_alpha": "#ffff0026", + "light_square": "#f0d9b5", + "dark_square": "#b58863", + "active_square": "#ffff0080", + "move_squares_with_alpha": "#ffff0080", - "best_colour": "#66aaaa", - "good_colour": "#66aa66", - "bad_colour": "#cccc66", - "terrible_colour": "#cc6666", - "actual_move_colour": "#cc9966", + "best_colour": "#4da3ff", + "good_colour": "#6fc383", + "bad_colour": "#ffac38", + "terrible_colour": "#e0525d", + "actual_move_colour": "#fff", "searchmoves_buttons": true, "focus_on_text": "focused:", @@ -58,50 +58,50 @@ exports.defaults = { "accept_bounds": false, "max_info_lines": null, // Hidden option - "bad_move_threshold": 0.02, - "terrible_move_threshold": 0.04, - "ab_filter_threshold": 0.1, + "bad_move_threshold": 0.05, + "terrible_move_threshold": 0.1, + "ab_filter_threshold": 0.25, "arrow_filter_type": "N", "arrow_filter_value": 0.01, "arrows_enabled": true, "click_spotlight": true, - "next_move_arrow": false, - "next_move_outline": false, + "next_move_arrow": true, + "next_move_outline": true, "next_move_unique_colour": false, "arrowhead_type": 0, "ev_pov": null, - "cp_pov": null, - "wdl_pov": null, + "cp_pov": "w", + "wdl_pov": "w", - "show_cp": false, + "show_cp": true, "show_n": true, "show_n_abs": true, "show_depth": true, - "show_p": true, + "show_p": false, "show_v": false, "show_q": false, "show_u": false, "show_s": false, "show_m": false, "show_wdl": true, - "infobox_stats_newline": false, - "infobox_pv_move_numbers": false, - "hover_draw": false, - "hover_method": 2, + "infobox_stats_newline": true, + "infobox_pv_move_numbers": true, + "hover_draw": true, + "hover_method": 1, "looker_api": null, "look_past_25": false, "pv_click_event": 1, // 0: nothing, 1: goto, 2: tree - "pgn_ev": true, + "pgn_ev": false, "pgn_cp": false, - "pgn_n": true, + "pgn_n": false, "pgn_n_abs": false, - "pgn_of_n": true, + "pgn_of_n": false, "pgn_depth": false, "pgn_p": false, "pgn_v": false, @@ -141,6 +141,7 @@ exports.defaults = { "logfile": null, "clear_log": true, + "logfile_timestamp": false, "log_info_lines": false, "log_useless_info": false, "log_illegal_moves": true, diff --git a/files/src/nibbler.css b/files/src/nibbler.css index e6d20863..ad38d961 100644 --- a/files/src/nibbler.css +++ b/files/src/nibbler.css @@ -28,11 +28,12 @@ body { display: grid; height: 100vh; grid-template-columns: min-content 1fr; - grid-template-rows: min-content min-content 1fr; + grid-template-rows: min-content min-content min-content 1fr; grid-template-areas: "a b" + "e e" "f f" - "g g"; + "g g" } #rightgridder { @@ -41,11 +42,9 @@ body { margin: 1em 0 0 0; height: 0; /* js needs to keep this equal to the boardsize */ grid-template-columns: none; - grid-template-rows: min-content 1fr min-content; grid-template-areas: "c" - "d" - "e"; + "d"; } #boardsquares { @@ -75,18 +74,17 @@ body { } #statusbox { - grid-area: c; + grid-area: f; margin: 0 0 0 1em; border: none; display: block; font-family: monospace, monospace; pointer-events: auto; - overflow: hidden; white-space: pre; } #infobox { - grid-area: d; + grid-area: g; margin: 1em 1em 0 1em; display: block; color: #cccccc; /* only used for Lc0 stderr output at startup */ @@ -99,7 +97,7 @@ body { } #graph { - grid-area: e; + grid-area: d; align-self: end; display: block; margin: 10px 0 0 1em; @@ -112,7 +110,7 @@ input[type=text]:focus { } #fenbox { - grid-area: f; + grid-area: e; margin: 1em 1em 0 1em; background-color: #080808; border: none; @@ -126,7 +124,7 @@ input[type=text]:focus { } #movelist { - grid-area: g; + grid-area: c; margin: 1em 1em 1em 1em; display: block; color: #999999; @@ -253,3 +251,106 @@ span.movelist_highlight_yellow { span.nobr { white-space: nowrap; /* Used for O-O and O-O-O moves */ } + +/* ----------------------------------- */ + +#rightgridder { + position: relative; +} + +#graph { + border-top: 1px solid #666666; + border-bottom: 1px solid #666666; +} + +.pink { + color: #999999; +} + +.infoline > .gray:last-child { + color: #ff8a8ab3; +} + +#infobox { + margin-top: .5em; + margin-left: calc(1em - 5px); +} + +#infobox > .infoline { + margin-bottom: 0; + padding-top: .5em; + padding-bottom: .5em; + border-bottom: .5px solid #99999969; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +#infobox > .infoline:hover { + white-space: normal; + word-break: break-all; +} + +#infobox > .infoline > .gray { + margin-left: 5px; +} + +#infobox > .infoline > [id^="infobox_"] { + word-break: break-all; + white-space: nowrap; + padding: 0 5px 0 5px; + border-radius: 3px; + transition: .1s; +} + +#infobox > .infoline > [id^="infobox_"]:first-child { + margin-left: -6px; +} + +#infobox > .infoline > [id^="infobox_"]:hover { + background-color: #eeeeee1f; + transition: .1s; +} + +#fenbox { + margin: calc(.5em - 4px) calc(1em - 4px); + padding: 8px; +} + +#fenbox:focus { + outline-offset: 0; +} + +#movelist { + margin: 0; + padding: 0 1em 0 calc(1em - 2px); +} + +#movelist > span { + display: inline-block; + padding: 0 5px 0 5px; + border-radius: 3px; + transition: .1s; +} + +#movelist > span:hover { + background-color: #eeeeee33; + transition: .1s; +} + +#movelist > .movelist_highlight_blue { + background-color: #eeeeee40; + color: #eeeeee; +} + +#movelist > .movelist_highlight_yellow { + background-color: #ffff0033; +} + +#movelist > .movelist_highlight_yellow:hover { + background-color: #ffff0040; +} + +#statusbox > .gray { + white-space: normal; +} diff --git a/files/src/nibbler.html b/files/src/nibbler.html index 97c8c546..c3706c84 100644 --- a/files/src/nibbler.html +++ b/files/src/nibbler.html @@ -20,15 +20,15 @@