diff --git a/apps/explorer_web/assets/css/app.scss b/apps/explorer_web/assets/css/app.scss index 68d53c3c91..03e77f4465 100644 --- a/apps/explorer_web/assets/css/app.scss +++ b/apps/explorer_web/assets/css/app.scss @@ -19,12 +19,18 @@ $fa-font-path: "~@fortawesome/fontawesome-free/webfonts"; @import "node_modules/bootstrap/scss/root"; @import "node_modules/bootstrap/scss/reboot"; @import "node_modules/bootstrap/scss/grid"; +@import "node_modules/bootstrap/scss/utilities/spacing"; +@import "node_modules/bootstrap/scss/utilities/sizing"; +@import "node_modules/bootstrap/scss/utilities/display"; +@import "node_modules/bootstrap/scss/utilities/flex"; +@import "node_modules/bootstrap/scss/utilities/text"; // Bootstrap Components @import "node_modules/bootstrap/scss/dropdown"; @import "node_modules/bootstrap/scss/transitions"; @import "node_modules/bootstrap/scss/tables"; @import "node_modules/bootstrap/scss/nav"; +@import "node_modules/bootstrap/scss/card"; //Custom theme @import "theme/theme_ribbon"; diff --git a/apps/explorer_web/assets/css/components/_chain.scss b/apps/explorer_web/assets/css/components/_chain.scss index 4eeef4e647..ca864a52b6 100644 --- a/apps/explorer_web/assets/css/components/_chain.scss +++ b/apps/explorer_web/assets/css/components/_chain.scss @@ -22,14 +22,10 @@ .container__stats { - @extend %paper; display: flex; - padding: 15px; - width: 100%; font-size: 12px; text-align: center; flex-direction: row; - justify-content: space-around; img { display: inline-block; @@ -39,7 +35,7 @@ } svg { - width: 30px; + height: 30px; } path { @@ -49,8 +45,6 @@ .stroke { stroke: $primary; } - - } .graph__squares { @@ -67,22 +61,11 @@ } } -.graph-flex { - font-size: 12px; - display: flex; - justify-content: space-between; - margin-top: 25px; - color: $gray-500; -} - @media (min-width: $explorer-breakpoint-md) { .container__stats { - width: 15%; - flex-direction: column; - align-content: space-between; color: $gray-500; - margin: 10px 5px; + width: 16.67%; img { display: inline-block; @@ -90,11 +73,12 @@ margin-bottom: explorer-size(-2); text-align: center; } + } - div { - flex-grow: 1; - } + .container__graph { + flex-grow: 1; } + .chain { &__image { height: explorer-size(1); diff --git a/apps/explorer_web/assets/css/components/_footer.scss b/apps/explorer_web/assets/css/components/_footer.scss index 1aba12669c..8b6878a608 100644 --- a/apps/explorer_web/assets/css/components/_footer.scss +++ b/apps/explorer_web/assets/css/components/_footer.scss @@ -5,6 +5,7 @@ background: $gray-100; color:$gray-600; text-align: center; + margin-top: 15px; padding: 14px; height: 50px; diff --git a/apps/explorer_web/assets/css/theme/_poa_variables.scss b/apps/explorer_web/assets/css/theme/_poa_variables.scss index e0992d5eeb..51ffd7f4f6 100644 --- a/apps/explorer_web/assets/css/theme/_poa_variables.scss +++ b/apps/explorer_web/assets/css/theme/_poa_variables.scss @@ -276,7 +276,7 @@ $lead-font-weight: 300 !default; $small-font-size: 80% !default; -$text-muted: $gray-600 !default; +$text-muted: $gray-500 !default; $blockquote-small-color: $gray-600 !default; $blockquote-font-size: ($font-size-base * 1.25) !default; diff --git a/apps/explorer_web/assets/css/theme/_theme_ribbon.scss b/apps/explorer_web/assets/css/theme/_theme_ribbon.scss index 5659eb441b..1b9b792925 100644 --- a/apps/explorer_web/assets/css/theme/_theme_ribbon.scss +++ b/apps/explorer_web/assets/css/theme/_theme_ribbon.scss @@ -59,7 +59,7 @@ //Ribbon FLip Syles -.card { +.ribbon { width: 100%; height: 100%; transition: all .5s; diff --git a/apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex b/apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex index a0828756fa..aaddb2be32 100644 --- a/apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/address/overview.html.eex @@ -1,25 +1,34 @@ -
+

