From 5b04f221b5b2a0e12905160bce9d7d29b71c171a Mon Sep 17 00:00:00 2001 From: Yegor San Date: Thu, 5 Sep 2019 14:22:12 +0300 Subject: [PATCH 1/6] New theme for xUSDT created --- .../assets/css/theme/_variables.scss | 3 +- .../theme/_xusdt_variables-non-critical.scss | 7 ++ .../assets/css/theme/_xusdt_variables.scss | 85 +++++++++++++++++++ 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 apps/block_scout_web/assets/css/theme/_xusdt_variables-non-critical.scss create mode 100644 apps/block_scout_web/assets/css/theme/_xusdt_variables.scss diff --git a/apps/block_scout_web/assets/css/theme/_variables.scss b/apps/block_scout_web/assets/css/theme/_variables.scss index bff54cc6bf..48a617fa30 100644 --- a/apps/block_scout_web/assets/css/theme/_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_variables.scss @@ -1,5 +1,6 @@ @import "theme/base_variables"; -@import "neutral_variables"; +//@import "neutral_variables"; +@import "xusdt_variables"; // @import "dai_variables"; // @import "ethereum_classic_variables"; // @import "ethereum_variables"; diff --git a/apps/block_scout_web/assets/css/theme/_xusdt_variables-non-critical.scss b/apps/block_scout_web/assets/css/theme/_xusdt_variables-non-critical.scss new file mode 100644 index 0000000000..7f337f9bf5 --- /dev/null +++ b/apps/block_scout_web/assets/css/theme/_xusdt_variables-non-critical.scss @@ -0,0 +1,7 @@ +// general +$primary: #2b9f7a; +$secondary: #20745a; +$tertiary: #fff; +$additional-font: #fff; + +$btn-line-color: $secondary; // button border and font color && hover bg color \ No newline at end of file diff --git a/apps/block_scout_web/assets/css/theme/_xusdt_variables.scss b/apps/block_scout_web/assets/css/theme/_xusdt_variables.scss new file mode 100644 index 0000000000..d60c82ab72 --- /dev/null +++ b/apps/block_scout_web/assets/css/theme/_xusdt_variables.scss @@ -0,0 +1,85 @@ +// general +$primary: #2b9f7a; +$secondary: #20745a; +$tertiary: #fff; +$additional-font: #fff; + +$tile-body-a-color: $secondary; +$tile-type-block-color: $secondary; +$tile-type-progress-bar-color: $secondary; +a.tile-title { color: $secondary !important; } + +// footer +$footer-background-color: #282d31; +$footer-title-color: #fff; +$footer-text-color: $additional-font; +$footer-item-disc-color: $secondary; +$footer-social-icon-color: $secondary; + +// dashboard +$dashboard-line-color-price: #fff; // price left border + +$dashboard-banner-chart-legend-label-color: #fff; +$dashboard-stats-item-label-color: $dashboard-banner-chart-legend-label-color; +$dashboard-banner-chart-legend-value-color: #fff; // chart labels +$dashboard-stats-item-value-color: #fff; // stat values + +$dashboard-stats-item-border-color: $secondary; // stat border + +$dashboard-banner-gradient-start: $primary; // gradient begin + +$dashboard-banner-gradient-end: #289371; // gradient end + +$dashboard-banner-network-plain-container-background-color: #2ea780; // stats bg + + +// navigation +.navbar { box-shadow: 0px 0px 30px 0px rgba(21, 53, 80, 0.12); } // header shadow +$dropdown-menu-item-hover-color: $primary !default; +$dropdown-menu-item-hover-background: rgba($primary, .1) !default; +$header-icon-color-hover: $primary; +$header-icon-border-color-hover: $primary; + +// buttons +$btn-line-bg: #fff; // button bg +$btn-line-color: $primary; // button border and font color && hover bg color +$btn-copy-color: $primary; // btn copy +$btn-qr-color: $primary; // btn qr-code +$btn-address-card-icon-color: $primary; // btn address color + +//links & tile +$tile-body-a-color: $primary; +$tile-type-block-color: $primary; +$tile-type-progress-bar-color: $primary; +a.tile-title { color: $primary !important; } + +// card +$card-background-1: $primary; +$card-tab-active: $primary; + +.layout-container { + .dashboard-banner-container { + background-image: linear-gradient( + to bottom, + $dashboard-banner-gradient-start, + $dashboard-banner-gradient-end + ); + } +} + +// Badges +$badge-neutral-color: $primary; +$badge-neutral-background-color: rgba($primary, .1); +$api-text-monospace-color: $primary; + +// Tokens dropdown +.token-balance-dropdown[aria-labelledby="dropdown-tokens"] { + .dropdown-items .dropdown-item:hover { + color: $primary !important; + } +} + +// Dark theme +$dark-primary: #2b9f7a; +$dark-secondary: #20745a; +$dark-primary-alternate: #2b9f7a; \ No newline at end of file From f12ba4163cff81a2a3c3c9cdc95f8332253fe909 Mon Sep 17 00:00:00 2001 From: Yegor San Date: Thu, 5 Sep 2019 23:26:56 +0300 Subject: [PATCH 2/6] Final changes for xUSDT theme performed --- .../assets/css/theme/_variables.scss | 4 ++-- .../assets/css/theme/_xusdt_variables.scss | 22 ++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/apps/block_scout_web/assets/css/theme/_variables.scss b/apps/block_scout_web/assets/css/theme/_variables.scss index 48a617fa30..15571b454b 100644 --- a/apps/block_scout_web/assets/css/theme/_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_variables.scss @@ -1,6 +1,6 @@ @import "theme/base_variables"; -//@import "neutral_variables"; -@import "xusdt_variables"; +@import "neutral_variables"; +// @import "xusdt_variables"; // @import "dai_variables"; // @import "ethereum_classic_variables"; // @import "ethereum_variables"; diff --git a/apps/block_scout_web/assets/css/theme/_xusdt_variables.scss b/apps/block_scout_web/assets/css/theme/_xusdt_variables.scss index d60c82ab72..ac3b2fa4e0 100644 --- a/apps/block_scout_web/assets/css/theme/_xusdt_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_xusdt_variables.scss @@ -4,10 +4,10 @@ $secondary: #20745a; $tertiary: #fff; $additional-font: #fff; -$tile-body-a-color: $secondary; -$tile-type-block-color: $secondary; -$tile-type-progress-bar-color: $secondary; -a.tile-title { color: $secondary !important; } +$tile-body-a-color: $primary; +$tile-type-block-color: $primary; +$tile-type-progress-bar-color: $primary; +a.tile-title { color: $primary !important; } // footer $footer-background-color: #282d31; @@ -82,4 +82,16 @@ $api-text-monospace-color: $primary; // Dark theme $dark-primary: #2b9f7a; $dark-secondary: #20745a; -$dark-primary-alternate: #2b9f7a; \ No newline at end of file +$dark-primary-alternate: #2b9f7a; + +.dark-theme-applied .dashboard-banner-chart-legend .dashboard-banner-chart-legend-item:nth-child(1)::before { + background-color: white!important; +} + +.dark-theme-applied .dashboard-banner-chart-legend .dashboard-banner-chart-legend-item:nth-child(2)::before { + background-color: $primary!important; +} + +.dark-theme-applied .tile .tile-body a, .dark-theme-applied .tile span[data-address-hash] { + color: #2b9f7a; +} \ No newline at end of file From b79609511a7dce922d9fcab5c01077ce9818fea0 Mon Sep 17 00:00:00 2001 From: Yegor San Date: Fri, 6 Sep 2019 13:05:09 +0300 Subject: [PATCH 3/6] Logos added --- .../assets/static/images/xusdt-logo-footer.svg | 3 +++ apps/block_scout_web/assets/static/images/xusdt-logo-top.svg | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 apps/block_scout_web/assets/static/images/xusdt-logo-footer.svg create mode 100644 apps/block_scout_web/assets/static/images/xusdt-logo-top.svg diff --git a/apps/block_scout_web/assets/static/images/xusdt-logo-footer.svg b/apps/block_scout_web/assets/static/images/xusdt-logo-footer.svg new file mode 100644 index 0000000000..53763fdec4 --- /dev/null +++ b/apps/block_scout_web/assets/static/images/xusdt-logo-footer.svg @@ -0,0 +1,3 @@ + + + diff --git a/apps/block_scout_web/assets/static/images/xusdt-logo-top.svg b/apps/block_scout_web/assets/static/images/xusdt-logo-top.svg new file mode 100644 index 0000000000..1e0ac1b3c8 --- /dev/null +++ b/apps/block_scout_web/assets/static/images/xusdt-logo-top.svg @@ -0,0 +1,4 @@ + + + + From c93f93528457aec91c0165d19c59a005c1b220bd Mon Sep 17 00:00:00 2001 From: Yegor San Date: Fri, 6 Sep 2019 16:55:43 +0300 Subject: [PATCH 4/6] Added icons for new network, added non-critical value etc --- apps/block_scout_web/assets/css/_images-preload.scss | 1 + .../assets/css/components/_network-selector.scss | 3 +++ .../assets/css/theme/_variables-non-critical.scss | 1 + .../static/images/network-selector-icons/circle-xusdt.svg | 4 ++++ 4 files changed, 9 insertions(+) create mode 100644 apps/block_scout_web/assets/static/images/network-selector-icons/circle-xusdt.svg diff --git a/apps/block_scout_web/assets/css/_images-preload.scss b/apps/block_scout_web/assets/css/_images-preload.scss index 95f4633a56..031cf20888 100644 --- a/apps/block_scout_web/assets/css/_images-preload.scss +++ b/apps/block_scout_web/assets/css/_images-preload.scss @@ -13,4 +13,5 @@ body:after { url(/images/network-selector-icons/ropsten-testnet.svg) url(/images/network-selector-icons/xdai-chain.svg) url(/images/network-selector-icons/lukso-l14-testnet.svg) + url(/images/network-selector-icons/circle-xusdt.svg) }; \ No newline at end of file diff --git a/apps/block_scout_web/assets/css/components/_network-selector.scss b/apps/block_scout_web/assets/css/components/_network-selector.scss index 9df2d22164..ab6f38a4d4 100644 --- a/apps/block_scout_web/assets/css/components/_network-selector.scss +++ b/apps/block_scout_web/assets/css/components/_network-selector.scss @@ -280,6 +280,9 @@ $network-selector-item-icon-dimensions: 30px !default; &-lukso-l14-testnet { background-image: url(/images/network-selector-icons/lukso-l14-testnet.svg) } + &-xusdt-mainnet { + background-image: url(/images/network-selector-icons/circle-xusdt.svg) + } } .network-selector-item-title { diff --git a/apps/block_scout_web/assets/css/theme/_variables-non-critical.scss b/apps/block_scout_web/assets/css/theme/_variables-non-critical.scss index 232b9cc647..39762ec68a 100644 --- a/apps/block_scout_web/assets/css/theme/_variables-non-critical.scss +++ b/apps/block_scout_web/assets/css/theme/_variables-non-critical.scss @@ -1,5 +1,6 @@ @import "theme/base_variables"; @import "neutral_variables-non-critical"; +// @import "xusdt_variables-non-critical"; // @import "dai_variables-non-critical"; // @import "ethereum_classic_variables-non-critical"; // @import "ethereum_variables-non-critical"; diff --git a/apps/block_scout_web/assets/static/images/network-selector-icons/circle-xusdt.svg b/apps/block_scout_web/assets/static/images/network-selector-icons/circle-xusdt.svg new file mode 100644 index 0000000000..de660df5d8 --- /dev/null +++ b/apps/block_scout_web/assets/static/images/network-selector-icons/circle-xusdt.svg @@ -0,0 +1,4 @@ + + + + From 53af4f5843f00d5020a3c1aae39835686d1c254b Mon Sep 17 00:00:00 2001 From: Yegor San Date: Fri, 6 Sep 2019 17:12:00 +0300 Subject: [PATCH 5/6] Added changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e345f9216d..af33f5b9ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Current ### Features +- [#2672](https://github.com/poanetwork/blockscout/pull/2672) - added new theme for xUSDT - [#2555](https://github.com/poanetwork/blockscout/pull/2555) - find and show decoding candidates for logs - [#2596](https://github.com/poanetwork/blockscout/pull/2596) - support AuRa's empty step reward type - [#2561](https://github.com/poanetwork/blockscout/pull/2561) - Add token's type to the response of tokenlist method From 3b1c962a9d78a33626e083eac05f8301bf6b592b Mon Sep 17 00:00:00 2001 From: Yegor San Date: Fri, 6 Sep 2019 18:59:30 +0300 Subject: [PATCH 6/6] changed icon value to &-xusdt-chain --- .../assets/css/components/_network-selector.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/block_scout_web/assets/css/components/_network-selector.scss b/apps/block_scout_web/assets/css/components/_network-selector.scss index ab6f38a4d4..e3ffea33de 100644 --- a/apps/block_scout_web/assets/css/components/_network-selector.scss +++ b/apps/block_scout_web/assets/css/components/_network-selector.scss @@ -280,7 +280,7 @@ $network-selector-item-icon-dimensions: 30px !default; &-lukso-l14-testnet { background-image: url(/images/network-selector-icons/lukso-l14-testnet.svg) } - &-xusdt-mainnet { + &-xusdt-chain { background-image: url(/images/network-selector-icons/circle-xusdt.svg) } }