diff --git a/apps/site/src/components/Grove.astro b/apps/site/src/components/Grove.astro new file mode 100644 index 0000000..bf68160 --- /dev/null +++ b/apps/site/src/components/Grove.astro @@ -0,0 +1,455 @@ +--- +// The hero graphic: fragments of HTML, CSS, JavaScript and XML drift in +// from the edges and snap into a parse tree that keeps growing, sheds an +// old branch now and then, and re-forms. Drawn on a canvas, paused when +// off-screen or hidden, and a finished, still tree when the visitor +// prefers reduced motion. +interface Props { + class?: string; +} +const { class: className } = Astro.props; +--- + + + + + + diff --git a/apps/site/src/pages/index.astro b/apps/site/src/pages/index.astro index c0bf604..df5901b 100644 --- a/apps/site/src/pages/index.astro +++ b/apps/site/src/pages/index.astro @@ -2,6 +2,7 @@ import Layout from '../layouts/Layout.astro'; import CodeBlock from '../components/CodeBlock.astro'; import hero from '../data/hero.json'; +import Grove from '../components/Grove.astro'; import { pages, softwareSourceCode, repo } from '../lib/site'; import { getVersions, getConformance, suite, baselineUrl, getCrateRows } from '../lib/data'; import { crateRoles, reachPhrase } from '../data/crates'; @@ -110,6 +111,8 @@ const installs = [

Version {versions.crates}, Apache-2.0.

+
+

What you wrote

@@ -354,7 +357,18 @@ const installs = [ display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); - align-items: start; + align-items: stretch; + } + + /* The tree grows beside the headline; its box is sized here, so nothing + shifts when the canvas starts drawing. */ + .hero-art { + min-height: 420px; + margin-block: -24px; + } + + .hero-grid > .parse { + grid-column: 1 / -1; } .hero-title { @@ -378,7 +392,7 @@ const installs = [ .parse { display: grid; - grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); + grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr); gap: 1px; margin: 0; border: 1px solid var(--pc-border-strong); @@ -394,7 +408,6 @@ const installs = [ } .parse-tree { - grid-row: span 2; background: #191b1f; } @@ -618,14 +631,33 @@ const installs = [ .install-grid { grid-template-columns: minmax(0, 1fr); } + + .hero-art { + min-height: 260px; + margin-block: -8px; + } + + .parse { + grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); + } + + .parse-tree { + grid-column: 2; + grid-row: 1 / span 2; + } } @media (max-width: 560px) { + .hero-art { + min-height: 220px; + } + .parse { grid-template-columns: minmax(0, 1fr); } .parse-tree { + grid-column: auto; grid-row: auto; }