mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
* feat(design-systems): add tokens.css + components.html for 9 AI product brands
Compiles DESIGN.md prose into machine-consumable agent artifacts for
claude, cohere, elevenlabs, huggingface, mistral-ai, nvidia, opencode-ai,
replicate, and together-ai.
Each brand adds:
- tokens.css — :root block of CSS custom properties derived from the brand's
DESIGN.md; agents paste this directly into generated HTML <style> tags
- components.html — reference fixture embedding the token block inline and
demonstrating buttons, inputs, cards, and badges styled
with var(--token-name) calls
Key brand decisions encoded:
- claude: warm parchment canvas, terracotta accent, Anthropic Serif display
- cohere: pure white, 22px signature radius, CohereText + Unica77
- elevenlabs: achromatic + warm stone, Waldenburg weight 300, pill-shaped
- huggingface: IBM Plex Mono headings/tags, HF Yellow (#ffd21e), 4-6px radius
- mistral-ai: golden amber palette, Arial weight 400, near-zero radius
- nvidia: true black, NVIDIA Green as border/outline signal only, teal hover
- opencode-ai: Berkeley Mono sole typeface, flat depth (ring-only elevation)
- replicate: pill-shaped everything (9999px), rb-freigeist-neue heavy
- together-ai: "The Future" font, -0.03em tracking, white/midnight dual world
openai tokens.css + components.html were merged to main separately.
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(design-systems): sync :root token blocks with tokens.css for opencode-ai and together-ai
opencode-ai: add missing "Liberation Mono" to all three font-stack fallbacks.
together-ai: remove --lavender declaration absent from tokens.css (guard requires byte-identical :root blocks).
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: chaoxiaoche <chaoxiaoche@chaoxiaochedeMacBook-Pro.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
389 lines
16 KiB
HTML
389 lines
16 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>OpenCode AI — reference components</title>
|
|
<meta
|
|
name="description"
|
|
content="Reference fixture for design-systems/opencode-ai. Terminal-native dark:
|
|
warm near-black canvas, Berkeley Mono sole typeface, flat depth (no shadows),
|
|
Apple HIG semantic colors, 880px narrow reading column."
|
|
/>
|
|
|
|
<style>
|
|
:root {
|
|
--bg: #201d1d;
|
|
--surface: #302c2c;
|
|
--surface-warm: var(--surface);
|
|
|
|
--fg: #fdfcfc;
|
|
--fg-2: #c8c6c4;
|
|
--muted: #9a9898;
|
|
--meta: #6e6e73;
|
|
|
|
--border: #464343;
|
|
--border-soft: #302c2c;
|
|
|
|
--accent: #007aff;
|
|
--accent-on: #ffffff;
|
|
--accent-hover: #0056b3;
|
|
--accent-active: #004085;
|
|
|
|
--success: #30d158;
|
|
--warn: #ff9f0a;
|
|
--danger: #ff3b30;
|
|
|
|
/* Berkeley Mono is the ONLY font — no typographic variation */
|
|
--font-display: "Berkeley Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
|
--font-body: "Berkeley Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
|
--font-mono: "Berkeley Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
|
|
|
|
--text-xs: 12px;
|
|
--text-sm: 14px;
|
|
--text-base: 16px;
|
|
--text-lg: 18px;
|
|
--text-xl: 22px;
|
|
--text-2xl: 28px;
|
|
--text-3xl: 38px;
|
|
--text-4xl: 48px;
|
|
|
|
--leading-body: 1.5;
|
|
--leading-tight: 1.0;
|
|
--tracking-display: 0em;
|
|
|
|
--space-1: 4px;
|
|
--space-2: 8px;
|
|
--space-3: 12px;
|
|
--space-4: 16px;
|
|
--space-5: 20px;
|
|
--space-6: 24px;
|
|
--space-8: 32px;
|
|
--space-12: 48px;
|
|
|
|
--section-y-desktop: 80px;
|
|
--section-y-tablet: 64px;
|
|
--section-y-phone: 48px;
|
|
|
|
--radius-sm: 4px;
|
|
--radius-md: 6px;
|
|
--radius-lg: 8px;
|
|
--radius-pill: 9999px;
|
|
|
|
--elev-flat: none;
|
|
--elev-ring: 0 0 0 1px var(--border);
|
|
--elev-raised: 0 0 0 2px var(--border);
|
|
|
|
--focus-ring: 0 0 0 2px var(--accent);
|
|
|
|
--motion-fast: 100ms;
|
|
--motion-base: 150ms;
|
|
--ease-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
|
|
--container-max: 880px; /* Narrow reading column — "everything is code" */
|
|
--container-gutter-desktop: 24px;
|
|
--container-gutter-tablet: 20px;
|
|
--container-gutter-phone: 16px;
|
|
}
|
|
|
|
/* ─── Reset ─────────────────────────────────────────────── */
|
|
*, *::before, *::after { box-sizing: border-box; }
|
|
html, body { margin: 0; padding: 0; }
|
|
body {
|
|
background: var(--bg);
|
|
color: var(--fg);
|
|
font-family: var(--font-body);
|
|
font-size: var(--text-base);
|
|
line-height: var(--leading-body);
|
|
-webkit-font-smoothing: antialiased;
|
|
}
|
|
|
|
/* ─── Layout — narrow reading column ─────────────────────── */
|
|
.container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--container-gutter-desktop); }
|
|
section { padding-block: var(--section-y-desktop); }
|
|
section + section { border-top: 1px solid var(--border); }
|
|
@media (max-width: 1023px) {
|
|
.container { padding-inline: var(--container-gutter-tablet); }
|
|
section { padding-block: var(--section-y-tablet); }
|
|
}
|
|
@media (max-width: 639px) {
|
|
.container { padding-inline: var(--container-gutter-phone); }
|
|
section { padding-block: var(--section-y-phone); }
|
|
}
|
|
|
|
/* ─── Typography — Berkeley Mono only ───────────────────── */
|
|
h1, h2, h3 {
|
|
font-family: var(--font-display); /* Same typeface as body — no switching */
|
|
font-weight: 700; /* Bold headings — size + weight only */
|
|
line-height: 1.2;
|
|
margin: 0;
|
|
letter-spacing: 0; /* Monospace needs no tracking adjust */
|
|
}
|
|
h1 { font-size: var(--text-3xl); } /* 38px — Heading 1 */
|
|
h2 { font-size: var(--text-2xl); } /* 28px */
|
|
h3 { font-size: var(--text-xl); } /* 22px */
|
|
p { margin: 0; font-weight: 400; }
|
|
.lead { font-size: var(--text-lg); color: var(--fg-2); line-height: var(--leading-body); }
|
|
.body-muted { color: var(--muted); }
|
|
.body-sm { font-size: var(--text-sm); }
|
|
/* Section labels — same font, smaller, muted */
|
|
.eyebrow {
|
|
font-family: var(--font-mono);
|
|
font-size: var(--text-xs);
|
|
font-weight: 500;
|
|
color: var(--muted);
|
|
letter-spacing: 0;
|
|
}
|
|
/* Inline code — same mono font, just tinted */
|
|
code {
|
|
font-family: var(--font-mono);
|
|
font-size: 0.9em;
|
|
color: var(--success); /* Apple green for inline code */
|
|
background: rgba(48, 209, 88, 0.08);
|
|
padding: 1px 5px;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
.stack-3 > * + * { margin-block-start: var(--space-3); }
|
|
.stack-4 > * + * { margin-block-start: var(--space-4); }
|
|
.stack-6 > * + * { margin-block-start: var(--space-6); }
|
|
|
|
/* ─── Buttons — flat, Apple-blue primary ────────────────── */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-2);
|
|
padding: 8px 16px;
|
|
border-radius: var(--radius-sm); /* 4px — utilitarian */
|
|
font-family: var(--font-body); /* Berkeley Mono */
|
|
font-size: var(--text-sm);
|
|
font-weight: 500;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
border: 1px solid transparent;
|
|
transition: background-color var(--motion-fast) var(--ease-standard),
|
|
border-color var(--motion-fast) var(--ease-standard);
|
|
text-decoration: none;
|
|
}
|
|
.btn:active { transform: translateY(1px); }
|
|
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
|
|
/* Primary: Apple system blue */
|
|
.btn-primary {
|
|
background: var(--accent);
|
|
color: var(--accent-on);
|
|
border-color: var(--accent);
|
|
}
|
|
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
|
|
.btn-primary:active { background: var(--accent-active); }
|
|
/* Secondary: flat outlined on dark surface */
|
|
.btn-secondary {
|
|
background: transparent;
|
|
color: var(--fg-2);
|
|
border-color: var(--border);
|
|
}
|
|
.btn-secondary:hover { background: var(--surface); color: var(--fg); }
|
|
|
|
/* ─── Inputs — flat, no shadows ────────────────────────── */
|
|
.field { display: flex; flex-direction: column; gap: var(--space-2); }
|
|
.field label {
|
|
font-family: var(--font-mono);
|
|
font-size: var(--text-xs);
|
|
font-weight: 500;
|
|
color: var(--muted);
|
|
}
|
|
.field input {
|
|
padding: 8px 12px;
|
|
border-radius: var(--radius-md); /* 6px — slightly more approachable */
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
color: var(--fg);
|
|
font-family: var(--font-mono); /* Berkeley Mono in inputs */
|
|
font-size: var(--text-sm);
|
|
outline: none;
|
|
transition: border-color var(--motion-fast) var(--ease-standard),
|
|
box-shadow var(--motion-fast) var(--ease-standard);
|
|
}
|
|
.field input:focus-visible {
|
|
border-color: var(--accent);
|
|
box-shadow: var(--focus-ring); /* Apple blue ring — no shadow */
|
|
}
|
|
.field input::placeholder { color: var(--meta); }
|
|
.field-help { font-size: var(--text-xs); color: var(--meta); }
|
|
|
|
/* ─── Cards — flat via border, not shadow ───────────────── */
|
|
.card {
|
|
background: var(--surface);
|
|
border: 1px solid var(--border); /* Ring creates depth — NO shadow */
|
|
border-radius: var(--radius-md);
|
|
padding: 16px 20px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-3);
|
|
}
|
|
|
|
/* ─── Badges — Apple HIG semantic palette ───────────────── */
|
|
.badge {
|
|
display: inline-flex; align-items: center; gap: var(--space-2);
|
|
padding: 2px 8px;
|
|
border-radius: var(--radius-sm);
|
|
font-family: var(--font-mono);
|
|
font-size: var(--text-xs); font-weight: 500; line-height: 1.2;
|
|
}
|
|
.badge-success { color: var(--success); background: rgba(48, 209, 88, 0.12); }
|
|
.badge-danger { color: var(--danger); background: rgba(255, 59, 48, 0.12); }
|
|
.badge-warn { color: var(--warn); background: rgba(255, 159, 10, 0.12); }
|
|
.badge-accent { color: var(--accent); background: rgba(0, 122, 255, 0.12); }
|
|
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
|
|
|
|
/* ─── Links, kbd ────────────────────────────────────────── */
|
|
a { color: var(--accent); text-decoration: none; }
|
|
a:hover { text-decoration: underline; }
|
|
kbd {
|
|
font-family: var(--font-mono);
|
|
font-size: var(--text-xs);
|
|
padding: 2px 6px;
|
|
border-radius: var(--radius-sm);
|
|
border: 1px solid var(--border);
|
|
background: var(--surface);
|
|
color: var(--muted);
|
|
}
|
|
|
|
/* ─── Terminal prompt prefix ────────────────────────────── */
|
|
.prompt {
|
|
font-family: var(--font-mono);
|
|
font-size: var(--text-sm);
|
|
color: var(--success);
|
|
display: flex; align-items: baseline; gap: var(--space-2);
|
|
}
|
|
.prompt::before {
|
|
content: "$";
|
|
color: var(--muted);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* ─── Layout helpers ────────────────────────────────────── */
|
|
.hero-actions { display: flex; gap: var(--space-3); margin-block-start: var(--space-6); flex-wrap: wrap; }
|
|
.features-stack > * + * { margin-block-start: var(--space-5); }
|
|
.form { display: flex; flex-direction: column; gap: var(--space-4); }
|
|
.form-actions { display: flex; gap: var(--space-3); margin-block-start: var(--space-2); }
|
|
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
|
|
.icon { width: 16px; height: 16px; flex-shrink: 0; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<main class="container">
|
|
<section data-od-id="hero">
|
|
<div class="stack-4">
|
|
<p class="eyebrow">reference-fixture · opencode-ai</p>
|
|
<h1>The terminal has a design system.</h1>
|
|
<p class="lead" style="max-width: 60ch">
|
|
Warm near-black canvas (<code>#201d1d</code>). Berkeley Mono is the
|
|
only typeface — "everything is code." Flat depth: no shadows, only
|
|
border rings and background shifts. Apple HIG colors.
|
|
</p>
|
|
<div class="hero-actions">
|
|
<a href="./tokens.css" class="btn btn-primary">
|
|
View tokens
|
|
<svg class="icon" viewBox="0 0 24 24" fill="none"
|
|
stroke="currentColor" stroke-width="1.75"
|
|
stroke-linecap="round" stroke-linejoin="round"
|
|
aria-hidden="true"><path d="M5 12h14M13 6l6 6-6 6"/></svg>
|
|
</a>
|
|
<a href="./DESIGN.md" class="btn btn-secondary">Read DESIGN.md</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section data-od-id="status">
|
|
<div class="stack-4">
|
|
<p class="eyebrow">apple-hig-semantic-colors</p>
|
|
<h2>Familiar signals on dark canvas.</h2>
|
|
<p class="body-muted" style="max-width: 56ch">
|
|
<code>#30d158</code> success · <code>#ff9f0a</code> warn ·
|
|
<code>#ff3b30</code> danger · <code>#007aff</code> accent.
|
|
Monospace badges. No rounded pills.
|
|
</p>
|
|
<div style="display: flex; gap: var(--space-3); flex-wrap: wrap; margin-block-start: var(--space-4);">
|
|
<span class="badge badge-success"><span class="badge-dot" aria-hidden="true"></span>passing</span>
|
|
<span class="badge badge-warn"><span class="badge-dot" aria-hidden="true"></span>stale</span>
|
|
<span class="badge badge-danger"><span class="badge-dot" aria-hidden="true"></span>failed</span>
|
|
<span class="badge badge-accent"><span class="badge-dot" aria-hidden="true"></span>running</span>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section data-od-id="features">
|
|
<div class="stack-3">
|
|
<p class="eyebrow">what-this-fixture-exercises</p>
|
|
<h2>Flat depth. Border rings. No blur.</h2>
|
|
</div>
|
|
<div class="features-stack" style="margin-block-start: var(--space-8)">
|
|
<article class="card">
|
|
<div class="row-between">
|
|
<h3>Berkeley Mono — every tier</h3>
|
|
<span class="badge badge-accent">A1-identity</span>
|
|
</div>
|
|
<p class="body-muted body-sm">
|
|
--font-display, --font-body, and --font-mono all resolve to the same
|
|
font stack. Hierarchy is created by size and weight (400 / 500 / 700)
|
|
alone. No switching between faces.
|
|
</p>
|
|
<p class="prompt" aria-label="Inspect tokens">cat tokens.css | grep font</p>
|
|
</article>
|
|
<article class="card">
|
|
<div class="row-between">
|
|
<h3>Flat elevation system</h3>
|
|
<span class="badge badge-accent">A1-structure</span>
|
|
</div>
|
|
<p class="body-muted body-sm">
|
|
--elev-flat: none · --elev-ring: 0 0 0 1px var(--border) ·
|
|
--elev-raised: 0 0 0 2px var(--border). All three use ring outlines.
|
|
Zero blur, zero spread. Depth via bg-shift: <code>#201d1d</code> → <code>#302c2c</code>.
|
|
</p>
|
|
<a href="./tokens.css" class="body-sm">Inspect elevation →</a>
|
|
</article>
|
|
<article class="card">
|
|
<div class="row-between">
|
|
<h3>880px narrow column</h3>
|
|
<span class="badge badge-accent">A1-structure</span>
|
|
</div>
|
|
<p class="body-muted body-sm">
|
|
--container-max: 880px. Single-column, text-centric layout.
|
|
"The whole page is a terminal session" — no multi-column marketing grids.
|
|
Generous 80px section spacing.
|
|
</p>
|
|
<div style="display: flex; gap: var(--space-2); margin-block-start: var(--space-1);">
|
|
Press <kbd>⌘</kbd> <kbd>K</kbd> to jump
|
|
</div>
|
|
</article>
|
|
</div>
|
|
</section>
|
|
|
|
<section data-od-id="form">
|
|
<div class="stack-4">
|
|
<p class="eyebrow">form-components</p>
|
|
<h2>Config-file inputs.</h2>
|
|
<p class="body-muted" style="max-width: 56ch">
|
|
Labels are small monospace — they look like config keys.
|
|
Inputs use 6px radius (the roundest element in the system),
|
|
warm borders, and a 2px Apple blue focus ring.
|
|
</p>
|
|
</div>
|
|
<form class="form" style="margin-block-start: var(--space-8);" onsubmit="event.preventDefault();">
|
|
<div class="field">
|
|
<label for="anthropic-key">ANTHROPIC_API_KEY</label>
|
|
<input id="anthropic-key" type="text" placeholder="sk-ant-api03-..." autocomplete="off" />
|
|
<p class="field-help">Set in environment or paste here to persist in keychain.</p>
|
|
</div>
|
|
<div class="field">
|
|
<label for="model-id">DEFAULT_MODEL</label>
|
|
<input id="model-id" type="text" placeholder="claude-opus-4" />
|
|
</div>
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn btn-primary">Save config</button>
|
|
<button type="button" class="btn btn-secondary">Reset</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
</main>
|
|
</body>
|
|
</html>
|