diff --git a/site/src/pages/index.astro b/site/src/pages/index.astro index bc0563c82953..fe6810109e80 100644 --- a/site/src/pages/index.astro +++ b/site/src/pages/index.astro @@ -330,9 +330,7 @@ const endpoints = [ + Playground

⚠ Curated, growing dataset — not yet an exhaustive catalog of every device.

Validated, scored & served by TTechEngine — the open data + scoring engine.

diff --git a/site/src/scripts/techapi.js b/site/src/scripts/techapi.js index b426741bdf9f..71f41edf1735 100644 --- a/site/src/scripts/techapi.js +++ b/site/src/scripts/techapi.js @@ -182,6 +182,15 @@ async function loadList(resource) { // The hero is already in view at first paint. Animate immediately so the // counters do not remain at zero when IntersectionObserver is delayed. el.querySelectorAll(".num").forEach((n) => countUp(n, +n.dataset.n)); + // Satellite data repos publish their own catalog; count them alongside. + fetch("https://gettechapi.github.io/cpu-engineering-samples/catalog.json") + .then((r) => (r.ok ? r.json() : Promise.reject())) + .then((list) => { + el.insertAdjacentHTML("beforeend", + `
0
cpu eng. samples
`); + countUp(el.lastElementChild.querySelector(".num"), list.length); + }) + .catch(() => {}); }).catch(() => { el.innerHTML = '
build data first
'; });