diff --git a/website/package-lock.json b/website/package-lock.json index 5a390ab..d364b71 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -7463,7 +7463,7 @@ }, "node_modules/light-landing-page": { "version": "0.1.0", - "resolved": "git+ssh://git@github.com/enixCode/light-landing-page.git#62deeb09f0bb8e28d6f046c7db1bb4b63ed71564", + "resolved": "git+ssh://git@github.com/enixCode/light-landing-page.git#36425324e917edc8b9586a3e5bd1a2f9e90a2948", "license": "MIT", "peerDependencies": { "react": ">=18", diff --git a/website/src/app/(home)/data.tsx b/website/src/app/(home)/data.tsx index 62b9122..ae19d24 100644 --- a/website/src/app/(home)/data.tsx +++ b/website/src/app/(home)/data.tsx @@ -1,4 +1,5 @@ import type { LandingData } from 'light-landing-page'; +import { DagHero } from '@/components/diagrams'; const BASE = '/light-process'; @@ -45,10 +46,9 @@ export const lightProcessData: LandingData = { { k: 'License', v: <>AGPL-3.0 copyleft }, ], banner: { - src: `${BASE}/banner.webp`, - alt: 'Several glowing spheres linked by light into a directed graph above an isolated dark grid, the visual metaphor for a container DAG.', - captionLeft: 'Fig. 01 - Many cells, one graph, one grid.', - captionRight: 'light-process / visual', + node: , + captionLeft: 'Fig. 01 - ingest fans out; score routes the result.', + captionRight: 'light-process / graph', }, }, primitives: { diff --git a/website/src/components/diagrams/DagHero.tsx b/website/src/components/diagrams/DagHero.tsx new file mode 100644 index 0000000..d3bd8d3 --- /dev/null +++ b/website/src/components/diagrams/DagHero.tsx @@ -0,0 +1,110 @@ +import styles from './diagrams.module.css'; + +/* + * The landing hero: a wider, cinematic cut of the DAG, tuned to fill the + * shared landing's 16/5 hero-banner box (viewBox ratio matches exactly). It + * carries no frame of its own - the landing supplies the corners, the bottom + * gradient and the caption. Pure CSS animation, no client JS, so it survives + * static export and is safe to pass across the RSC boundary. Same visual + * language as the docs diagrams; this is the flagship instance. + */ + +type NodeDef = { + id: string; + x: number; + y: number; + label: string; + sub: string; + pulse: string; +}; + +const W = 150; +const H = 52; + +const NODES: NodeDef[] = [ + { id: 'ingest', x: 48, y: 124, label: 'ingest', sub: 'node:24', pulse: 'pulse' }, + { id: 'transform', x: 280, y: 62, label: 'transform', sub: 'python', pulse: 'pulseB' }, + { id: 'validate', x: 280, y: 186, label: 'validate', sub: 'node:24', pulse: 'pulseC' }, + { id: 'score', x: 512, y: 124, label: 'score', sub: 'python', pulse: 'pulseB' }, + { id: 'report', x: 744, y: 62, label: 'report', sub: 'node:24', pulse: 'pulse' }, + { id: 'store', x: 744, y: 186, label: 'store', sub: 'python', pulse: 'pulseC' }, +]; + +function center(n: NodeDef) { + return { cx: n.x + W / 2, cy: n.y + H / 2 }; +} + +export function DagHero() { + const byId = Object.fromEntries(NODES.map((n) => [n.id, n])); + const edge = (from: string, to: string) => { + const a = center(byId[from]); + const b = center(byId[to]); + const x1 = byId[from].x + W; + const y1 = a.cy; + const x2 = byId[to].x; + const y2 = b.cy; + const mx = (x1 + x2) / 2; + return `M ${x1} ${y1} C ${mx} ${y1}, ${mx} ${y2}, ${x2} ${y2}`; + }; + + const EDGES: [string, string][] = [ + ['ingest', 'transform'], + ['ingest', 'validate'], + ['transform', 'score'], + ['validate', 'score'], + ['score', 'report'], + ['score', 'store'], + ]; + + return ( +
+ + + + + + + + {EDGES.map(([from, to]) => ( + + + + + ))} + + {/* a couple of condition tags, kept sparse for the hero */} + + when ok:true + + + score > 0.8 + + + {NODES.map((n) => ( + + + + {n.label} + + + {n.sub} + + + ))} + +
+ ); +} diff --git a/website/src/components/diagrams/diagrams.module.css b/website/src/components/diagrams/diagrams.module.css index 0101819..b9e396a 100644 --- a/website/src/components/diagrams/diagrams.module.css +++ b/website/src/components/diagrams/diagrams.module.css @@ -7,7 +7,8 @@ * the landing CSS variables are not in scope inside the docs. */ -.figure { +.figure, +.heroFill { --d-ink: #050608; --d-ink-2: #0a0c10; --d-line: #1a1d24; @@ -19,7 +20,9 @@ --d-halo-soft: #7fddff; --d-amber: #ffb855; --d-ember: #ff6b35; +} +.figure { position: relative; margin: 1.75rem 0; padding: 1.4rem 1.4rem 1rem; @@ -62,6 +65,20 @@ height: auto; } +/* Hero variant: fills the landing's hero-banner box (16/5). It carries no + chrome of its own - the landing supplies the frame, corner brackets, bottom + gradient and caption. Tokens come from the shared .figure/.heroFill block. */ +.heroFill { + display: block; + width: 100%; + height: 100%; +} +.heroSvg { + display: block; + width: 100%; + height: 100%; +} + .caption { margin-top: 0.9rem; display: flex; diff --git a/website/src/components/diagrams/index.ts b/website/src/components/diagrams/index.ts index a6ad7d3..87fa3b0 100644 --- a/website/src/components/diagrams/index.ts +++ b/website/src/components/diagrams/index.ts @@ -1,3 +1,4 @@ export { Architecture } from './Architecture'; export { Dag } from './Dag'; +export { DagHero } from './DagHero'; export { NetworkServices } from './NetworkServices';