diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-08-06 02:25:51 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-08-06 02:26:16 +0300 |
| commit | 78a356b17b325d8cd53e2ddde69d18524d7cd4f9 (patch) | |
| tree | 204a645d76b29cab1566b1b8e00b7df6caa9b85c /website/src | |
| parent | f83980db5c91e0b8e155ed7fff4e1dbb89c17bcc (diff) | |
fix: keep plugin marketplace counts current
Diffstat (limited to 'website/src')
| -rw-r--r-- | website/src/pages/plugins.astro | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/website/src/pages/plugins.astro b/website/src/pages/plugins.astro index f9c4854f..9bc7e4a8 100644 --- a/website/src/pages/plugins.astro +++ b/website/src/pages/plugins.astro @@ -51,8 +51,10 @@ const apiUrl = import.meta.env.DEV ? null : snapshotUrl; </p> </div> <aside class="ph-side"> - <b>{pluginCount.toLocaleString('en-US')}</b> - <span>plugins across {repositoryCount.toLocaleString('en-US')} repositories</span> + <b id="plugins-hero-count">{pluginCount.toLocaleString('en-US')}</b> + <span id="plugins-hero-summary"> + plugins across {repositoryCount.toLocaleString('en-US')} repositories + </span> <a href="/docs/plugins/">Publish yours →</a> </aside> </header> @@ -115,6 +117,8 @@ const apiUrl = import.meta.env.DEV ? null : snapshotUrl; const sortSelect = document.getElementById("plugins-sort"); const metaEl = document.getElementById("plugins-meta"); const moreButton = document.getElementById("plugins-more"); + const heroCountEl = document.getElementById("plugins-hero-count"); + const heroSummaryEl = document.getElementById("plugins-hero-summary"); // 24 fills complete rows in both the 3-column and 2-column grid layouts. const PAGE_SIZE = 24; @@ -306,6 +310,12 @@ const apiUrl = import.meta.env.DEV ? null : snapshotUrl; repos.reduce((n, repo) => n + (manifestsOf(repo).length || 1), 0); parts.push(total + (total === 1 ? " plugin" : " plugins")); parts.push(repoCount + (repoCount === 1 ? " repository" : " repositories")); + heroCountEl.textContent = total.toLocaleString("en-US"); + heroSummaryEl.textContent = + (total === 1 ? "plugin" : "plugins") + + " across " + + repoCount.toLocaleString("en-US") + + (repoCount === 1 ? " repository" : " repositories"); const ago = timeAgo(data && data.generatedAt); if (ago) parts.push("updated " + ago); if (usingFallback) parts.push("preview data"); |
