From bcc8804495bb64e75e505bd970f162a613436371 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Fri, 2 Mar 2018 16:30:20 +0000 Subject: [PATCH] Updated buttons, fonts and collapse --- src/web/ControlsWaiter.js | 4 +-- src/web/HTMLCategory.js | 13 ++++---- src/web/HTMLIngredient.js | 2 +- src/web/OperationsWaiter.js | 2 +- src/web/html/index.html | 40 ++++++++++++------------ src/web/stylesheets/layout/_controls.css | 2 +- src/web/stylesheets/themes/_classic.css | 6 ++-- src/web/stylesheets/utils/_overrides.css | 18 +++++------ 8 files changed, 44 insertions(+), 43 deletions(-) diff --git a/src/web/ControlsWaiter.js b/src/web/ControlsWaiter.js index a9b7490c..8684c7c7 100755 --- a/src/web/ControlsWaiter.js +++ b/src/web/ControlsWaiter.js @@ -105,9 +105,9 @@ ControlsWaiter.prototype.autoBakeChange = function() { if (autoBakeCheckbox.checked) { autoBakeLabel.classList.add("btn-success"); - autoBakeLabel.classList.remove("btn-default"); + autoBakeLabel.classList.remove("btn-secondary"); } else { - autoBakeLabel.classList.add("btn-default"); + autoBakeLabel.classList.add("btn-secondary"); autoBakeLabel.classList.remove("btn-success"); } }; diff --git a/src/web/HTMLCategory.js b/src/web/HTMLCategory.js index e3a168ba..dea610a9 100755 --- a/src/web/HTMLCategory.js +++ b/src/web/HTMLCategory.js @@ -33,13 +33,12 @@ HTMLCategory.prototype.addOperation = function(operation) { */ HTMLCategory.prototype.toHtml = function() { const catName = "cat" + this.name.replace(/[\s/-:_]/g, ""); - let html = "
\ - \ - " + this.name + "\ - \ -
    "; + let html = `
    + + ${this.name} + +
    +
      `; for (let i = 0; i < this.opList.length; i++) { html += this.opList[i].toStubHtml(); diff --git a/src/web/HTMLIngredient.js b/src/web/HTMLIngredient.js index 3f360f04..7f196814 100755 --- a/src/web/HTMLIngredient.js +++ b/src/web/HTMLIngredient.js @@ -62,7 +62,7 @@ HTMLIngredient.prototype.toHtml = function() { break; case "toggleString": html += "
      \ -
      - Edit + Edit
      @@ -159,15 +159,15 @@
      - - + +
      - - - + + +
    @@ -177,8 +177,8 @@
    - - + +
    @@ -208,11 +208,11 @@
    - - - - - + + + + +
    @@ -233,7 +233,7 @@
    - +
    to
    @@ -287,7 +287,7 @@
    @@ -392,8 +392,8 @@
@@ -418,7 +418,7 @@ @@ -549,7 +549,7 @@ diff --git a/src/web/stylesheets/layout/_controls.css b/src/web/stylesheets/layout/_controls.css index 20496425..cfc0b7f5 100644 --- a/src/web/stylesheets/layout/_controls.css +++ b/src/web/stylesheets/layout/_controls.css @@ -7,7 +7,7 @@ */ :root { - --controls-height: 120px; + --controls-height: 130px; --controls-division: 65%; } diff --git a/src/web/stylesheets/themes/_classic.css b/src/web/stylesheets/themes/_classic.css index 9aa9acdc..04abc394 100755 --- a/src/web/stylesheets/themes/_classic.css +++ b/src/web/stylesheets/themes/_classic.css @@ -8,12 +8,14 @@ :root, :root.classic { - --primary-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + --primary-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", + Roboto, "Helvetica Neue", Arial, sans-serif; --primary-font-colour: #333; --primary-font-size: 14px; --primary-line-height: 20px; - --fixed-width-font-family: "Consolas", monospace; + --fixed-width-font-family: SFMono-Regular, Menlo, Monaco, Consolas, + "Liberation Mono", "Courier New", monospace; --fixed-width-font-colour: inherit; --fixed-width-font-size: inherit; diff --git a/src/web/stylesheets/utils/_overrides.css b/src/web/stylesheets/utils/_overrides.css index cdc39601..b257efbf 100755 --- a/src/web/stylesheets/utils/_overrides.css +++ b/src/web/stylesheets/utils/_overrides.css @@ -13,30 +13,30 @@ a:focus { outline: none; } -.btn-default { +.btn-secondary { color: var(--btn-default-font-colour); background-color: var(--btn-default-bg-colour); border-color: var(--btn-default-border-colour); } -.btn-default:hover, -.btn-default:active, -.btn-default:hover:active, -.open>.dropdown-toggle.btn-default { +.btn-secondary:hover, +.btn-secondary:active, +.btn-secondary:hover:active, +.open>.dropdown-toggle.btn-secondary { color: var(--btn-default-hover-font-colour); background-color: var(--btn-default-hover-bg-colour); border-color: var(--btn-default-hover-border-colour); } -.btn-default:focus, -.open>.dropdown-toggle.btn-default:hover, -.open>.dropdown-toggle.btn-default:focus { +.btn-secondary:focus, +.open>.dropdown-toggle.btn-secondary:hover, +.open>.dropdown-toggle.btn-secondary:focus { color: var(--btn-default-font-colour); background-color: var(--btn-default-bg-colour); border-color: var(--btn-default-hover-border-colour); } -.btn-default[disabled]:hover { +.btn-secondary[disabled]:hover { background-color: var(--primary-background-colour); border-color: var(--primary-border-colour); }