diff --git a/apps/block_scout_web/assets/css/app.scss b/apps/block_scout_web/assets/css/app.scss index c5d07c2ae2..b4c9649d66 100644 --- a/apps/block_scout_web/assets/css/app.scss +++ b/apps/block_scout_web/assets/css/app.scss @@ -1,12 +1,10 @@ @import "./mixins"; /* Phoenix flash messages */ - .alert:empty { - display: none; + display: none; } - /* This file is for your main application css. */ // Font Awesome @@ -109,18 +107,15 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts"; @import "components/radio_big"; @import "components/btn_no_border"; @import "components/custom_tooltips_block_details"; -@import "components/_erc721_token_image_container"; - @import "theme/dark-theme"; - :export { - dashboardBannerChartAxisFontColor: $dashboard-banner-chart-axis-font-color; - dashboardLineColorMarket: $dashboard-line-color-market; - dashboardLineColorPrice: $dashboard-line-color-price; - primary: $primary; - secondary: $secondary; - darkprimary: $dark-primary; - darksecondary: $dark-secondary; + dashboardBannerChartAxisFontColor: $dashboard-banner-chart-axis-font-color; + dashboardLineColorMarket: $dashboard-line-color-market; + dashboardLineColorPrice: $dashboard-line-color-price; + primary: $primary; + secondary: $secondary; + darkprimary: $dark-primary; + darksecondary: $dark-secondary; } diff --git a/apps/block_scout_web/assets/css/components/_custom_tooltips_block_details.scss b/apps/block_scout_web/assets/css/components/_custom_tooltips_block_details.scss index 883b699cab..91eb3ad01a 100644 --- a/apps/block_scout_web/assets/css/components/_custom_tooltips_block_details.scss +++ b/apps/block_scout_web/assets/css/components/_custom_tooltips_block_details.scss @@ -10,7 +10,7 @@ position: absolute; width: 50%; background-color: white; - color: #5c34a2; + color: black; text-align: center; border-radius: 6px; left: 25%; @@ -22,7 +22,7 @@ margin-bottom: 15px; opacity: 0; transition: opacity 0.5s; - @include media-breakpoint-down(sm) { + @include media-breakpoint-down(lg) { left: 60%; } } @@ -60,9 +60,9 @@ margin-bottom: 15px; opacity: 0; transition: opacity 0.5s; - @include media-breakpoint-down(sm) { - padding: 9px 10px; + @include media-breakpoint-down(lg) { bottom: 100%; + padding: 9px 10px; } } diff --git a/apps/block_scout_web/assets/css/components/_dashboard-banner.scss b/apps/block_scout_web/assets/css/components/_dashboard-banner.scss index 5a6dcc46bd..0fb092044d 100644 --- a/apps/block_scout_web/assets/css/components/_dashboard-banner.scss +++ b/apps/block_scout_web/assets/css/components/_dashboard-banner.scss @@ -24,7 +24,6 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa height: auto; } } - .dashboard-banner { display: flex; justify-content: space-between; @@ -34,7 +33,6 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa flex-direction: column; } } - .dashboard-banner-network-graph { flex-grow: 1; padding: 15px 0 0 0; @@ -44,7 +42,6 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa padding-top: 20px; } } - .dashboard-banner-chart { flex-grow: 1; margin: 0 0 35px 0; @@ -62,7 +59,6 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa width: 100%; } } - .dashboard-banner-chart-legend { display: flex; /* grid-template-columns: 1fr 1fr; */ @@ -121,7 +117,6 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa line-height: 1.2; } } - .dashboard-banner-network-plain-container { align-items: center; align-self: flex-end; @@ -169,7 +164,6 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa } } } - .dashboard-banner-network-stats { column-gap: 25px; display: grid; @@ -198,4 +192,4 @@ $dashboard-banner-chart-axis-font-color: $dashboard-stats-item-value-color !defa font-size: 0.9rem; } } -} \ No newline at end of file +} diff --git a/apps/block_scout_web/assets/css/components/_erc721_token_image_container.scss b/apps/block_scout_web/assets/css/components/_erc721_token_image_container.scss deleted file mode 100644 index b5f9cb6a92..0000000000 --- a/apps/block_scout_web/assets/css/components/_erc721_token_image_container.scss +++ /dev/null @@ -1,10 +0,0 @@ -/* ERC721 image block */ -.erc721-image { - display: flex; - justify-content: center; -} - -.erc721-image img { - height: 80px; -} -/* ERC721 image block end */ diff --git a/apps/block_scout_web/assets/css/components/_transaction.scss b/apps/block_scout_web/assets/css/components/_transaction.scss index b8d7b82e39..15bc0f0e93 100644 --- a/apps/block_scout_web/assets/css/components/_transaction.scss +++ b/apps/block_scout_web/assets/css/components/_transaction.scss @@ -1,46 +1,53 @@ .transaction-bottom-panel { - display: flex; - flex-direction: column; - @media (min-width: 768px) { - flex-direction: row; - justify-content: space-between; - align-items: flex-end; - } + display: flex; + flex-direction: column; + @media (min-width: 768px) { + flex-direction: row; + justify-content: space-between; + align-items: flex-end; + } } .transaction-bottom-panel { - display: flex; - flex-direction: column; - @media (min-width: 768px) { - flex-direction: row; - justify-content: space-between; - align-items: flex-end; - } + display: flex; + flex-direction: column; + @media (min-width: 768px) { + flex-direction: row; + justify-content: space-between; + align-items: flex-end; + } } .download-all-transactions { - text-align: center; - color: #a3a9b5; - font-size: 13px; - margin-top: 10px; - @media (min-width: 768px) { - margin-top: 30px; - } - .download-all-transactions-link { - display: inline-flex; - align-items: center; - text-decoration: none; - svg { - position: relative; - margin-left: 2px; - top: -3px; - left: 3px; - path { - fill: $primary; - } - } - &:hover { - text-decoration: underline; - } - } + text-align: center; + color: #a3a9b5; + font-size: 13px; + margin-top: 10px; + @media (min-width: 768px) { + margin-top: 30px; + } + .download-all-transactions-link { + display: inline-flex; + align-items: center; + text-decoration: none; + svg { + position: relative; + margin-left: 2px; + top: -3px; + left: 3px; + path { + fill: $primary; + } + } + &:hover { + text-decoration: underline; + } + } +} + +.block-detail-number { + width: 25%; + @include media-breakpoint-down(sm) { + width: 60%; + } } \ No newline at end of file diff --git a/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex index 26fa5ba725..42bfb43986 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex @@ -4,50 +4,35 @@
-

+

<%= gettext("%{block_type} Details", block_type: block_type(@block)) %>

- - - -

- - <%= if block_type(@block) == "Block" do %> - + +

+ <%= if block_type(@block) == "Block" do %> <%= gettext("Block Height: %{height}", height: @block.number) %> <%= if @block.number == 0, do: "- " <> gettext("Genesis Block")%> <% else %> <%= gettext("%{block_type} Height:", block_type: block_type(@block)) %> <%= link(@block, to: block_path(BlockScoutWeb.Endpoint, :show, @block.number)) %> - <% end %> - + <% end %>

-
<%= gettext "%{count} Transactions", count: @block_transaction_count %> - <%= if @block.size do %> <%= Cldr.Unit.new(:byte, @block.size) |> cldr_unit_to_string!() %> <% end %> -
-
- - -
- -
<%= gettext "Hash" %>
- +
+
<%= gettext "Hash" %>
<%= to_string(@block.hash) %>
-
- <%= unless @block.number == 0 do %> @@ -95,6 +80,9 @@ <%= link( gettext("Position %{index}", index: index), class: "transaction__link", + "data-toggle": "tooltip", + "data-placement": "top" , + "data-original-title": "Index position(s) of referenced stale blocks." , "data-test": "uncle_link", "data-uncle-hash": to_string(relation.uncle_hash), to: block_path(@conn, :show, relation.uncle_hash) @@ -103,14 +91,13 @@
<% end %> - <%= if show_reward?(@block.rewards) do %> -
+
<%= gettext "Gas Used" %>
- <%= @block.gas_used |> BlockScoutWeb.Cldr.Number.to_string! %> - (<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> BlockScoutWeb.Cldr.Number.to_string!(format: "#.#%") %>) + <%= @block.gas_used |> BlockScoutWeb.Cldr.Number.to_string! %> + (<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> BlockScoutWeb.Cldr.Number.to_string!(format: "#.#%") %>)
@@ -153,8 +140,8 @@ <%= if show_reward?(@block.rewards) do %>

<%= gettext "Block Rewards" %>

-
- Amount of distributed reward. Miners receive a static block reward + Tx fees + uncle fees. +
+ <%= for block_reward <- @block.rewards do %>

<%= block_reward_text(block_reward) %> <%= format_wei_value(block_reward.reward, :ether) %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex index c362d18d43..c4fbdc2af2 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/tokens/overview/_details.html.eex @@ -71,7 +71,7 @@ <%= if total_supply?(@token) do %>
-
+

<%= gettext "Total Supply" %>

diff --git a/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex index 7b112377f3..70162a3be8 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/transaction_internal_transaction/index.html.eex @@ -23,10 +23,4 @@ <%= render BlockScoutWeb.CommonComponentsView, "_pagination_container.html", position: "bottom", cur_page_number: "1", show_pagination_limit: true, data_next_page_button: true, data_prev_page_button: true %>

- - - - - - \ No newline at end of file diff --git a/apps/block_scout_web/priv/gettext/default.pot b/apps/block_scout_web/priv/gettext/default.pot index c2c324f51e..5bbd00fa38 100644 --- a/apps/block_scout_web/priv/gettext/default.pot +++ b/apps/block_scout_web/priv/gettext/default.pot @@ -23,7 +23,7 @@ msgid "%{block_type} Details" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:19 +#: lib/block_scout_web/templates/block/overview.html.eex:15 msgid "%{block_type} Height:" msgstr "" @@ -33,7 +33,7 @@ msgid "%{block_type}s" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:27 +#: lib/block_scout_web/templates/block/overview.html.eex:21 #: lib/block_scout_web/templates/chain/_block.html.eex:11 msgid "%{count} Transactions" msgstr "" @@ -152,7 +152,7 @@ msgid "Block Confirmations" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:17 +#: lib/block_scout_web/templates/block/overview.html.eex:13 msgid "Block Height: %{height}" msgstr "" @@ -349,7 +349,7 @@ msgid "Details" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:70 +#: lib/block_scout_web/templates/block/overview.html.eex:55 msgid "Difficulty" msgstr "" @@ -422,15 +422,15 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_tile.html.eex:56 -#: lib/block_scout_web/templates/block/overview.html.eex:117 -#: lib/block_scout_web/templates/block/overview.html.eex:171 +#: lib/block_scout_web/templates/block/overview.html.eex:104 +#: lib/block_scout_web/templates/block/overview.html.eex:158 msgid "Gas Limit" msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_tile.html.eex:61 -#: lib/block_scout_web/templates/block/overview.html.eex:110 -#: lib/block_scout_web/templates/block/overview.html.eex:165 +#: lib/block_scout_web/templates/block/overview.html.eex:97 +#: lib/block_scout_web/templates/block/overview.html.eex:152 msgid "Gas Used" msgstr "" @@ -446,7 +446,7 @@ msgid "Gwei" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:45 +#: lib/block_scout_web/templates/block/overview.html.eex:33 msgid "Hash" msgstr "" @@ -524,7 +524,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_tile.html.eex:38 -#: lib/block_scout_web/templates/block/overview.html.eex:133 +#: lib/block_scout_web/templates/block/overview.html.eex:120 #: lib/block_scout_web/templates/chain/_block.html.eex:15 msgid "Miner" msgstr "" @@ -574,7 +574,7 @@ msgid "No" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:85 +#: lib/block_scout_web/templates/block/overview.html.eex:70 #: lib/block_scout_web/templates/transaction/overview.html.eex:79 msgid "Nonce" msgstr "" @@ -608,7 +608,7 @@ msgid "Parameters" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:55 +#: lib/block_scout_web/templates/block/overview.html.eex:40 msgid "Parent Hash" msgstr "" @@ -625,7 +625,7 @@ msgid "Pending Transactions" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:96 +#: lib/block_scout_web/templates/block/overview.html.eex:81 msgid "Position %{index}" msgstr "" @@ -838,7 +838,7 @@ msgid "Top Accounts - %{subnetwork} Explorer" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:79 +#: lib/block_scout_web/templates/block/overview.html.eex:64 msgid "Total Difficulty" msgstr "" @@ -901,7 +901,7 @@ msgid "Twitter" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:92 +#: lib/block_scout_web/templates/block/overview.html.eex:77 #: lib/block_scout_web/templates/layout/_topnav.html.eex:38 msgid "Uncles" msgstr "" @@ -1274,7 +1274,7 @@ msgid "Validator Info" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:155 +#: lib/block_scout_web/templates/block/overview.html.eex:142 msgid "Block Rewards" msgstr "" @@ -1386,7 +1386,7 @@ msgid "Copy Source Code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:17 +#: lib/block_scout_web/templates/block/overview.html.eex:13 msgid "Genesis Block" msgstr "" 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 dd60e9394d..eb8d71480d 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 @@ -23,7 +23,7 @@ msgid "%{block_type} Details" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:19 +#: lib/block_scout_web/templates/block/overview.html.eex:15 msgid "%{block_type} Height:" msgstr "" @@ -33,7 +33,7 @@ msgid "%{block_type}s" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:27 +#: lib/block_scout_web/templates/block/overview.html.eex:21 #: lib/block_scout_web/templates/chain/_block.html.eex:11 msgid "%{count} Transactions" msgstr "" @@ -152,7 +152,7 @@ msgid "Block Confirmations" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:17 +#: lib/block_scout_web/templates/block/overview.html.eex:13 msgid "Block Height: %{height}" msgstr "" @@ -349,7 +349,7 @@ msgid "Details" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:70 +#: lib/block_scout_web/templates/block/overview.html.eex:55 msgid "Difficulty" msgstr "" @@ -422,15 +422,15 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_tile.html.eex:56 -#: lib/block_scout_web/templates/block/overview.html.eex:117 -#: lib/block_scout_web/templates/block/overview.html.eex:171 +#: lib/block_scout_web/templates/block/overview.html.eex:104 +#: lib/block_scout_web/templates/block/overview.html.eex:158 msgid "Gas Limit" msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_tile.html.eex:61 -#: lib/block_scout_web/templates/block/overview.html.eex:110 -#: lib/block_scout_web/templates/block/overview.html.eex:165 +#: lib/block_scout_web/templates/block/overview.html.eex:97 +#: lib/block_scout_web/templates/block/overview.html.eex:152 msgid "Gas Used" msgstr "" @@ -446,7 +446,7 @@ msgid "Gwei" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:45 +#: lib/block_scout_web/templates/block/overview.html.eex:33 msgid "Hash" msgstr "" @@ -524,7 +524,7 @@ msgstr "" #, elixir-format #: lib/block_scout_web/templates/block/_tile.html.eex:38 -#: lib/block_scout_web/templates/block/overview.html.eex:133 +#: lib/block_scout_web/templates/block/overview.html.eex:120 #: lib/block_scout_web/templates/chain/_block.html.eex:15 msgid "Miner" msgstr "" @@ -574,7 +574,7 @@ msgid "No" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:85 +#: lib/block_scout_web/templates/block/overview.html.eex:70 #: lib/block_scout_web/templates/transaction/overview.html.eex:79 msgid "Nonce" msgstr "" @@ -608,7 +608,7 @@ msgid "Parameters" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:55 +#: lib/block_scout_web/templates/block/overview.html.eex:40 msgid "Parent Hash" msgstr "" @@ -625,7 +625,7 @@ msgid "Pending Transactions" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:96 +#: lib/block_scout_web/templates/block/overview.html.eex:81 msgid "Position %{index}" msgstr "" @@ -838,7 +838,7 @@ msgid "Top Accounts - %{subnetwork} Explorer" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:79 +#: lib/block_scout_web/templates/block/overview.html.eex:64 msgid "Total Difficulty" msgstr "" @@ -901,7 +901,7 @@ msgid "Twitter" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:92 +#: lib/block_scout_web/templates/block/overview.html.eex:77 #: lib/block_scout_web/templates/layout/_topnav.html.eex:38 msgid "Uncles" msgstr "" @@ -1275,7 +1275,7 @@ msgid "Validator Info" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:155 +#: lib/block_scout_web/templates/block/overview.html.eex:142 msgid "Block Rewards" msgstr "" @@ -1387,7 +1387,7 @@ msgid "Copy Source Code" msgstr "" #, elixir-format -#: lib/block_scout_web/templates/block/overview.html.eex:17 +#: lib/block_scout_web/templates/block/overview.html.eex:13 msgid "Genesis Block" msgstr ""