parent
013bd3bcae
commit
b13d21f5bd
@ -1,13 +1,27 @@ |
||||
.address-link { |
||||
font-family: $font-family-monospace; |
||||
border: 1px solid $border-color; |
||||
white-space: nowrap; |
||||
display: inline-block; |
||||
|
||||
&__font { |
||||
font-family: $font-family-monospace; |
||||
} |
||||
|
||||
&__type { |
||||
padding: 0 3px; |
||||
} |
||||
|
||||
&__seperator { |
||||
margin: 0 2px; |
||||
} |
||||
|
||||
&__copy-icon { |
||||
color: $gray-800; |
||||
&__copy-button { |
||||
background-color: $gray-100; |
||||
appearance: none; |
||||
border: none; |
||||
border-color: transparent transparent transparent $border-color; |
||||
|
||||
i { |
||||
color:$gray-500 !important; |
||||
} |
||||
} |
||||
} |
||||
|
@ -1,12 +1,15 @@ |
||||
<div class="address-link"> |
||||
<%= if @address do %> |
||||
<i class="address-link__type fas fa-file"></i> |
||||
<%= link to: address_path(@conn, :show, @conn.assigns.locale, @address), |
||||
"data-toggle": "tooltip", |
||||
"data-placement": "top", |
||||
class: "address-link", |
||||
class: "address-link__font", |
||||
title: @address do %> |
||||
<%= @address |> hash |> String.slice(0..3) %><i class="fas fa-ellipsis-v address-link__seperator"></i><%= @address |> hash |> String.slice(-4..-1) %> |
||||
<% end %> |
||||
<button class="address-link__copy-icon" data-clipboard-text="<%= @address %>" aria-label="copy address"> |
||||
<i class="fa fa-clipboard"></i> |
||||
<button class="address-link__copy-button" data-clipboard-text="<%= @address %>" aria-label="copy address"> |
||||
<i class="fa fa-copy"></i> |
||||
</button> |
||||
<% end %> |
||||
</div> |
||||
|
Loading…
Reference in new issue