From b4132b54ca67217f706c512c921bf70f86302e31 Mon Sep 17 00:00:00 2001 From: Scott Rhamy Date: Sun, 11 Jan 2026 09:01:17 -0500 Subject: [PATCH 1/6] fix for empty layers toggle showing small circle --- docs/src/routes/docs/components/[name]/+layout.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/routes/docs/components/[name]/+layout.svelte b/docs/src/routes/docs/components/[name]/+layout.svelte index 6d4b92132..cd50a4c2b 100644 --- a/docs/src/routes/docs/components/[name]/+layout.svelte +++ b/docs/src/routes/docs/components/[name]/+layout.svelte @@ -94,7 +94,7 @@ {page.params.example?.replaceAll('-', ' ') ?? metadata.name} - {#if layers} + {#if layers?.length} Date: Mon, 26 Jan 2026 10:21:01 -0500 Subject: [PATCH 2/6] initial --- docs/src/routes/+page.server.ts | 15 ++++++++++ docs/src/routes/+page.svelte | 9 +++++- docs/src/routes/stats/+page.svelte | 48 ++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 docs/src/routes/+page.server.ts create mode 100644 docs/src/routes/stats/+page.svelte diff --git a/docs/src/routes/+page.server.ts b/docs/src/routes/+page.server.ts new file mode 100644 index 000000000..a7abf5488 --- /dev/null +++ b/docs/src/routes/+page.server.ts @@ -0,0 +1,15 @@ +export async function load({ fetch }) { + const [githubRes, npmRes, bskyRes] = await Promise.all([ + fetch('https://api.github.com/repos/techniq/layerchart', { + headers: { Accept: 'application/vnd.github.v3+json' } + }), + fetch('https://api.npmjs.org/downloads/point/last-week/layerchart'), + fetch('https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=techniq.dev') + ]); + + const stars = githubRes.ok ? ((await githubRes.json()).stargazers_count as number) : null; + const weeklyDownloads = npmRes.ok ? ((await npmRes.json()).downloads as number) : null; + const bskyFollowers = bskyRes.ok ? ((await bskyRes.json()).followersCount as number) : null; + + return { stars, weeklyDownloads, bskyFollowers }; +} diff --git a/docs/src/routes/+page.svelte b/docs/src/routes/+page.svelte index 9f3471465..6e12a529e 100644 --- a/docs/src/routes/+page.svelte +++ b/docs/src/routes/+page.svelte @@ -1,5 +1,6 @@ + +
+ {#if weeklyDownloads != null} +
+ {format(weeklyDownloads, 'metric', { + fractionDigits: 1 + })} + Weekly Downloads +
+ {/if} + {#if stars != null} +
+ {format(stars, 'metric', { + fractionDigits: 1 + })} + GitHub Stars +
+ {/if} + +
+ {format(1234, 'metric', { + fractionDigits: 1 + })} + Discord Members +
+ + {#if bskyFollowers != null} +
+ {format(bskyFollowers, 'metric', { + fractionDigits: 1 + })} + Bluesky Followers +
+ {/if} +
From 89b865aae1477e36f6d4acf5db7546e915a922a4 Mon Sep 17 00:00:00 2001 From: Scott Rhamy Date: Mon, 26 Jan 2026 12:07:34 -0500 Subject: [PATCH 3/6] move to footer --- docs/src/routes/+page.server.ts | 8 +++- docs/src/routes/+page.svelte | 2 +- docs/src/routes/stats/+page.svelte | 71 +++++++++++++----------------- 3 files changed, 38 insertions(+), 43 deletions(-) diff --git a/docs/src/routes/+page.server.ts b/docs/src/routes/+page.server.ts index a7abf5488..49206542a 100644 --- a/docs/src/routes/+page.server.ts +++ b/docs/src/routes/+page.server.ts @@ -1,15 +1,19 @@ export async function load({ fetch }) { - const [githubRes, npmRes, bskyRes] = await Promise.all([ + const [githubRes, npmRes, discordRes, bskyRes] = await Promise.all([ fetch('https://api.github.com/repos/techniq/layerchart', { headers: { Accept: 'application/vnd.github.v3+json' } }), fetch('https://api.npmjs.org/downloads/point/last-week/layerchart'), + fetch('https://discord.com/api/v9/invites/697JhMPD3t?with_counts=true'), fetch('https://public.api.bsky.app/xrpc/app.bsky.actor.getProfile?actor=techniq.dev') ]); const stars = githubRes.ok ? ((await githubRes.json()).stargazers_count as number) : null; const weeklyDownloads = npmRes.ok ? ((await npmRes.json()).downloads as number) : null; const bskyFollowers = bskyRes.ok ? ((await bskyRes.json()).followersCount as number) : null; + const discordMembers = discordRes.ok + ? ((await discordRes.json()).approximate_member_count as number) + : null; - return { stars, weeklyDownloads, bskyFollowers }; + return { stars, weeklyDownloads, bskyFollowers, discordMembers }; } diff --git a/docs/src/routes/+page.svelte b/docs/src/routes/+page.svelte index 6e12a529e..852534fc7 100644 --- a/docs/src/routes/+page.svelte +++ b/docs/src/routes/+page.svelte @@ -256,7 +256,7 @@