<%= gettext "Address" %>

-

<%= @address %>

-
-
-
- -
- - - - - - - - - - -
<%= gettext "Balance" %> -
<%= balance(@address) %>
-
<%= formatted_usd(@address, @exchange_rate) %>
-
<%= gettext "Number of Transactions" %><%= Cldr.Number.to_string!(@transaction_count) %>
- +

<%= @address %>

+ +
+
+
+
+ + + + + + + + + + + +
+ <%= gettext "Balance" %> + + <%= balance(@address) %>
+ <%= formatted_usd(@address, @exchange_rate) %> +
+ <%= gettext "Number of Transactions" %> + + <%= Cldr.Number.to_string!(@transaction_count) %> +
+
+
+
-
+ diff --git a/apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/index.html.eex b/apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/index.html.eex index ce1fb1a8f5..6af7a30f01 100644 --- a/apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/index.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/address_internal_transaction/index.html.eex @@ -1,114 +1,121 @@ -
+
+ <%= render ExplorerWeb.AddressView, "overview.html", assigns %> -
- -
-
-
diff --git a/apps/explorer_web/lib/explorer_web/templates/address_transaction/index.html.eex b/apps/explorer_web/lib/explorer_web/templates/address_transaction/index.html.eex index 601dad730b..30ccbe5e03 100644 --- a/apps/explorer_web/lib/explorer_web/templates/address_transaction/index.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/address_transaction/index.html.eex @@ -1,121 +1,127 @@ -
+
+ <%= render ExplorerWeb.AddressView, "overview.html", assigns %> -
- -
-
- -
- <%= pagination_links( - @conn, - @page, - ["en", @conn.params["address_id"]], - distance: 1, - filter: @conn.params["filter"], - first: true, - next: Phoenix.HTML.raw("›"), - path: &address_transaction_path/5, - previous: Phoenix.HTML.raw("‹"), - view_style: :bulma - ) %> -
+
diff --git a/apps/explorer_web/lib/explorer_web/templates/block/index.html.eex b/apps/explorer_web/lib/explorer_web/templates/block/index.html.eex index 7ebcad2c9e..5a6765ca05 100644 --- a/apps/explorer_web/lib/explorer_web/templates/block/index.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/block/index.html.eex @@ -1,4 +1,4 @@ -
+

Blocks

@@ -9,8 +9,8 @@ ) %>

-
-
+
+
diff --git a/apps/explorer_web/lib/explorer_web/templates/block_transaction/index.html.eex b/apps/explorer_web/lib/explorer_web/templates/block_transaction/index.html.eex index 5ffa4b3fb4..6a8d7368f2 100644 --- a/apps/explorer_web/lib/explorer_web/templates/block_transaction/index.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/block_transaction/index.html.eex @@ -1,188 +1,195 @@ -
-
+
+

<%= gettext("Block Details") %>

-

<%= @block.number %>

-
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- <%= gettext "Timestamp" %> - - <%= age(@block) %> (<%= formatted_timestamp(@block) %>) -
- <%= gettext "Transaction" %> - - <%= gettext "%{count} transactions in this block", count: @block_transaction_count %> -
- <%= gettext "Hash" %> - - <%= @block.hash %> -
- <%= gettext "Parent Hash" %> - - <%= link( - @block.parent_hash, - class: "block__link", - to: block_path(@conn, :show, @conn.assigns.locale, @block.number - 1) - ) %> -
- <%= gettext "Miner" %> - - <%= @block.miner %> -
- <%= gettext "Difficulty" %> - - <%= @block.difficulty |> Cldr.Number.to_string! %> -
+

<%= @block.number %>

