Skip to content

Commit

Permalink
fix count
Browse files Browse the repository at this point in the history
  • Loading branch information
alidevjimmy committed Sep 11, 2024
1 parent 813cb99 commit d4300db
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 32 deletions.
3 changes: 1 addition & 2 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,6 @@ html {
max-width: 100%;
margin: 0;
padding: 0;
font-size: 60px;
font-weight: 600;
letter-spacing: 0;
line-height: 1;
Expand All @@ -768,7 +767,7 @@ html {

.fn__gradient_title,
.fn__maintitle.big {
font-size: 40px;
/* font-size: 40px; */
}

.fn_cs_slider .slider_top li.prev {
Expand Down
38 changes: 21 additions & 17 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class="mt-14 font-bold md:text-lg text-neutral-50">
Pactus is an open source, layer-1 blockchain technology with a<br class="hidden md:block" />
revolutionary, secure, Solid State Proof of Stake Consensus.<br class="hidden md:block" />
Come join us and build a decentralized future together!
Come join us and build a decentralized future together!
</h1>
</div>
<div class="mt-10 text-center items-center w-full">
Expand All @@ -34,8 +34,7 @@
<div class="circle"></div>
</div>
</a>
<a target="_blank" href="/community" type="button"
class="btn-join-community">
<a target="_blank" href="/community" type="button" class="btn-join-community">
<strong>Join community</strong>
<div id="container-stars">
<div id="stars"></div>
Expand Down Expand Up @@ -178,32 +177,36 @@
<ul>
<li class="p-0">
<div class="item">
<h3 class="fn__gradient_title"><span class="prefix"></span><span data-from="0"
class="fn_cs_counter counter" id="totalBlocks">---</span><span class="suffix"></span></h3>
<h3 class="fn__gradient_title text-2xl"><span class="prefix"></span><span data-from="0"
class="fn_cs_counter counter p-3" id="totalBlocks">---
</span><span class="suffix"></span></h3>
<p>Blocks</p>
<div class="divider hidden sm:block"></div>
</div>
</li>
<li class="p-0 sm:pl-[130px]">
<div class="item">
<h3 class="fn__gradient_title"><span class="prefix"></span><span data-from="0"
class="fn_cs_counter counter" id="totalTransactions">---</span><span class="suffix"></span></h3>
<h3 class="fn__gradient_title text-2xl"><span class="prefix"></span><span data-from="0"
class="fn_cs_counter counter p-3" id="totalTransactions">---
</span><span class="suffix"></span></h3>
<p>Transactions</p>
<div class="divider hidden md:block mr-5" style="left: 90% !important;"></div>
</div>
</li>
<li class="p-0 md:pl-[130px]">
<div class="item">
<h3 class="fn__gradient_title"><span class="prefix"></span><span data-from="0"
class="fn_cs_counter counter" id="totalAccounts">---</span><span class="suffix"></span></h3>
<h3 class="fn__gradient_title text-2xl"><span class="prefix"></span><span data-from="0"
class="fn_cs_counter counter p-3" id="totalAccounts">---
</span><span class="suffix"></span></h3>
<p>Accounts</p>
<div class="divider hidden sm:block"></div>
</div>
</li>
<li class="p-0 sm:pl-[130px]">
<div class="item">
<h3 class="fn__gradient_title"><span class="prefix"></span><span data-from="0"
class="fn_cs_counter counter" id="totalValidators">---</span><span class="suffix"></span></h3>
<h3 class="fn__gradient_title text-2xl"><span class="prefix"></span><span data-from="0"
class="fn_cs_counter counter p-3" id="totalValidators">---
</span><span class="suffix"></span></h3>
<p>Validators</p>
<div class="divider hidden sm:block"></div>
</div>
Expand Down Expand Up @@ -704,8 +707,6 @@ <h6 class="font-medium text-sm mt-2">
<script>
$(document).ready(function () {

$('.counter').countUp();

function updateCountsFromAPI() {
$.ajax({
url: 'https://api.pacviewer.com/v1/counts',
Expand All @@ -717,10 +718,13 @@ <h6 class="font-medium text-sm mt-2">
'Access-Control-Allow-Headers': 'Content-Type',
},
success: function (data) {
$('#totalBlocks').text(data.totalBlocks || 0);
$('#totalTransactions').text(data.totalTransactions || 0);
$('#totalAccounts').text(data.totalAccounts || 0);
$('#totalValidators').text(data.totalValidators || 0);

$('#totalBlocks').text(data.data.totalBlocks || 0);
$('#totalTransactions').text(data.data.totalTransactions || 0);
$('#totalAccounts').text(data.data.totalAccounts || 0);
$('#totalValidators').text(data.data.totalValidators || 0);
$('.counter').countUp();

},
error: function (xhr, status, error) {
console.error('Error fetching data:', error);
Expand Down
22 changes: 9 additions & 13 deletions static/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -3509,9 +3509,6 @@ html:has(.drawer-toggle:checked) {
.top-7 {
top: 1.75rem;
}
.top-\[-12rem\] {
top: -12rem;
}
.top-\[26px\] {
top: 26px;
}
Expand Down Expand Up @@ -3861,10 +3858,6 @@ html:has(.drawer-toggle:checked) {
-moz-column-gap: 0.25rem;
column-gap: 0.25rem;
}
.gap-x-2 {
-moz-column-gap: 0.5rem;
column-gap: 0.5rem;
}
.gap-x-3 {
-moz-column-gap: 0.75rem;
column-gap: 0.75rem;
Expand Down Expand Up @@ -4077,6 +4070,9 @@ html:has(.drawer-toggle:checked) {
.p-2 {
padding: 0.5rem;
}
.p-3 {
padding: 0.75rem;
}
.p-4 {
padding: 1rem;
}
Expand Down Expand Up @@ -4987,7 +4983,6 @@ html {
max-width: 100%;
margin: 0;
padding: 0;
font-size: 60px;
font-weight: 600;
letter-spacing: 0;
line-height: 1;
Expand All @@ -5009,7 +5004,7 @@ html {

.fn__gradient_title,
.fn__maintitle.big {
font-size: 40px;
/* font-size: 40px; */
}

.fn_cs_slider .slider_top li.prev {
Expand Down Expand Up @@ -6558,10 +6553,6 @@ html {
left: 14rem;
}

.lg\:top-\[-20rem\] {
top: -20rem;
}

.lg\:ml-0 {
margin-left: 0px;
}
Expand Down Expand Up @@ -6614,6 +6605,11 @@ html {
font-size: 1.5rem;
line-height: 2rem;
}

.lg\:text-xl {
font-size: 1.25rem;
line-height: 1.75rem;
}
}

.\[\&\>\*\]\:w-full>* {
Expand Down

0 comments on commit d4300db

Please sign in to comment.