Skip to content

Commit cd63b14

Browse files
committed
Curate the landing page examples section instead of dumping all 65
The "See it move" section rendered one card per preset directly onto the marketing landing page, so it grew in lockstep with the movement library (65 cards today). On mobile that was a single-column wall stretching many screens — a doom-scroll, not a landing page. The playground itself already has a proper filterable/grouped gallery (domain, body part, equipment, difficulty in main.ts). The landing page doesn't need to duplicate it: show five visually distinct highlights spanning different domains (dance, fitness w/ prop, yoga, mobility reach-IK, sign language), then hand off to the real gallery with a distinct "+N more movements" tile styled as a dashed, accent-colored CTA rather than another movement card. Result: a clean 3x2 grid on desktop, single column of 6 short cards on mobile instead of 65 — same card styling and colors, just curated.
1 parent f2e7131 commit cd63b14

3 files changed

Lines changed: 38 additions & 4 deletions

File tree

playground/index.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ <h3>Cheap &amp; client-side</h3>
125125
<p class="eyebrow">See it move</p>
126126
<h2>One language, many practices</h2>
127127
<p class="section-sub">
128-
From physiotherapy and posture to yoga, mobility, and the gym — each opens
129-
in the playground, editable and shareable.
128+
From physiotherapy and posture to yoga, dance, and sign language — a taste
129+
of the library. Every movement opens in the playground, editable and
130+
shareable.
130131
</p>
131132
</header>
132133
<div id="examples-grid" class="examples-grid"></div>

playground/src/landing.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,19 @@ code {
463463
font-weight: 700;
464464
color: var(--accent);
465465
}
466+
.example-more {
467+
border-style: dashed;
468+
border-color: var(--border-2);
469+
background: transparent;
470+
justify-content: center;
471+
}
472+
.example-more .example-name {
473+
color: var(--accent);
474+
}
475+
.example-more:hover {
476+
border-style: solid;
477+
background: var(--panel);
478+
}
466479

467480
/* --- How it works ---------------------------------------------------------- */
468481
.how {

playground/src/landing.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,20 @@ if ("requestIdleCallback" in window) {
4545
window.setTimeout(initHero, 200);
4646
}
4747

48-
// --- Examples gallery: each card opens the movement in the playground -------
48+
// --- Examples gallery: a curated taste, not the full 65 ---------------------
49+
// The full library already has a proper filterable/grouped gallery in the
50+
// playground itself (domain, body part, equipment, difficulty). Dumping all
51+
// 65 cards into the landing page turned this section into a long doom-scroll
52+
// on mobile, so show a handful of visually distinct highlights spanning
53+
// different domains, then hand off to the real gallery.
54+
const HIGHLIGHT_IDS = ["dance-phrase", "pull-up", "cobra", "touch-toes", "hand-wave"];
55+
4956
const grid = document.getElementById("examples-grid");
5057
if (grid) {
51-
for (const preset of PRESETS) {
58+
const byId = new Map(PRESETS.map((p) => [p.id, p]));
59+
for (const id of HIGHLIGHT_IDS) {
60+
const preset = byId.get(id);
61+
if (!preset) continue;
5262
const card = document.createElement("a");
5363
card.className = "example-card";
5464
card.href = `play.html${buildShareHash(preset.source)}`;
@@ -58,6 +68,16 @@ if (grid) {
5868
<span class="example-go">Open in playground →</span>`;
5969
grid.append(card);
6070
}
71+
72+
const remaining = PRESETS.length - HIGHLIGHT_IDS.length;
73+
const more = document.createElement("a");
74+
more.className = "example-card example-more";
75+
more.href = "play.html";
76+
more.innerHTML = `
77+
<span class="example-kind">Full library</span>
78+
<span class="example-name">+${remaining} more movements</span>
79+
<span class="example-go">Browse &amp; filter by domain →</span>`;
80+
grid.append(more);
6181
}
6282

6383
// --- Copy the LLM authoring prompt ------------------------------------------

0 commit comments

Comments
 (0)