From 8961af53a6e64caf3eb589da562a30f53323a4e2 Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 28 Sep 2020 11:01:26 +0300 Subject: [PATCH] xDai logo dark theme fix --- CHANGELOG.md | 2 +- .../assets/css/components/_footer.scss | 4 +++ .../assets/css/theme/_dai_variables.scss | 29 ++++++++++++++++- .../assets/css/theme/_dark-theme.scss | 4 +++ .../assets/static/images/xdai_logo.png | Bin 6596 -> 323 bytes .../assets/static/images/xdai_logo_dark.png | Bin 0 -> 618 bytes .../templates/chain/show.html.eex | 30 ++++++++++-------- apps/block_scout_web/priv/gettext/default.pot | 24 +++++++------- .../priv/gettext/en/LC_MESSAGES/default.po | 24 +++++++------- 9 files changed, 77 insertions(+), 40 deletions(-) create mode 100644 apps/block_scout_web/assets/static/images/xdai_logo_dark.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ff7711b1d..25a42aeddb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,7 +28,7 @@ - [#3256](https://github.com/poanetwork/blockscout/pull/3256) - Fix for invisible validator address at block page and wrong alert text color at xDai ### Chore -- [#3316](https://github.com/poanetwork/blockscout/pull/3316) - xDai smile logos +- [#3316](https://github.com/poanetwork/blockscout/pull/3316), [#3317](https://github.com/poanetwork/blockscout/pull/3317) - xDai smile logo - [#3315](https://github.com/poanetwork/blockscout/pull/3315) - Environment variable to disable Bridge market cap updater - [#3308](https://github.com/poanetwork/blockscout/pull/3308) - Fixate latest stable release of Elixir, Node, Postgres - [#3297](https://github.com/poanetwork/blockscout/pull/3297) - Actualize names of default chains diff --git a/apps/block_scout_web/assets/css/components/_footer.scss b/apps/block_scout_web/assets/css/components/_footer.scss index f2eae03c3f..c9250bb25b 100644 --- a/apps/block_scout_web/assets/css/components/_footer.scss +++ b/apps/block_scout_web/assets/css/components/_footer.scss @@ -115,3 +115,7 @@ $footer-logo-width: auto !default; } } } + +.footer-brand { + text-decoration: none !important; +} diff --git a/apps/block_scout_web/assets/css/theme/_dai_variables.scss b/apps/block_scout_web/assets/css/theme/_dai_variables.scss index 2b9cb7b107..31b68987f1 100644 --- a/apps/block_scout_web/assets/css/theme/_dai_variables.scss +++ b/apps/block_scout_web/assets/css/theme/_dai_variables.scss @@ -77,4 +77,31 @@ $api-text-monospace-color: #20446e; // Dark theme $dark-primary: #15bba6; $dark-secondary: #93d7ff; -$dark-primary-alternate: #15bba6; \ No newline at end of file +$dark-primary-alternate: #15bba6; + +.dark-theme-applied { + .navbar-logo { + content: url('/images/xdai_logo_dark.png') !important; + } + .footer-logo { + content: url('/images/xdai_logo_dark.png') !important; + } +} + +.navbar-brand .navbar-logo { + transform: translateZ(0); + -webkit-transform: translateZ(0); +} +.footer-logo { + transform: translateZ(0); + -webkit-transform: translateZ(0); +} + +.dark-theme-applied { + .navbar-brand .navbar-logo { + filter: brightness(1) invert(0) !important; + } + .footer-logo { + filter: brightness(1) invert(0) !important; + } +} \ No newline at end of file diff --git a/apps/block_scout_web/assets/css/theme/_dark-theme.scss b/apps/block_scout_web/assets/css/theme/_dark-theme.scss index f020cceae8..35ae9b1937 100644 --- a/apps/block_scout_web/assets/css/theme/_dark-theme.scss +++ b/apps/block_scout_web/assets/css/theme/_dark-theme.scss @@ -778,6 +778,10 @@ $labels-dark: #8a8dba; // header nav, labels color: #fff; } } + + .logo-text { + color: white; + } } .navbar-dark .navbar-toggler { diff --git a/apps/block_scout_web/assets/static/images/xdai_logo.png b/apps/block_scout_web/assets/static/images/xdai_logo.png index c882ea879aa10ce83fcfad01c0f844bd7dec3734..66a1db57e13047a57acbd43fa8856f63b83d0237 100644 GIT binary patch literal 323 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7?_xWRHv9tCXnI`@CkAK|NpNkFWK7D=t@8jn=f7pH~o~HJdY5&vj4f`3s+;0+xMD&~n zCIj)#Rxrmwe*wdnV{xE(W@IV`Ms$pdm=c(?w}I(`baf**vd?g8FceRW=m2xRFmXBL zzhMO@69e@H3};-E6v3Pe+!_pfH;!7uF&bQ>sf&eUi02cVnwo!Sa#JB$+d)C}gLuP~ z>jmJ9zCm*VL(a1#Z7^p7mj;98`iJ0ZAR*X+@y3~>VPKAeXaGY{++j{|<+7}SX~WF! zwU9DLYXQTOJ#E6^%EgzFHNjXsS`f?$abWbQk&;b3B0B zM?KPTU^GTXlh$Y+0ToE2rPgTiJ6ewnike-{{Q9qZuU@|W`rH2B*JP&m=k@K)PAf36 z)Gcqgzuq?w*ppekpTXqkY%g%-zYJKFzpT)42XmwtSr-(VP6b!~KER&H<&P14V2%l} zlzW_|1+M&Ohy^e#d%RHw%*kL8X*hN@1nhAG-31Ij$CE9=oC_Qp485yYLYg#D4vaJU zju(MB3j_lgq{4$CO`0vhZj@~QQ%I9Wc>#mTx@AJ(R!ki;WqE#NLm~-!3(aZyvZ)cnR{`3GiFmn2N`u5*( z#!=1u+&{PvJp3>h+@&Z7mLt1w?gsZF_<%)6`{8mcPziAd*n@eO_Pz*IC|KwKhr9Uh zzXU~ALAV3sj@f%pgUW#i8yc7jENYg6dNT)N8Cf6XebWPVU>XktGyA9oqd_#9iUxH) zc<}J?=jZQ!g7YjRlR4`j)(2_t)~SJV@MB;O{>XpeCpgOkM>clM+`Sr{o_7GV{2%55 zJ8&5R99zhH_AU!tM(6>{i2n?8{6P&8b6}w|d*|+1pf*S!uuwT}&+r^vNB~DXMy(he i0R?U!g2$%>8|!cER+wP_@x%hqREnpopUXO@geCxER#Vmh diff --git a/apps/block_scout_web/assets/static/images/xdai_logo_dark.png b/apps/block_scout_web/assets/static/images/xdai_logo_dark.png new file mode 100644 index 0000000000000000000000000000000000000000..234007abe914227a5e5db84dc48e0f5895086778 GIT binary patch literal 618 zcmeAS@N?(olHy`uVBq!ia0y~yU;;9k7?_xWRHv9tCXixDcl32+VA$Bt{U?zX$X7`A z2=ZlMs8VBKXlP+z_yrVdc)`F>YQVtoDuIE)Y6b&?c)^@qfi^%1o&cW^S0JsS>G~fG zcrI4x0{M(3L4Lsu4$p3+fjCLt?k>!NJU*X*9QG1VUsv`goHA_YlFRIQRY3CjMSdZS z=NFaF0$z~_Zo{kaTuGy{$%O$uv$4B(wM>t8dx3Q z@Zufw!3!TeEi{b#fSOcGTq8 <%= gettext "Market Cap" %> - <% total_market_cap = market_cap(@market_cap_calculation, @exchange_rate) %> - - - <%= if token_bridge_supply?() do %> - <% token_bridge_market_cap = total_market_cap_from_token_bridge(@exchange_rate) %> - <% omni_bridge_market_cap = total_market_cap_from_omni_bridge() %> - - +
+ <% total_market_cap = market_cap(@market_cap_calculation, @exchange_rate) %> + - <% end %> + <%= if token_bridge_supply?() do %> + <% token_bridge_market_cap = total_market_cap_from_token_bridge(@exchange_rate) %> + <% omni_bridge_market_cap = total_market_cap_from_omni_bridge() %> + + + + <% end %> +
<% end %> <% end %> diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index 230e195ad3..73447ac897 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -151,7 +151,7 @@ msgid "Anything not in this list is not supported. Click on the method to be tak msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:108 +#: lib/block_scout_web/templates/chain/show.html.eex:110 msgid "Average block time" msgstr "" @@ -234,7 +234,7 @@ msgid "BlockScout provides analytics data, API, and Smart Contract tools for the msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:150 +#: lib/block_scout_web/templates/chain/show.html.eex:152 #: lib/block_scout_web/templates/layout/_topnav.html.eex:34 #: lib/block_scout_web/templates/layout/_topnav.html.eex:38 msgid "Blocks" @@ -778,7 +778,7 @@ msgid "Success" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:89 +#: lib/block_scout_web/templates/chain/show.html.eex:91 #: lib/block_scout_web/templates/layout/app.html.eex:33 msgid "Tx/day" msgstr "" @@ -1066,7 +1066,7 @@ msgid "More internal transactions have come in" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:211 +#: lib/block_scout_web/templates/chain/show.html.eex:213 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:10 #: lib/block_scout_web/templates/transaction/index.html.eex:10 msgid "More transactions have come in" @@ -1309,7 +1309,7 @@ msgstr "" #: lib/block_scout_web/templates/address_transaction/index.html.eex:49 #: lib/block_scout_web/templates/address_validation/index.html.eex:22 #: lib/block_scout_web/templates/block_transaction/index.html.eex:23 -#: lib/block_scout_web/templates/chain/show.html.eex:154 +#: lib/block_scout_web/templates/chain/show.html.eex:156 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:19 #: lib/block_scout_web/templates/tokens/holder/index.html.eex:20 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:21 @@ -1323,7 +1323,7 @@ msgid "Something went wrong, click to reload." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:217 +#: lib/block_scout_web/templates/chain/show.html.eex:219 msgid "Something went wrong, click to retry." msgstr "" @@ -1452,7 +1452,7 @@ msgid "Total Supply" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:125 +#: lib/block_scout_web/templates/chain/show.html.eex:127 msgid "Total blocks" msgstr "" @@ -1592,12 +1592,12 @@ msgid "Version" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:149 +#: lib/block_scout_web/templates/chain/show.html.eex:151 msgid "View All Blocks" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:207 +#: lib/block_scout_web/templates/chain/show.html.eex:209 msgid "View All Transactions" msgstr "" @@ -1639,7 +1639,7 @@ msgid "WEI" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:133 +#: lib/block_scout_web/templates/chain/show.html.eex:135 msgid "Wallet addresses" msgstr "" @@ -1778,7 +1778,7 @@ msgid "Module" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:117 +#: lib/block_scout_web/templates/chain/show.html.eex:119 msgid "Total transactions" msgstr "" @@ -1866,7 +1866,7 @@ msgstr "" #: lib/block_scout_web/templates/address_transaction/index.html.eex:15 #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 #: lib/block_scout_web/templates/block_transaction/index.html.eex:18 -#: lib/block_scout_web/templates/chain/show.html.eex:208 +#: lib/block_scout_web/templates/chain/show.html.eex:210 #: lib/block_scout_web/templates/layout/_topnav.html.eex:53 #: lib/block_scout_web/views/address_view.ex:345 msgid "Transactions" diff --git a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po index 230e195ad3..73447ac897 100644 --- a/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po +++ b/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po @@ -151,7 +151,7 @@ msgid "Anything not in this list is not supported. Click on the method to be tak msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:108 +#: lib/block_scout_web/templates/chain/show.html.eex:110 msgid "Average block time" msgstr "" @@ -234,7 +234,7 @@ msgid "BlockScout provides analytics data, API, and Smart Contract tools for the msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:150 +#: lib/block_scout_web/templates/chain/show.html.eex:152 #: lib/block_scout_web/templates/layout/_topnav.html.eex:34 #: lib/block_scout_web/templates/layout/_topnav.html.eex:38 msgid "Blocks" @@ -778,7 +778,7 @@ msgid "Success" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:89 +#: lib/block_scout_web/templates/chain/show.html.eex:91 #: lib/block_scout_web/templates/layout/app.html.eex:33 msgid "Tx/day" msgstr "" @@ -1066,7 +1066,7 @@ msgid "More internal transactions have come in" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:211 +#: lib/block_scout_web/templates/chain/show.html.eex:213 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:10 #: lib/block_scout_web/templates/transaction/index.html.eex:10 msgid "More transactions have come in" @@ -1309,7 +1309,7 @@ msgstr "" #: lib/block_scout_web/templates/address_transaction/index.html.eex:49 #: lib/block_scout_web/templates/address_validation/index.html.eex:22 #: lib/block_scout_web/templates/block_transaction/index.html.eex:23 -#: lib/block_scout_web/templates/chain/show.html.eex:154 +#: lib/block_scout_web/templates/chain/show.html.eex:156 #: lib/block_scout_web/templates/pending_transaction/index.html.eex:19 #: lib/block_scout_web/templates/tokens/holder/index.html.eex:20 #: lib/block_scout_web/templates/tokens/instance/transfer/index.html.eex:21 @@ -1323,7 +1323,7 @@ msgid "Something went wrong, click to reload." msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:217 +#: lib/block_scout_web/templates/chain/show.html.eex:219 msgid "Something went wrong, click to retry." msgstr "" @@ -1452,7 +1452,7 @@ msgid "Total Supply" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:125 +#: lib/block_scout_web/templates/chain/show.html.eex:127 msgid "Total blocks" msgstr "" @@ -1592,12 +1592,12 @@ msgid "Version" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:149 +#: lib/block_scout_web/templates/chain/show.html.eex:151 msgid "View All Blocks" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:207 +#: lib/block_scout_web/templates/chain/show.html.eex:209 msgid "View All Transactions" msgstr "" @@ -1639,7 +1639,7 @@ msgid "WEI" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:133 +#: lib/block_scout_web/templates/chain/show.html.eex:135 msgid "Wallet addresses" msgstr "" @@ -1778,7 +1778,7 @@ msgid "Module" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/chain/show.html.eex:117 +#: lib/block_scout_web/templates/chain/show.html.eex:119 msgid "Total transactions" msgstr "" @@ -1866,7 +1866,7 @@ msgstr "" #: lib/block_scout_web/templates/address_transaction/index.html.eex:15 #: lib/block_scout_web/templates/block_transaction/index.html.eex:10 #: lib/block_scout_web/templates/block_transaction/index.html.eex:18 -#: lib/block_scout_web/templates/chain/show.html.eex:208 +#: lib/block_scout_web/templates/chain/show.html.eex:210 #: lib/block_scout_web/templates/layout/_topnav.html.eex:53 #: lib/block_scout_web/views/address_view.ex:345 msgid "Transactions"