Skip to content

Commit b1acfef

Browse files
committed
improve how donations are shown
1 parent 5825991 commit b1acfef

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

LongevityWorldCup.Website/wwwroot/index.html

+19-3
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,9 @@
320320
.btc-status {
321321
font-size: 1.5rem;
322322
font-weight: bold;
323-
text-align: center;
324-
margin: 2rem 0;
323+
text-align: right;
324+
margin: 1rem 0;
325+
display: inline-block;
325326
}
326327

327328
/* BTC address text */
@@ -373,6 +374,7 @@
373374

374375
.btc-status {
375376
font-size: 1.2rem;
377+
margin: 0;
376378
}
377379
}
378380

@@ -452,7 +454,15 @@ <h2><i class="fa-brands fa-btc"></i> Contribute</h2>
452454
</span>
453455
</p>
454456
<div class="btc-status">
455-
Raised: <span id='current-btc'>0.23</span> BTC / Target: <span id='goal-btc'>1</span> BTC
457+
<div style="display: grid; grid-template-columns: auto auto; gap: 1rem; text-align: left;">
458+
<div>Raised:</div>
459+
<div style="text-align: right;"><span id="current-btc">0.0021</span> BTC</div>
460+
</div>
461+
<hr style="border: none; border-top: 1px solid #000; margin: 0.5rem 0;">
462+
<div style="display: grid; grid-template-columns: auto auto; gap: 1rem; text-align: left;">
463+
<div>Target:</div>
464+
<div style="text-align: right;"><span id="goal-btc">0.01</span> BTC</div>
465+
</div>
456466
</div>
457467
<div class="btc-address">
458468
<a id="btcAddressLink" href="#" target="_blank" rel="noopener" title="View Bitcoin donations" aria-label="View the Bitcoin donation address on mempool.space">
@@ -676,16 +686,22 @@ <h2><i class="fas fa-calendar-alt"></i> Once/Year Newsletter</h2>
676686
let displayPrizeFundBTC;
677687
if (prizeFundBTC >= 10) {
678688
displayPrizeFundBTC = prizeFundBTC.toFixed(0);
689+
goalBTC = goalBTC.toFixed(0);
679690
} else if (prizeFundBTC >= 1) {
680691
displayPrizeFundBTC = prizeFundBTC.toFixed(1);
692+
goalBTC = goalBTC.toFixed(1);
681693
} else if (prizeFundBTC >= 0.1) {
682694
displayPrizeFundBTC = prizeFundBTC.toFixed(2);
695+
goalBTC = goalBTC.toFixed(2);
683696
} else if (prizeFundBTC >= 0.01) {
684697
displayPrizeFundBTC = prizeFundBTC.toFixed(3);
698+
goalBTC = goalBTC.toFixed(3);
685699
} else if (prizeFundBTC >= 0.001) {
686700
displayPrizeFundBTC = prizeFundBTC.toFixed(4);
701+
goalBTC = goalBTC.toFixed(4);
687702
} else if (prizeFundBTC >= 0.0001) {
688703
displayPrizeFundBTC = prizeFundBTC.toFixed(5);
704+
goalBTC = goalBTC.toFixed(5);
689705
}
690706

691707
document.getElementById('current-btc').textContent = displayPrizeFundBTC;

0 commit comments

Comments
 (0)