mirror of
https://github.com/ivabus/www
synced 2024-11-26 03:55:06 +03:00
Placeholder for stats
This commit is contained in:
parent
f5f14d5823
commit
e5f1c229c5
1 changed files with 38 additions and 24 deletions
|
@ -1,24 +1,38 @@
|
|||
<script>
|
||||
try {
|
||||
fetch('https://app.tea.xyz/api/signups')
|
||||
.then(res => res.json())
|
||||
.then(res => {
|
||||
const signups = res.signups ? res.signups.toLocaleString() : ""
|
||||
if (!(localStorage['signup'] || '').match(/:::/)) {
|
||||
$('#count').html(signups)
|
||||
}
|
||||
$('#count1').html(signups)
|
||||
$('#count2').html(signups)
|
||||
$('#count3').html(signups)
|
||||
$('#count4').html(signups)
|
||||
$('#count5').html(signups)
|
||||
$('#count6').html(signups)
|
||||
$('#count7').html(signups)
|
||||
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "")
|
||||
$('#stat-one-small').html(res.repos ? res.repos.toLocaleString() : "")
|
||||
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "")
|
||||
})
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Add a 400px tall placeholder
|
||||
$('#count').html('<div style="height: 400px"></div>');
|
||||
$('#count1').html('<div style="height: 400px"></div>');
|
||||
$('#count2').html('<div style="height: 400px"></div>');
|
||||
$('#count3').html('<div style="height: 400px"></div>');
|
||||
$('#count4').html('<div style="height: 400px"></div>');
|
||||
$('#count5').html('<div style="height: 400px"></div>');
|
||||
$('#count6').html('<div style="height: 400px"></div>');
|
||||
$('#count7').html('<div style="height: 400px"></div>');
|
||||
$('#stat-one').html('<div style="height: 400px"></div>');
|
||||
$('#stat-one-small').html('<div style="height: 400px"></div>');
|
||||
$('#stat-two').html('<div style="height: 400px"></div>');
|
||||
|
||||
try {
|
||||
fetch('https://app.tea.xyz/api/signups')
|
||||
.then(res => res.json())
|
||||
.then(res => {
|
||||
const signups = res.signups ? res.signups.toLocaleString() : ""
|
||||
if (!(localStorage['signup'] || '').match(/:::/)) {
|
||||
$('#count').html(signups)
|
||||
}
|
||||
$('#count1').html(signups)
|
||||
$('#count2').html(signups)
|
||||
$('#count3').html(signups)
|
||||
$('#count4').html(signups)
|
||||
$('#count5').html(signups)
|
||||
$('#count6').html(signups)
|
||||
$('#count7').html(signups)
|
||||
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "")
|
||||
$('#stat-one-small').html(res.repos ? res.repos.toLocaleString() : "")
|
||||
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "")
|
||||
})
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue