diff --git a/README.md b/README.md index 6925e46..66454df 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Polished website sections for Astro, distributed as source you own. Every block Astro Blocks is a [shadcn](https://ui.shadcn.com/docs/registry)-compatible registry. Installing a block copies ordinary, editable files into your project. Nothing stays linked: no runtime package, no hidden updates. Change anything. ```sh -npx shadcn@latest add lambda-curry/astro-blocks/hero-split#v0.1.18 +npx shadcn@latest add lambda-curry/astro-blocks/hero-split#v0.1.19 ``` That writes `src/components/blocks/HeroSplit.astro` and its one dependency, `src/components/ui/Button.astro`. It works in any Astro project, without Tailwind, React or a `components.json`. Then: @@ -28,10 +28,10 @@ import HeroSplit from "../components/blocks/HeroSplit.astro"; | Category | Items | | --- | --- | | Headers | `header-floating`, `header-editorial`, `header-transparent`, `header-minimal` | -| Heroes | `hero-split`, `hero-immersive`, `hero-typographic` | +| Heroes | `hero-split`, `hero-immersive`, `hero-typographic`, `hero-editorial`, `hero-front-desk`, `hero-program` | | Walkthroughs | `steps-numbered`, `timeline`, `alternating-rows` | | Features | `features-bento`, `features-editorial` | -| Content | `collection`, `gallery`, `article`, `facts`, `schedule`, `compare`, `detail-dialog`, `filter-collection`, `compare-tray` | +| Content | `collection`, `gallery`, `article`, `facts`, `schedule`, `compare`, `menu-list`, `locations-visit`, `detail-dialog`, `filter-collection`, `compare-tray` | | Footers | `footer-minimal`, `footer-columns`, `footer-wordmark`, `footer-cta` | | Forms | `field`, `choice-group`, `form-status` | | Foundation | `button`, `breadcrumbs`, `pager`, `tokens` | @@ -39,17 +39,17 @@ import HeroSplit from "../components/blocks/HeroSplit.astro"; List, search or inspect them from the CLI: ```sh -npx shadcn@latest list lambda-curry/astro-blocks#v0.1.18 -npx shadcn@latest view lambda-curry/astro-blocks/timeline#v0.1.18 +npx shadcn@latest list lambda-curry/astro-blocks#v0.1.19 +npx shadcn@latest view lambda-curry/astro-blocks/timeline#v0.1.19 ``` Each item in [`registry.json`](registry.json) says when to use it and, as importantly, when not to. A numbered list is for a real sequence, a bento grid is for related items of different weight, and a giant footer wordmark is for a short name on an otherwise quiet site. ## Design -- **Tokens, not themes.** Blocks read semantic custom properties: `--color-bg`, `--color-surface`, `--color-text`, `--color-muted`, `--color-accent`, `--color-on-accent`, `--font-display`, `--font-body`, the `--step-*` type scale, `--leading-display` and `--leading-tight`, `--space-gutter`, `--section-gap`, `--radius-sm` and `--radius-lg`. Set them once, in your own theme, and every block follows. Each block also falls back to the neutral defaults in [`tokens.css`](src/styles/tokens.css) (`npx shadcn@latest add lambda-curry/astro-blocks/tokens#v0.1.18`), so nothing breaks without them. One more is optional and absent from `tokens.css`: `--color-rule` recolors every structural hairline (row and table rules, dividers, header and footer rules, and the outlines of bars, panels and tiles). Unset, each keeps its own translucent mix of the text color. Write it with `currentColor`, such as `--color-rule: color-mix(in oklab, currentColor 20%, transparent)`, so rules stay right on inverse footers. Forms read one more optional token, `--color-error`, for error text, borders and the error summary. Unset, it is a red mixed with the text color, which measured at least 4.7:1 on the background and surface of the four gallery themes (default, paper, ink and grove). Check it against a theme with a strongly colored surface, and set the token there if needed. +- **Tokens, not themes.** Blocks read semantic custom properties: `--color-bg`, `--color-surface`, `--color-text`, `--color-muted`, `--color-accent`, `--color-on-accent`, `--font-display`, `--font-body`, the `--step-*` type scale, `--leading-display` and `--leading-tight`, `--space-gutter`, `--section-gap`, `--radius-sm` and `--radius-lg`. Set them once, in your own theme, and every block follows. Each block also falls back to the neutral defaults in [`tokens.css`](src/styles/tokens.css) (`npx shadcn@latest add lambda-curry/astro-blocks/tokens#v0.1.19`), so nothing breaks without them. One more is optional and absent from `tokens.css`: `--color-rule` recolors every structural hairline (row and table rules, dividers, header and footer rules, and the outlines of bars, panels and tiles). Unset, each keeps its own translucent mix of the text color. Write it with `currentColor`, such as `--color-rule: color-mix(in oklab, currentColor 20%, transparent)`, so rules stay right on inverse footers. Forms read one more optional token, `--color-error`, for error text, borders and the error summary. Unset, it is a red mixed with the text color, which measured at least 4.7:1 on the background and surface of the four gallery themes (default, paper, ink and grove). Check it against a theme with a strongly colored surface, and set the token there if needed. - **Optional type.** Sixteen curated self-hosted typefaces, each its own `font-*` item installing a small stylesheet that loads pinned WOFF2 by sha256, plus three pairings built from them (`pairing-editorial`, `pairing-product`, `pairing-warm`) that set only type tokens. Installs stay on the system font until a site adds one. See [docs/type-pairings.md](docs/type-pairings.md) and the live specimens at `/typography`. -- **Optional techniques.** Six visual devices in the `technique` category, each with one job. `cut-edges` (ticket notches, pinked and scalloped edges), `grain` (paper tooth and textured, band-free gradients) and `duotone` (two-token photo unification) are one small CSS file each: install it, `@import "./techniques/.css";` in your theme, and tune it with custom properties. `screen-tone` (a token ramp through a printed dot, line or hatch screen, or a threshold halftone), `seal` (an ink stamp for one real owner fact) and `annotated-figure` (numbered callouts with a key) are components. All are static, use no JavaScript, and drop their decoration under forced colors (and, where it touches text, more contrast). `/techniques` renders each in two contrasting brands, plus compositions that pair several with different jobs. +- **Optional techniques.** Thirteen visual devices in the `technique` category, each with one job. Ten are one small CSS file each: install it, `@import "./techniques/.css";` in your theme, and tune it with custom properties: surfaces (`grain`, `color-field`, `line-work`), photo treatments (`duotone`, `image-mount`, `diptych`), type (`type-lockup`, `marginalia`), an object (`cut-edges`) and one scroll accent (`scroll-reveal`). `screen-tone`, `seal` and `annotated-figure` are components. All use no JavaScript, keep text full-contrast, and drop their decoration under forced colors (and, where it touches text, more contrast). `/techniques` renders each in contrasting brands, plus compositions from none to three techniques; `/compositions` opens one site's content five ways with the hero blocks. - **Container queries.** Blocks lay out from the width they are given, so they work full-width or inside a narrow column. - **Zero JS for static blocks; opt-in `@ui-sdk/web` for interactive blocks.** Narrow-screen menus use the HTML `popover` attribute, the transparent header turns solid via CSS scroll-driven animation, and the wordmark footer sizes with container units—shipping 0 B JS across all 32 static blocks. Only `detail-dialog`, `filter-collection`, and `compare-tray` import exact-pinned `@ui-sdk/core@0.1.0-beta.23` and `@ui-sdk/web@0.1.0-beta.23` in `