+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ <%= gettext "Timestamp" %> + + <%= age(@block) %> (<%= formatted_timestamp(@block) %>) +
+ <%= gettext "Transaction" %> + + <%= gettext "%{count} transactions in this block", count: @block_transaction_count %> +
+ <%= gettext "Hash" %> + + <%= @block.hash %> +
+ <%= gettext "Parent Hash" %> + + <%= link( + @block.parent_hash, + class: "block__link", + to: block_path(@conn, :show, @conn.assigns.locale, @block.number - 1) + ) %> +
+ <%= gettext "Miner" %> + + <%= @block.miner %> +
+ <%= gettext "Difficulty" %> + + <%= @block.difficulty |> Cldr.Number.to_string! %> +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ <%= gettext "Total Difficulty" %> + + <%= @block.total_difficulty |> Cldr.Number.to_string! %> +
+ <%= gettext "Size" %> + + <%= Cldr.Unit.new(:byte, @block.size) |> Cldr.Unit.to_string! %> +
+ <%= gettext "Gas Used" %> + + <%= @block.gas_used |> Cldr.Number.to_string! %> (<%= (@block.gas_used / @block.gas_limit) |> Cldr.Number.to_string!(format: "#.#%") %>) +
+ <%= gettext "Gas Limit" %> + + <%= @block.gas_limit |> Cldr.Number.to_string! %> +
+ <%= gettext "Nonce" %> + + <%= @block.nonce %> +
+
+
-
- - - - - - - - - - - - - - - - - - + + + +
+
+
+ +
+
+
- <%= gettext "Total Difficulty" %> - - <%= @block.total_difficulty |> Cldr.Number.to_string! %> -
- <%= gettext "Size" %> - - <%= Cldr.Unit.new(:byte, @block.size) |> Cldr.Unit.to_string! %> -
- <%= gettext "Gas Used" %> - - <%= @block.gas_used |> Cldr.Number.to_string! %> (<%= (@block.gas_used / @block.gas_limit) |> Cldr.Number.to_string!(format: "#.#%") %>) -
- <%= gettext "Gas Limit" %> - - <%= @block.gas_limit |> Cldr.Number.to_string! %> -
+ - - + + + + + + + + + + <%= for transaction <- @page.entries do %> + + + + + + + + + + + <% end %>
- <%= gettext "Nonce" %> + + <%= gettext "Status" %> - <%= @block.nonce %> - <%= gettext "Hash" %><%= gettext "Block" %><%= gettext "Age" %><%= gettext "From" %><%= gettext "To" %><%= gettext "Value" %>
+
+
+ <%= render ExplorerWeb.TransactionView, "_link.html", conn: @conn, transaction: transaction %> + + <%= link( + transaction.block, + to: block_path(@conn, :show, @conn.assigns.locale, transaction.block) + ) %> + + <%= transaction.block.timestamp |> Timex.from_now %> + + <%= render ExplorerWeb.AddressView, "_link.html", conn: @conn, address: transaction.from_address %> + + <%= render ExplorerWeb.AddressView, "_link.html", conn: @conn, address: transaction.to_address %> + + <%= ExplorerWeb.TransactionView.value(transaction) %> +
-
-
- -
-
-
- - - - - - - - - - - - - - - <%= for transaction <- @page.entries do %> - - - - - - - - - - - <% end %> - -
- <%= gettext "Status" %> - <%= gettext "Hash" %><%= gettext "Block" %><%= gettext "Age" %><%= gettext "From" %><%= gettext "To" %><%= gettext "Value" %>
-
-
- <%= render ExplorerWeb.TransactionView, "_link.html", conn: @conn, transaction: transaction %> - - <%= link( - transaction.block, - to: block_path(@conn, :show, @conn.assigns.locale, transaction.block) - ) %> - - <%= transaction.block.timestamp |> Timex.from_now %> - - <%= render ExplorerWeb.AddressView, "_link.html", conn: @conn, address: transaction.from_address %> - - <%= render ExplorerWeb.AddressView, "_link.html", conn: @conn, address: transaction.to_address %> - - <%= ExplorerWeb.TransactionView.value(transaction) %> -
-
-
-
- <%= pagination_links( - @conn, - @page, - ["en", @conn.params["block_id"]], - distance: 1, - first: true, - next: Phoenix.HTML.raw("›"), - path: &block_transaction_path/5, - previous: Phoenix.HTML.raw("‹"), - view_style: :bulma - ) %>
+ +
+ <%= pagination_links( + @conn, + @page, + ["en", @conn.params["block_id"]], + distance: 1, + first: true, + next: Phoenix.HTML.raw("›"), + path: &block_transaction_path/5, + previous: Phoenix.HTML.raw("‹"), + view_style: :bulma + ) %>
+
diff --git a/apps/explorer_web/lib/explorer_web/templates/chain/_blocks.html.eex b/apps/explorer_web/lib/explorer_web/templates/chain/_blocks.html.eex index 2eba08f53c..4963d97113 100644 --- a/apps/explorer_web/lib/explorer_web/templates/chain/_blocks.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/chain/_blocks.html.eex @@ -1,31 +1,31 @@ -
-
+
+
<%= link(gettext("View All"), to: block_path(@conn, :index, Gettext.get_locale), class: "button button--secondary button--xsmall u-float-right") %> -

<%= gettext "Blocks" %>

+

<%= gettext "Blocks" %>

+ + + + + + + + + + <%= for block <- @chain.blocks do %> + + + + + + + + <% end %> + +
<%= gettext "Height" %><%= gettext "Age" %><%= gettext "TXNs" %><%= gettext "Gas" %><%= gettext "Validator" %>
+ " /> + <%= link(block, to: block_path(@conn, :show, @conn.assigns.locale, block)) %> + <%= block.timestamp |> Timex.from_now %><%= block.transactions |> Enum.count %><%= block.gas_used |> Cldr.Number.to_string! %> + <%= render ExplorerWeb.AddressView, "_link.html", conn: @conn, address: block.miner %> +
- - - - - - - - - - <%= for block <- @chain.blocks do %> - - - - - - - - <% end %> - -
<%= gettext "Height" %><%= gettext "Age" %><%= gettext "TXNs" %><%= gettext "Gas" %><%= gettext "Validator" %>
- " /> - <%= link(block, to: block_path(@conn, :show, @conn.assigns.locale, block)) %> - <%= block.timestamp |> Timex.from_now %><%= block.transactions |> Enum.count %><%= block.gas_used |> Cldr.Number.to_string! %> - <%= render ExplorerWeb.AddressView, "_link.html", conn: @conn, address: block.miner %> -
diff --git a/apps/explorer_web/lib/explorer_web/templates/chain/_transactions.html.eex b/apps/explorer_web/lib/explorer_web/templates/chain/_transactions.html.eex index f9eedac3d1..ed4d1bff71 100644 --- a/apps/explorer_web/lib/explorer_web/templates/chain/_transactions.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/chain/_transactions.html.eex @@ -1,32 +1,32 @@ -
-
+
+
<%= link(gettext("View All"), to: transaction_path(@conn, :index, Gettext.get_locale), class: "button button--secondary button--xsmall u-float-right") %> -

<%= gettext "Transactions" %>

+

<%= gettext "Transactions" %>

