Isometric line figures that answer the pointer. For React and for anything with a DOM.
Skill page: the title breaks evenly, each step's number sits on its line, and the file the skill writes is set as code
Lucas Marquesda17aa4280c8
diff --git a/apps/site/app/globals.css b/apps/site/app/globals.cssindex 6227141..2e77133 100644--- a/apps/site/app/globals.css+++ b/apps/site/app/globals.css@@ -369,8 +369,8 @@ footer a::after { content: ""; position: absolute; inset: -12px -8px; }lines in a column narrower than 360px. */.example-frame { display: block; width: calc(100% + 32px); margin: -16px -16px -24px; height: calc(min(100cqw, 640px) * 0.8 + 171px + max(0px, 360px - 100cqw) * 0.75); border: 0; }.skill-steps { display: grid; gap: 12px; max-width: 64ch; counter-reset: step; }-.skill-steps > li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); font-size: 15px; line-height: 1.55; color: var(--color-muted); counter-increment: step; }-.skill-steps > li::before { content: counter(step, decimal-leading-zero); font: 400 12px/1.95 var(--font-mono); color: var(--color-faint); }+.skill-steps > li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); align-items: baseline; font-size: 15px; line-height: 1.55; color: var(--color-muted); counter-increment: step; }+.skill-steps > li::before { content: counter(step, decimal-leading-zero); font: 400 12px/1 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--color-faint); }.skill-steps strong { font-weight: 500; color: var(--color-ink); }@media (min-width: 900px) {diff --git a/apps/site/app/skill/page.tsx b/apps/site/app/skill/page.tsxindex 12ecef9..6f03f85 100644--- a/apps/site/app/skill/page.tsx+++ b/apps/site/app/skill/page.tsx@@ -6,6 +6,14 @@ import { ExampleFrame } from "@/components/example-frame";import { LINKS } from "@/lib/figures";import { COMMAND, FOLDER, INSTALL, STEPS, SUMMARY, USE, examples } from "@/lib/skill";+/** The file the skill writes, set as code where a line names it. USE stays plain text for llms.txt. */+const FILE = "hairline-<name>.html";+const named = (line: string) => {+ const i = line.indexOf(FILE);+ if (i < 0) return line;+ return <>{line.slice(0, i)}<code className="doc-code">{FILE}</code>{line.slice(i + FILE.length)}</>;+};+/** A block's place in the header's entrance. */const at = (i: number) => ({ "--i": i }) as CSSProperties;@@ -24,7 +32,7 @@ export default function Skill() {<main className="skill">{/* the home's hero sends people here, and the header arrives as the hero does */}<header className="hero-rise">- <h1 className="max-w-[16ch] text-[36px] font-medium leading-[1.05] tracking-[-0.035em] md:text-[44px]" style={at(0)}>Make your own figure</h1>+ <h1 className="max-w-[16ch] text-[36px] font-medium leading-[1.05] tracking-[-0.035em] text-balance md:text-[44px]" style={at(0)}>Make your own figure</h1><p className="mt-4 max-w-[64ch] text-[16px] leading-[1.55] text-muted" style={at(1)}>{SUMMARY}</p><div className="skill-install" style={at(2)}><Command code={INSTALL} kind="install" label="Copy install command" /></div></header>@@ -69,7 +77,7 @@ export default function Skill() {<section aria-labelledby="use-title" className="doc-section"><h2 id="use-title" className="doc-h2">How to use it</h2><div className="max-w-[460px]"><Command code={`${COMMAND} <idea>`} kind="usage" label="Copy command" /></div>- {USE.map((line) => <p key={line} className="doc-p">{line}</p>)}+ {USE.map((line) => <p key={line} className="doc-p">{named(line)}</p>)}<p className="doc-note">The six figures and their options are in <a className="doc-more" href="/docs">the docs</a>. The skill’s files are in <a className="doc-more" href={`${LINKS.github}/tree/main/skills/hairline-create`}>its folder on GitHub</a>.</p>