From d0b064ba8577eda644c3e84bf3c31ccd59477250 Mon Sep 17 00:00:00 2001 From: Ryan Arthur Date: Tue, 4 Sep 2018 13:10:46 -0400 Subject: [PATCH] Refactor button class names --- .../assets/css/components/_button.scss | 29 +++-- .../assets/css/theme/_base_variables.scss | 3 +- .../templates/address_contract/index.html.eex | 8 +- .../new.html.eex | 8 +- .../index.html.eex | 4 +- .../templates/address_token/index.html.eex | 122 ++++++++++++++++++ .../address_transaction/index.html.eex | 4 +- .../templates/api_docs/_action_tile.html.eex | 8 +- .../templates/block/index.html.eex | 2 +- .../block_transaction/index.html.eex | 2 +- .../templates/chain/show.html.eex | 4 +- .../pending_transaction/index.html.eex | 2 +- .../smart_contract/_functions.html.eex | 2 +- .../templates/tokens/token/show.html.eex | 2 +- .../templates/transaction/index.html.eex | 2 +- .../index.html.eex | 2 +- .../templates/transaction_log/index.html.eex | 2 +- .../transaction_token_transfer/index.html.eex | 2 +- 18 files changed, 166 insertions(+), 42 deletions(-) create mode 100644 apps/block_scout_web/lib/block_scout_web/templates/address_token/index.html.eex diff --git a/apps/block_scout_web/assets/css/components/_button.scss b/apps/block_scout_web/assets/css/components/_button.scss index 3143caf4c8..63855d5fe9 100644 --- a/apps/block_scout_web/assets/css/components/_button.scss +++ b/apps/block_scout_web/assets/css/components/_button.scss @@ -10,15 +10,15 @@ -webkit-transition: all 0.25s; transition: all 0.25s; - &--primary { + &-primary { background-color: $primary; color: $white; border: 1px solid $primary; &:hover, &:focus { - background-color: $primary; - border-color: $primary; + background-color: darken($primary, 10%); + border-color: darken($primary, 10%); text-decoration: none; } @@ -29,50 +29,51 @@ } } - &--secondary { + &-secondary { border: 1px solid $tertiary; color: $tertiary; font-weight: 400; &:hover, &:focus { - background-color: darken($tertiary, 20%); - border-color: darken($tertiary, 20%); + background-color: darken($tertiary, 10%); + border-color: darken($tertiary, 10%); color: $white; text-decoration: none; outline: none !important; } } - &--xsmall { + &-xs { font-size: 11px; padding: 6px 9px 6px !important; } - &--small { + &-sm { font-size: 12px; padding: 10px 20px 10px; } - &--medium { + &-md { font-size: 1.5rem; padding: 15px 30px 15px; } - &--large { + &-lg { font-size: 1.5rem; padding: 20px 60px 20px; } // Block button -// -------------------------------------------------- +// ------------------------- - &--block { + &-block { display: block; width: 100%; } - &--disabled { + &-disabled, + &:disabled, { background-color: $gray-300; color: $gray-500; text-decoration: none; @@ -81,6 +82,6 @@ } // Vertically space out multiple block buttons -.button--block + .button--block { +.button-block + .button-block { margin-top: 5px; } diff --git a/apps/block_scout_web/assets/css/theme/_base_variables.scss b/apps/block_scout_web/assets/css/theme/_base_variables.scss index d580533a77..d92427e068 100644 --- a/apps/block_scout_web/assets/css/theme/_base_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_base_variables.scss @@ -31,7 +31,8 @@ $grays: map-merge(( $blue: #4786ff !default; $indigo: #5b33a1 !default; -$purple: #9987fc !default; +// $purple: #9987fc !default; +$purple: #997fdc !default; $pink: #e83e8c !default; $red: #c74d39 !default; $orange: #ef9a60 !default; diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex index ce78dd567d..713d74a0f3 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract/index.html.eex @@ -47,7 +47,7 @@ <%= link( gettext("Verify and Publish"), to: address_verify_contract_path(@conn, :new, @conn.params["address_id"]), - class: "button button--primary button--sm float-right ml-3", + class: "button button-primary button-sm float-right ml-3", "data-test": "verify_and_publish" ) %> <% end %> @@ -72,7 +72,7 @@

Contract source code

- @@ -90,7 +90,7 @@

Contract ABI

- @@ -110,7 +110,7 @@

Contract creation code

- diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex index c92532b98a..30f484a6cd 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_contract_verification/new.html.eex @@ -53,15 +53,15 @@ name="button" id="loading" disabled="true" - class="d-none px-4 position-absolute button button--primary button--sm mr-2"> + class="d-none px-4 position-absolute button button-primary button-sm mr-2"> <%= gettext("loading.....") %> - <%= submit "Verify and publish", class: "button button--primary button--sm mr-2", "data-loading": "animation" %> - <%= reset "Reset", class: "button button--secondary button--sm mr-2" %> + <%= submit "Verify and publish", class: "button button-primary button-sm mr-2", "data-loading": "animation" %> + <%= reset "Reset", class: "button button-secondary button-sm mr-2" %> <%= link( "Cancel", to: address_contract_path(@conn, :index, @conn.params["address_id"]), - class: "button button--sm") %> + class: "button button-sm") %> <% end %>
diff --git a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex index 35d0c4af3c..3472571c01 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/address_internal_transaction/index.html.eex @@ -89,7 +89,7 @@