mirror of
https://github.com/ivabus/www
synced 2025-06-08 07:40:25 +03:00
36 lines
1.5 KiB
HTML
36 lines
1.5 KiB
HTML
|
|
<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://5ey2dx9k7l.execute-api.us-east-1.amazonaws.com/prod/v0/signups')
|
|
.then(res => res.json())
|
|
.then(res => {
|
|
const signups = res.signups ? res.signups.toLocaleString() : "";
|
|
$('#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>
|