From 9345b8b8a0cb58b7cb154f3ff9df3de56b73bbbe Mon Sep 17 00:00:00 2001 From: Ryan Arthur Date: Wed, 23 May 2018 15:33:22 -0400 Subject: [PATCH] Apply Bootstrap cards to the Block Details page --- .../block_transaction/index.html.eex | 350 +++++++++--------- 1 file changed, 178 insertions(+), 172 deletions(-) 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..59d8687bb5 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,117 +1,121 @@ -
-
+
+

<%= 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! %> -
-
-
- - - - - - - - - - - - - - - - - - - - - - - -
- <%= 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 %> -
+

<%= @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 %> +
+
+
-
-
+
+ +
- -
-
- - - - - - - - - - - - - - - <%= for transaction <- @page.entries do %> + +
+
+
- <%= gettext "Status" %> - <%= gettext "Hash" %><%= gettext "Block" %><%= gettext "Age" %><%= gettext "From" %><%= gettext "To" %><%= gettext "Value" %>
+ - - - - - - - - + + + + + + + + - <% end %> - -
-
-
- <%= 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) %> - + <%= gettext "Status" %> + <%= gettext "Hash" %><%= gettext "Block" %><%= gettext "Age" %><%= gettext "From" %><%= gettext "To" %><%= gettext "Value" %>
+ + + <%= for transaction <- @page.entries do %> + + +
+ + + <%= 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) %> + + + <% end %> + + +
- -
- <%= 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 + ) %>
+