(fix) block address text color

pull/1844/head
Gabriel Rodriguez Alsina 6 years ago
parent 062496f938
commit 654d8cf212
  1. 4
      apps/block_scout_web/assets/css/components/_address-overview.scss
  2. 5
      apps/block_scout_web/assets/css/components/_card.scss
  3. 26
      apps/block_scout_web/lib/block_scout_web/templates/block/overview.html.eex

@ -48,6 +48,10 @@
font-weight: bold; font-weight: bold;
line-height: 1.2; line-height: 1.2;
margin: 0 0 12px; margin: 0 0 12px;
&:last-child {
margin-bottom: 0;
}
} }
.address-current-balance { .address-current-balance {

@ -17,6 +17,11 @@ $card-background-1-text-color: #fff !default;
.card-background-1 { .card-background-1 {
background-color: $card-background-1; background-color: $card-background-1;
color: $card-background-1-text-color; color: $card-background-1-text-color;
a,
a:hover {
color: $card-background-1-text-color;
}
} }
.card-header { .card-header {

@ -99,7 +99,6 @@
<span class="text-muted"> (<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> Cldr.Number.to_string!(format: "#.#%") %>) </span> <span class="text-muted"> (<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> Cldr.Number.to_string!(format: "#.#%") %>) </span>
</dt> </dt>
</dl> </dl>
<dl class="row mb-0"> <dl class="row mb-0">
<dt class="col-sm-3 text-muted"><%= gettext "Gas Limit" %></dt> <dt class="col-sm-3 text-muted"><%= gettext "Gas Limit" %></dt>
<dd class="col-sm-9"> <dd class="col-sm-9">
@ -113,31 +112,29 @@
</div> </div>
<div class="col-md-12 col-lg-4 d-flex flex-column flex-md-row flex-lg-column"> <div class="col-md-12 col-lg-4 d-flex flex-column flex-md-row flex-lg-column">
<!-- Validator --> <!-- Validator -->
<div class="card card-background-1 flex-grow-1"> <div class="card card-background-1 flex-grow-1">
<div class="card-body"> <div class="card-body card-body-flex-column-space-between">
<h2 class="card-title balance-card-title"> <%= gettext "Miner" %> </h2> <h2 class="card-title balance-card-title"><%= gettext "Miner" %></h2>
<div class="text-right"> <div class="text-right">
<!-- Validator's Name --> <!-- Validator's Name -->
<h3 class="text-truncate"> <h3 class="address-balance-text text-truncate">
<%= render BlockScoutWeb.AddressView, <%= render BlockScoutWeb.AddressView,
"_link.html", "_link.html",
address: @block.miner, address: @block.miner,
contract: false, contract: false,
class: "" %> class: "" %>
</h3> </h3>
<!-- Validator's address hash -->
<span class="text-truncate"> </span>
</div> </div>
</div> </div>
</div> </div>
<!-- Validator Reward or Gas--> <!-- Validator Reward or Gas-->
<div class="card flex-grow-1 ml-0 ml-md-5 ml-lg-0"> <div class="card flex-grow-1 ml-0 ml-md-5 ml-lg-0">
<div class="card-body"> <div class="card-body card-body-flex-column-space-between">
<%= if show_reward?(@block.rewards) do %> <%= if show_reward?(@block.rewards) do %>
<h2 class="card-title"> <%= gettext "Block Rewards" %> </h2> <h2 class="card-title balance-card-title"><%= gettext "Block Rewards" %></h2>
<%= for block_reward <- @block.rewards do %> <%= for block_reward <- @block.rewards do %>
<dl class="row"> <dl class="row">
<dt class="col-sm-5 text-muted"><%= block_reward_text(block_reward) %></dt> <dt class="col-sm-5 text-muted"><%= block_reward_text(block_reward) %></dt>
@ -147,16 +144,13 @@
</dl> </dl>
<% end %> <% end %>
<% else %> <% else %>
<h2 class="card-title"> <%= gettext "Gas Used" %> </h2> <h2 class="card-title balance-card-title"><%= gettext "Gas Used" %></h2>
<div class="text-right"> <div class="text-right">
<!-- Gas Used --> <h3 class="address-balance-text">
<h3>
<%= @block.gas_used |> Cldr.Number.to_string! %> <%= @block.gas_used |> Cldr.Number.to_string! %>
<span class="text-muted"> (<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> Cldr.Number.to_string!(format: "#.#%") %>) </span> <span class="text-muted">(<%= (Decimal.to_integer(@block.gas_used) / Decimal.to_integer(@block.gas_limit)) |> Cldr.Number.to_string!(format: "#.#%") %>)</span>
</h3> </h3>
<!-- Gas Limit --> <p class="address-current-balance"><%= @block.gas_limit |> Cldr.Number.to_string! %><%= gettext "Gas Limit" %></p>
<span class="text-muted"> <%= @block.gas_limit |> Cldr.Number.to_string! %> <%= gettext "Gas Limit" %> </span>
</div> </div>
<% end %> <% end %>
</div> </div>

Loading…
Cancel
Save