Show sats instead of BTC on donation page, refactor CSS
* Show sats instead of BTC on donation page * Use number delimiters on both donation page and wallet page * Refactor donation page CSS into Tailwind directives
This commit is contained in:
parent
dd49d1208f
commit
9abdab2274
@ -1,40 +0,0 @@
|
|||||||
ul.donations {
|
|
||||||
list-style: none;
|
|
||||||
|
|
||||||
li {
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
display: grid;
|
|
||||||
grid-row-gap: 0.5rem;
|
|
||||||
grid-column-gap: 2rem;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
grid-template-areas:
|
|
||||||
"date amount-btc"
|
|
||||||
"public-name amounts-fiat";
|
|
||||||
|
|
||||||
h3 {
|
|
||||||
grid-area: "date";
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin-bottom: 0;
|
|
||||||
|
|
||||||
&.amount-btc {
|
|
||||||
grid-area: amount-btc;
|
|
||||||
text-align: right;
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
&.amounts-fiat {
|
|
||||||
grid-area: amounts-fiat;
|
|
||||||
text-align: right;
|
|
||||||
font-family: monospace;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
color: #888;
|
|
||||||
}
|
|
||||||
&.public-name {
|
|
||||||
grid-area: public-name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,4 +1,4 @@
|
|||||||
// version 3
|
// version 4
|
||||||
@import "tailwindcss/base";
|
@import "tailwindcss/base";
|
||||||
@import "tailwindcss/components";
|
@import "tailwindcss/components";
|
||||||
@import "tailwindcss/utilities";
|
@import "tailwindcss/utilities";
|
||||||
|
@ -8,19 +8,22 @@
|
|||||||
|
|
||||||
<section>
|
<section>
|
||||||
<% if @donations.any? %>
|
<% if @donations.any? %>
|
||||||
<ul class="donations">
|
<ul class="donations list-none">
|
||||||
<% @donations.each do |donation| %>
|
<% @donations.each do |donation| %>
|
||||||
<li>
|
<li class="mb-8 grid gap-y-2 gap-x-8 grid-cols-2 items-center">
|
||||||
<h3>
|
<h3 class="mb-0">
|
||||||
<%= donation.paid_at.strftime("%B %d, %Y") %>
|
<%= donation.paid_at.strftime("%B %d, %Y") %>
|
||||||
</h3>
|
</h3>
|
||||||
<p class="amount-btc">
|
<p class="row-span-2 font-mono text-right mb-0">
|
||||||
<%= sats_to_btc donation.amount_sats %> BTC
|
<span class="text-xl">
|
||||||
|
<%= number_with_delimiter donation.amount_sats %> sats
|
||||||
|
</span>
|
||||||
|
<br>
|
||||||
|
<span class="text-sm text-gray-500">
|
||||||
|
(~ <%= number_to_currency donation.amount_eur / 100, unit: "" %> EUR)
|
||||||
|
</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="amounts-fiat">
|
<p class="mb-0">
|
||||||
(~ <%= number_to_currency donation.amount_eur / 100, unit: "" %> EUR)
|
|
||||||
</p>
|
|
||||||
<p class="public-name">
|
|
||||||
<% if donation.public_name.present? %>
|
<% if donation.public_name.present? %>
|
||||||
Public name: <%= donation.public_name %>
|
Public name: <%= donation.public_name %>
|
||||||
<% else %>
|
<% else %>
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="md:col-span-4 mt-4 md:mt-0">
|
<div class="md:col-span-4 mt-4 md:mt-0">
|
||||||
<p class="font-mono md:text-right p-4 bg-gray-100 shadow rounded-lg overflow-hidden">
|
<p class="font-mono md:text-right mb-0 p-4 border border-gray-300 rounded-lg overflow-hidden">
|
||||||
<% if @balance %>
|
<% if @balance %>
|
||||||
<span class="text-xl"><%= @balance %> sats</span><br>
|
<span class="text-xl"><%= number_with_delimiter @balance %> sats</span><br>
|
||||||
<span class="text-sm text-gray-500">Available balance</span>
|
<span class="text-sm text-gray-500">Available balance</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<span class="text-xl">n/a sats</span><br>
|
<span class="text-xl">n/a sats</span><br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user