Isometric line figures that answer the pointer. For React and for anything with a DOM.
OG: the Exploded figure, its layers open, with the install commands
Lucas Marques5e0d147d7b84
diff --git a/apps/site/app/layout.tsx b/apps/site/app/layout.tsxindex 5729373..27645d6 100644--- a/apps/site/app/layout.tsx+++ b/apps/site/app/layout.tsx@@ -17,7 +17,7 @@ export const metadata: Metadata = {title: "hairline",description: DESCRIPTION,alternates: { canonical: "/" },- openGraph: { title: "hairline", description: DESCRIPTION, url: "/", siteName: "hairline", type: "website", images: [{ url: "/og.png", width: 1200, height: 630, alt: "Line drawings that answer the pointer: the Terrain figure, its pillars rising." }] },+ openGraph: { title: "hairline", description: DESCRIPTION, url: "/", siteName: "hairline", type: "website", images: [{ url: "/og.png", width: 1200, height: 630, alt: "Line drawings that answer the pointer: the Exploded figure, its layers lifted apart, with the install commands." }] },twitter: { card: "summary_large_image", title: "hairline", description: DESCRIPTION, images: ["/og.png"], creator: "@lucasmarkes" },icons: { icon: "/icon.svg" },};diff --git a/apps/site/app/og/page.tsx b/apps/site/app/og/page.tsxindex e275fb2..2222ce6 100644--- a/apps/site/app/og/page.tsx+++ b/apps/site/app/og/page.tsx@@ -1,19 +1,30 @@+import type { CSSProperties } from "react";import type { Metadata } from "next";-import { Terrain } from "@lucasmarkes/hairline/react";+import { Exploded } from "@lucasmarkes/hairline/react";-/** The Open Graph card, as a page: scripts/og.mjs photographs it at 1200 × 630 into public/og.png. */+/** The Open Graph card, as a page: scripts/og.mjs opens the figure's layers with the pointer and photographs it at 1200 × 630 into public/og.png. */export const metadata: Metadata = { robots: { index: false } };+/* heavier, darker lines than the site's, through the figure's public theme, so they survive a feed shrinking the card */+const feed = { "--hairline-stroke": "1.35", "--hairline-mid": "#9a9aa2", "--hairline-lo": "#cfcfd5", "--hairline-edge": "#7c7c85" } as CSSProperties;+export default function Og() {return (- <main className="flex h-[630px] w-[1200px] items-center gap-16 overflow-hidden px-20">- <div className="w-[470px] shrink-0">- <h1 className="text-[64px] font-medium leading-[1.02] tracking-[-0.045em]">+ <main className="relative h-[630px] w-[1200px] overflow-hidden">+ {/* far larger than the card, so it runs off the top and the right */}+ <div className="absolute" style={{ width: 1500, left: 280, top: -520 }}>+ <Exploded theme="light" intensity={1} style={feed} />+ </div>+ <div className="absolute bottom-14 left-16 w-[440px]">+ <p className="text-[22px] font-medium tracking-[-0.02em] text-muted">hairline</p>+ <h1 className="mt-5 text-[52px] font-medium leading-[1.02] tracking-[-0.045em]">Line drawings that <em className="font-serif text-[1.08em] font-normal tracking-[-0.02em]">answer</em> the pointer.</h1>- <p className="mt-8 font-mono text-[18px] text-muted">npm i @lucasmarkes/hairline</p>+ <div className="mt-8 flex flex-col gap-1 font-mono text-[17px] text-muted">+ <p>npm i @lucasmarkes/hairline</p>+ <p>npx skills add lucasmarkes/hairline</p>+ </div></div>- <div className="tile flex-1 p-6"><Terrain /></div></main>);}diff --git a/apps/site/public/og.png b/apps/site/public/og.pngindex 4354464..cfa7668 100644Binary files a/apps/site/public/og.png and b/apps/site/public/og.png differdiff --git a/scripts/og.mjs b/scripts/og.mjsindex 738ab58..68d3d98 100644--- a/scripts/og.mjs+++ b/scripts/og.mjs@@ -25,8 +25,10 @@ try {process.exit(1);}await page.waitForFunction(() => document.querySelectorAll("[data-hairline] > svg > *").length >= 1 && document.fonts.status === "loaded");-// let the figure finish its first frames+// let the figure finish its first frames, then sweep the pointer across it so its layers stand open, and let them settleawait page.waitForTimeout(1200);+for (let x = 560; x <= 1160; x += 24) await page.mouse.move(x, 300, { steps: 2 });+await page.waitForTimeout(1500);const out = join(SITE, "public/og.png");await page.screenshot({ path: out, clip: { x: 0, y: 0, width: 1200, height: 630 } });await browser.close();