live updating user count

This commit is contained in:
Henry Hiles 2026-02-23 11:20:27 -05:00
commit 8522e82f1e
No known key found for this signature in database
2 changed files with 12 additions and 1 deletions

View file

@ -11,3 +11,4 @@ services please consider donating through one of the following methods:
A huge thank you to our current sponsors:
- @VeryLoud: CAD$100
- @Aristarchus of Samos: CAD$100

View file

@ -3,7 +3,7 @@ title: Home
template: splash
hero:
title: Experience free, fast, and private software with Federated Nexus
tagline: Federated Nexus is a community resource hosting multiple FOSS (especially federated) services, including Matrix and Forgejo.
tagline: Federated Nexus is a community resource hosting multiple FOSS (especially federated) services, including Matrix and Forgejo. We currently have <span id="user-count">over 450</span> users.
image:
file: ../../images/icon.svg
actions:
@ -54,3 +54,13 @@ import { CardGrid, Card } from "@astrojs/starlight/components"
</Card>
</CardGrid>
<script>
{`
(async () => {
const response = await fetch("https://matrix.federated.nexus/_continuwuity/local_user_count")
const json = await response.json();
document.querySelector("#user-count").innerText = json["count"]
})()
`}
</script>