mirror of
https://github.com/ivabus/www
synced 2024-11-22 14:15:06 +03:00
fetch stats from server
This commit is contained in:
parent
0b87514ba5
commit
9926f2318c
1 changed files with 2 additions and 14 deletions
|
@ -89,6 +89,8 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
|||
$('#count5').html(signups)
|
||||
$('#count6').html(signups)
|
||||
$('#count7').html(signups)
|
||||
$('#stat-one').html(res.repos ? res.repos.toLocaleString() : "")
|
||||
$('#stat-two').html(res.maintainers ? res.maintainers.toLocaleString() : "")
|
||||
})
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
|
@ -192,17 +194,3 @@ integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+
|
|||
}
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
fetch('stats.json')
|
||||
.then(res => res.json())
|
||||
.then((out) => {
|
||||
//Debugging + Reference
|
||||
console.log(out);
|
||||
document.getElementById('stat-one').innerHTML = out[0].num_repos;
|
||||
document.getElementById('stat-two').innerHTML = out[0].num_maintainers;
|
||||
})
|
||||
.catch(err => { throw err });
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue