Repository navigation
Commit d339c15
feat(docs): add custom landing page with scroll-driven demos
Replace the "land directly in the docs" experience with a dedicated
marketing landing page at `/` that sells the package and demonstrates
the library on the page itself.
The concept is "the page observes itself": every section is instrumented
with the real library, so scrolling is the demo. A live Observer HUD and
hero instrument report the active section, intersectionRatio, and
impression count as you scroll, all driven by real useInView/useOnInView.
Sections, each showing a real use-case:
- Hero with copyable install (npm/pnpm/yarn/bun) and a live instrument
- Reveal band: cards animate in on scroll (useInView + triggerOnce)
- Three-APIs scrollspy: sticky code panel follows the in-view API;
cards are also click-to-pin, with scroll reclaiming control
- Impression strip: tiles fire once via useOnInView into a live counter
- Playground: reuses the existing ObserverDemo island
- Closing CTA + footer
Built on Blume custom pages (pages/index.astro + PageLayout). Progressive
enhancement throughout: content is fully visible with no JS, for crawlers,
and under prefers-reduced-motion; the hidden-until-seen state is applied
only by the observer after hydration. Motion uses transform/opacity.
Routing: docs/index.mdx moves to docs/overview.mdx (/overview). The Docs
tab keeps path "/" with href "/overview", preserving every existing
/api, /guides, /testing URL, the sidebar, and tab highlighting; only the
landing takes "/". logo.text is set to "" so the default PageLayout logo
no longer prints the site title beside the mark.
Verified: biome clean, design detector no findings, typecheck 0 errors,
production build (112 pages) with the landing and /overview prerendered;
checked desktop + mobile in light and dark.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 3db5f92 commit d339c15
7 files changed
Lines changed: 2350 additions & 2 deletions
File tree
- apps/docs
- docs
- islands
- pages
- _home
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
| |||
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
0 commit comments