@thebuilder/umbraco-docs 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/components/LandingHero.astro +1 -4
- package/package.json +1 -1
- package/styles/landing.css +0 -2
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ import { InstallCommand, LandingHero, LandingRoot } from "@thebuilder/umbraco-do
|
|
|
46
46
|
</LandingRoot>
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
`logo
|
|
49
|
+
`logo` and `description` are optional. There is no eyebrow: the family doesn't put small text labels above headings, so start with the title. A hero can also draw its own background, such as a canvas, through the `background` slot, which renders behind the glow and the content.
|
|
50
50
|
|
|
51
51
|
`layout="split"` puts the text on the left, left-aligned, and the logo large on the right, as on the social cards. Below 56rem the logo sits above the text, smaller, with the text centered under it. Below 36rem, in either layout, the action buttons share the full width of the text in equal parts and the install command spans the same width, so every site's hero lines up the same way on a phone. The default, `centered`, stacks a small logo and the text in the middle. Give a split hero a `logo` or a `HeroParticles` background to fill that column. Content in the default slot, such as a `ScreenshotFrame`, goes below either layout at full width.
|
|
52
52
|
|
|
@@ -106,7 +106,7 @@ How it behaves:
|
|
|
106
106
|
|
|
107
107
|
- **Shape.** The logo is drawn into a 256 pixel square and particles are placed on its solid pixels, taking their colors. Soft glow layers, below 60% coverage, are left out. A logo that's small on screen, such as above the text on a phone, draws only some of its particles, so it keeps the same airy density as a large one instead of packing into a solid glow. An SVG logo's `viewBox` decides its shape. A cross-origin logo needs CORS; without it, the fallback below shows instead.
|
|
108
108
|
- **Motion.** Still shapes catch a slow band of light that sweeps across them. To make a stroke stream from one end to the other instead, pass `flow` with its center line as SVG path data, its width and the logo's `viewBox`, such as `flow={{ path: "M60 44v92a68 68 0 0 0 136 0V44", width: 36, viewBox: 256 }}`.
|
|
109
|
-
- **Readability.** Over the particles, the hero's description
|
|
109
|
+
- **Readability.** Over the particles, the hero's description and compatibility line are brighter than usual, and the action buttons get a frosted backdrop. In the centered layout, where the logo forms behind the text, the particles also dim behind the text, so it keeps 4.5:1 contrast even against the brightest particles.
|
|
110
110
|
- **Layout.** The particles fill the hero down to the first content after the text, such as a `ScreenshotFrame`. In the split layout the logo forms in the column beside the text, or above it on narrow screens; in the centered layout it fills the middle and steps back behind the text, so leave out the hero's own `logo` there. In the split layout a `logo` is replaced by the particles. When the hero sits under a sticky header, such as Blume's, the particles run on up behind it, and the header starts clear and turns to its usual frosted bar as the page scrolls. Browsers without scroll-driven animations, such as Firefox, get the same from a scroll listener. Don't clip vertical overflow on an element around the hero, such as `overflow: clip` on the `LandingRoot` class; use `overflow-x: clip`, or the particles can't reach the header.
|
|
111
111
|
- **Themes.** It follows `data-theme` on `<html>`, which Blume sets, and the system theme without one: light on dark, colored ink on light.
|
|
112
112
|
- **Fallbacks.** With reduced motion it draws one still frame. Without WebGPU, or if the logo can't be read, the logo itself shows where the particles would form, faded behind the text in the centered layout. It pauses while scrolled out of view.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
interface Props {
|
|
3
3
|
title: string;
|
|
4
|
-
/** A short line above the title, such as what the package is for. */
|
|
5
|
-
eyebrow?: string;
|
|
6
4
|
description?: string;
|
|
7
5
|
logo?: string;
|
|
8
6
|
logoAlt?: string;
|
|
@@ -16,7 +14,7 @@ interface Props {
|
|
|
16
14
|
layout?: "centered" | "split";
|
|
17
15
|
}
|
|
18
16
|
|
|
19
|
-
const { title,
|
|
17
|
+
const { title, description, logo, logoAlt = "", accent, compatibility, layout = "centered" } = Astro.props;
|
|
20
18
|
const split = layout === "split";
|
|
21
19
|
---
|
|
22
20
|
|
|
@@ -26,7 +24,6 @@ const split = layout === "split";
|
|
|
26
24
|
<div class="udocs-shell udocs-hero__inner">
|
|
27
25
|
<div class="udocs-hero__copy">
|
|
28
26
|
{logo && !split && <img class="udocs-hero__logo" src={logo} width="72" height="72" alt={logoAlt} data-udocs-reveal />}
|
|
29
|
-
{eyebrow && <p class="udocs-hero__eyebrow" data-udocs-reveal>{eyebrow}</p>}
|
|
30
27
|
<h1 id="udocs-hero-title" class="udocs-hero__title" data-udocs-reveal>
|
|
31
28
|
{title}{accent && <> <span class="udocs-hero__accent">{accent}</span></>}
|
|
32
29
|
</h1>
|
package/package.json
CHANGED
package/styles/landing.css
CHANGED
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
.udocs-hero__logo { width: 4.5rem; height: 4.5rem; object-fit: contain; }
|
|
48
48
|
.udocs-hero__title { max-width: 20ch; margin: 0; font-family: var(--blume-font-display, system-ui); font-size: clamp(2.4rem, 6vw, 4rem); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; }
|
|
49
49
|
.udocs-hero__accent { color: transparent; background: var(--udocs-gradient); background-clip: text; -webkit-background-clip: text; }
|
|
50
|
-
.udocs-hero__eyebrow { margin: 0; color: var(--udocs-accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
|
|
51
50
|
.udocs-hero__description { max-width: 44rem; margin: 0; color: var(--udocs-muted-foreground); font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.65; }
|
|
52
51
|
.udocs-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
|
|
53
52
|
.udocs-hero__compatibility { margin: 0; color: var(--udocs-muted-foreground); font-size: 0.875rem; }
|
|
@@ -55,7 +54,6 @@
|
|
|
55
54
|
behind it, so it keeps 4.5:1 even against the brightest of them. The buttons get a frosted
|
|
56
55
|
backdrop, which an outlined button needs to stay legible there. */
|
|
57
56
|
.udocs-hero:has(> .udocs-particles) :is(.udocs-hero__description, .udocs-hero__compatibility) { color: color-mix(in oklab, var(--udocs-foreground) 82%, transparent); }
|
|
58
|
-
.udocs-hero:has(> .udocs-particles) .udocs-hero__eyebrow { color: color-mix(in oklab, var(--udocs-accent) 60%, var(--udocs-foreground)); }
|
|
59
57
|
.udocs-hero:has(> .udocs-particles) .udocs-hero__actions > * { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
|
|
60
58
|
/* The split layout: the text on the left, the logo large on the right, where a particle logo
|
|
61
59
|
forms too. Narrow screens put a smaller logo above the text. */
|