+ + + + + + + + + + <%= for transaction <- @chain.transactions do %> + + + + + + + + <% end %> + +
<%= gettext "TX Hash" %><%= gettext "From" %><%= gettext "To" %><%= gettext "Value" %> (<%= gettext "Ether" %>)<%= gettext "Age" %>
+ <%= render ExplorerWeb.TransactionView, "_link.html", conn: @conn, transaction: transaction %> + + <%= render ExplorerWeb.AddressView, "_link.html", conn: @conn, address: transaction.from_address %> + + <%= render ExplorerWeb.AddressView, "_link.html", conn: @conn, address: transaction.to_address %> + <%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> <%= transaction.block.timestamp |> Timex.from_now() %>
- - - - - - - - - - <%= for transaction <- @chain.transactions do %> - - - - - - - - <% end %> - -
<%= gettext "TX Hash" %><%= gettext "From" %><%= gettext "To" %><%= gettext "Value" %> (<%= gettext "Ether" %>)<%= gettext "Age" %>
- <%= render ExplorerWeb.TransactionView, "_link.html", conn: @conn, transaction: transaction %> - - <%= render ExplorerWeb.AddressView, "_link.html", conn: @conn, address: transaction.from_address %> - - <%= render ExplorerWeb.AddressView, "_link.html", conn: @conn, address: transaction.to_address %> - <%= ExplorerWeb.TransactionView.value(transaction, include_label: false) %> <%= transaction.block.timestamp |> Timex.from_now() %>
diff --git a/apps/explorer_web/lib/explorer_web/templates/chain/show.html.eex b/apps/explorer_web/lib/explorer_web/templates/chain/show.html.eex index 756951f1a6..bf9277ffdd 100644 --- a/apps/explorer_web/lib/explorer_web/templates/chain/show.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/chain/show.html.eex @@ -1,49 +1,59 @@ -
-
-
-
- <%= render ExplorerWeb.IconsView, "_block_icon.html", assigns %> -
<%= gettext("Block") %>
-
#<%= @chain.number %>
-
-
- <%= render ExplorerWeb.IconsView, "_hourglass_icon.html", assigns %> -
<%= gettext("Last Block") %>
-
<%= @chain.timestamp |> Timex.from_now() %>
-
-
-
<%= render ExplorerWeb.IconsView, "_guage_icon.html", assigns %>
-
<%= gettext("Avg Block Time") %>
- <%= @chain.average_time |> Timex.format_duration(:humanized) %> -
-
- <%= render ExplorerWeb.IconsView, "_transaction_icon.html", assigns %> -
<%= gettext("TPM") %>
-
<%= @chain.transaction_velocity |> Cldr.Number.to_string! %>
-
-
-
- -
-
-
- <%= gettext "Price" %>
- <%= format_exchange_rate(@exchange_rate) %> +
+
+
+
+
+ <%= render ExplorerWeb.IconsView, "_block_icon.html", assigns %> +
<%= gettext("Block") %>
+
#<%= @chain.number %>
+
+
+ <%= render ExplorerWeb.IconsView, "_hourglass_icon.html", assigns %> +
<%= gettext("Last Block") %>
+
<%= @chain.timestamp |> Timex.from_now() %>
-
-
- <%= gettext "Market Cap" %>
- <%= format_market_cap(@exchange_rate) %> +
+
<%= render ExplorerWeb.IconsView, "_guage_icon.html", assigns %>
+
<%= gettext("Avg Block Time") %>
+ <%= @chain.average_time |> Timex.format_duration(:humanized) %>
-
- <%= gettext "24h Volume" %>
- <%= format_volume_24h(@exchange_rate) %> +
+ <%= render ExplorerWeb.IconsView, "_transaction_icon.html", assigns %> +
<%= gettext("TPM") %>
+
<%= @chain.transaction_velocity |> Cldr.Number.to_string! %>
-
-
-
- <%= render ExplorerWeb.ChainView, "_blocks.html", assigns %> - <%= render ExplorerWeb.ChainView, "_transactions.html", assigns %> + +
+
+ +
+
+
+ <%= gettext "Price" %>
+ $<%= format_exchange_rate(@exchange_rate) %> <%= gettext "USD" %> +
+
+
+ <%= gettext "Market Cap" %>
+ $<%= format_market_cap(@exchange_rate) %> <%= gettext "USD" %> +
+
+ <%= gettext "24h Volume" %>
+ $<%= format_volume_24h(@exchange_rate) %> <%= gettext "USD" %> +
+
+
+
+
+ +
+
+ <%= render ExplorerWeb.ChainView, "_blocks.html", assigns %> +
+
+ <%= render ExplorerWeb.ChainView, "_transactions.html", assigns %> +
+
diff --git a/apps/explorer_web/lib/explorer_web/templates/layout/_ribbon.html.eex b/apps/explorer_web/lib/explorer_web/templates/layout/_ribbon.html.eex index 0cc275ce66..15b8bc8677 100644 --- a/apps/explorer_web/lib/explorer_web/templates/layout/_ribbon.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/layout/_ribbon.html.eex @@ -1,5 +1,5 @@
-
+
<%= link to: chain_path(@conn, :show), "data-test": "header_logo" do %> " /> <% end %> @@ -34,7 +34,7 @@
-
+
<%= link to: chain_path(@conn, :show) do %> " /> <% end %> diff --git a/apps/explorer_web/lib/explorer_web/templates/layout/_sidebar.html.eex b/apps/explorer_web/lib/explorer_web/templates/layout/_sidebar.html.eex index 56c367dc06..e8f0f6164f 100644 --- a/apps/explorer_web/lib/explorer_web/templates/layout/_sidebar.html.eex +++ b/apps/explorer_web/lib/explorer_web/templates/layout/_sidebar.html.eex @@ -5,7 +5,7 @@ " /> <% end %>
-