This commit is contained in:
parent
dc5d9e06bc
commit
ef7e7f03aa
1 changed files with 11 additions and 2 deletions
|
@ -12,9 +12,18 @@
|
||||||
<p style="font-size: clamp(1.25rem, 4vw, 1.5rem); line-height: 1.1">Teď potřebujeme vaší podporu</p>
|
<p style="font-size: clamp(1.25rem, 4vw, 1.5rem); line-height: 1.1">Teď potřebujeme vaší podporu</p>
|
||||||
<br />
|
<br />
|
||||||
<div class="text-right w-min mx-auto">
|
<div class="text-right w-min mx-auto">
|
||||||
<div class="fundraiser-progress-bar w-full"></div>
|
<div id="progressBar" class="fundraiser-progress-bar w-full"></div>
|
||||||
<p>vybráno 4 500 Kč z 180 000 Kč</p>
|
<p id="amount">vybráno 4 500 Kč z 180 000 Kč</p>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
(async function(){
|
||||||
|
const resp = await fetch('https://ha.nolog.cz/fundraising/darujme-stats');
|
||||||
|
const data = await resp.json();
|
||||||
|
progressBar.setAttribute('style', '--filled: ' + Math.round(data.projectStats.collectedAmountEstimate.cents / 18000000 * 100) + '%')
|
||||||
|
const amount = Math.round(data.projectStats.collectedAmountEstimate.cents / 100).toLocaleString('cs-CZ');
|
||||||
|
amount.textContent = "vybráno " + amount + " Kč z 180 000 Kč";
|
||||||
|
})()
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex justify-center max-md:flex-wrap gap-3">
|
<div class="flex justify-center max-md:flex-wrap gap-3">
|
||||||
|
|
Loading…
Reference in a new issue