From cb76a87c365554f40e250815ad4692f49540a63f Mon Sep 17 00:00:00 2001 From: Jonathon Wright Date: Wed, 17 Jun 2026 17:02:22 +1000 Subject: [PATCH] M3: theme-aware SVG architecture diagrams + hero motion Hand-authored inline-SVG Diagram component (no runtime JS, CSP-clean, themeable) rendering edge-AI, IaC-fleet and homelab architectures on the case studies. Staggered CSS hero entrance, motion-aware. --- src/components/Diagram.astro | 225 ++++++++++++++++++++++++++++++++ src/components/Hero.astro | 33 +++++ src/pages/projects/[slug].astro | 3 + 3 files changed, 261 insertions(+) create mode 100644 src/components/Diagram.astro diff --git a/src/components/Diagram.astro b/src/components/Diagram.astro new file mode 100644 index 0000000..400fd8b --- /dev/null +++ b/src/components/Diagram.astro @@ -0,0 +1,225 @@ +--- +// Hand-authored, theme-aware architecture diagrams rendered as inline SVG at build. +// No client JS, no headless browser, no inline diff --git a/src/components/Hero.astro b/src/components/Hero.astro index a692a96..4234817 100644 --- a/src/components/Hero.astro +++ b/src/components/Hero.astro @@ -90,4 +90,37 @@ import { cvAvailable } from "../lib/assets"; flex-wrap: wrap; gap: var(--space-3); } + + /* Staggered entrance — CSS-only (runs with JS off), motion-aware. */ + @media (prefers-reduced-motion: no-preference) { + .hero__eyebrow, + .hero__title, + .hero__positioning, + .hero__tags, + .hero__cta { + animation: heroIn 0.7s var(--ease) both; + } + .hero__title { + animation-delay: 0.06s; + } + .hero__positioning { + animation-delay: 0.14s; + } + .hero__tags { + animation-delay: 0.22s; + } + .hero__cta { + animation-delay: 0.3s; + } + } + @keyframes heroIn { + from { + opacity: 0; + transform: translateY(12px); + } + to { + opacity: 1; + transform: none; + } + } diff --git a/src/pages/projects/[slug].astro b/src/pages/projects/[slug].astro index d8da119..693e4e5 100644 --- a/src/pages/projects/[slug].astro +++ b/src/pages/projects/[slug].astro @@ -1,5 +1,6 @@ --- import Layout from "../../layouts/Layout.astro"; +import Diagram from "../../components/Diagram.astro"; import { getCollection, render } from "astro:content"; import type { GetStaticPaths } from "astro"; @@ -40,6 +41,8 @@ const { Content } = await render(entry); )} + {p.diagram && } +