You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(lab-card): rework as title-on-top with one column per link
Replace the horizontal-band layout with a column-per-link design:
- Title and tagline sit on top; a horizontal row of columns sits below,
separated by a subtle top border on the columns row.
- Each column heads with an uppercase kind label ("Demo", "Repository",
"Case study"), followed by the icon-prefixed link itself.
- Columns flow responsively via container queries: 1 column → 2 at
32rem → 4 at 56rem. This keeps Forms Lab's four links on a single
row on desktop while single-link cards remain compact.
- The link `label` is now the project/repo identifier (what you're
linking to) rather than the action, since the action is carried by
the column heading.
- Drop the now-unneeded `group` field from the content schema and
loader. Labels absorb the sub-project identity ("Forms Platform",
"Forms Lab (experiment)") without a separate grouping construct.
-`order` — display order ascending (integer, required)
31
29
-`links` — list of link objects (array, required). Each link has:
32
-
-`label` — visible link text (string, required)
30
+
-`label` — visible link text (string, required). This is the identifier of what you're linking to — a repo name, a project name, or the target resource.
33
31
-`url` — destination URL (string, required)
34
-
-`kind` — one of `demo`, `repo`, or `case-study` (required). Drives the icon shown before the label.
35
-
-`group` — optional sub-project name (string). When multiple links share a `group`, they render together under a small heading; ungrouped links render without one. Use this for a lab that contains more than one distinct project (e.g., a production and an experiment variant).
32
+
-`kind` — one of `demo`, `repo`, or `case-study` (required). Drives the column heading ("Demo", "Repository", or "Case study") and the icon shown before the label.
36
33
37
34
## Loader
38
35
39
36
`src/build/featured.ts` exports `loadFeatured(rootDir)` which reads every `.md` file in `content/featured/`, parses front-matter, validates the schema, and returns labs sorted by `order`.
40
37
41
38
## Rendering
42
39
43
-
The home page renders one `<LabCard />` per lab. Each card is a horizontal band — title and tagline on the left, grouped link list on the right — that collapses to a stacked layout on narrow viewports via a `@container (min-width: 40rem)` rule. Links are prefixed with an icon (globe for `demo`, GitHub mark for `repo`, document for `case-study`) and grouped under a small heading when a `group` is set. The home page's featured list is constrained to `72rem` to keep the bands at a readable width on wide displays.
40
+
The home page renders one `<LabCard />` per lab. Each card places the title and tagline on top, with a horizontal row of columns below it — one column per link. Each column has a small uppercase kind heading ("Demo", "Repository", or "Case study") and the link itself, prefixed with an icon (globe for `demo`, GitHub mark for `repo`, document for `case-study`). Columns flow from 1 → 2 → 4 based on card width via container queries at 32rem and 56rem. The home page's featured list is constrained to `72rem` to keep cards at a readable width on wide displays.
0 commit comments