refactor(website): cut the stock patterns out of the design
Audited against the AI-design catalog. The world stays — the terminal aesthetic, the oxide accent, IBM Plex Mono are all chosen, and the audit cleared them. What went is the handful of defaults that had crept in underneath it. Eight feature cards at identical weight said every feature mattered equally. Search is what the client is for, so it takes a double-width cell and the grid drops to three up; eight cards plus that one double still comes out square. Each glyph sat in a 34px bordered square — the stock icon-in-a-chip treatment that ships with every component library. The glyphs are the real TUI's, so they now sit inline like the prompt markers they are. Callouts lose the coloured left rule. The catalog puts it plainly: a coloured left border is about as reliable a sign of generated design as an em-dash is in prose. The tone already lives in the label, which was saying the same thing twice. Thirteen arrow glyphs were typed into labels and link text. The leaving-the-site mark belongs to the control, not the copy, so Button draws it once, aria-hidden, and only when the link actually leaves. The "read more" arrows on internal links were pure flourish and are gone. The hero also drops "blazingly fast Rust", which TONE-OF-VOICE.md lists under banned, no exceptions.
This commit is contained in:
@@ -54,7 +54,10 @@ export const Nav = () => (
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex h-[38px] items-center gap-1.5 rounded-md border border-hairline px-2.5 font-mono text-xs text-secondary hover:border-line hover:bg-[var(--bg-selection)] hover:text-primary sm:h-8"
|
||||
>
|
||||
GitHub <span aria-hidden="true">↗</span>
|
||||
GitHub
|
||||
<span aria-hidden="true" className="text-[0.85em] opacity-60">
|
||||
↗
|
||||
</span>
|
||||
</a>
|
||||
<ThemeToggle />
|
||||
</div>
|
||||
|
||||
@@ -38,6 +38,11 @@ const isExternal = (href: string): boolean => /^https?:\/\//.test(href)
|
||||
* rather than a `<button>`. External links open in a new tab and carry
|
||||
* `rel="noopener"`; internal ones route through React Router so navigation
|
||||
* stays client-side.
|
||||
*
|
||||
* The leaving-the-site mark is drawn by the component, never typed into a
|
||||
* label. Hand-written "GitHub ↗" put the same glyph in thirteen strings and
|
||||
* made it copy — it belongs to the control, so the control renders it, once,
|
||||
* and only when the link actually leaves.
|
||||
*/
|
||||
export const Button = ({ href, variant, size, children, className }: ButtonProps) => {
|
||||
const classes = cn(buttonVariants({ variant, size }), className)
|
||||
@@ -46,6 +51,9 @@ export const Button = ({ href, variant, size, children, className }: ButtonProps
|
||||
return (
|
||||
<a href={href} target="_blank" rel="noopener noreferrer" className={classes}>
|
||||
{children}
|
||||
<span aria-hidden="true" className="text-[0.85em] opacity-60">
|
||||
↗
|
||||
</span>
|
||||
</a>
|
||||
)
|
||||
|
||||
|
||||
@@ -61,15 +61,18 @@ export const FeatureCard = ({
|
||||
className,
|
||||
)}
|
||||
>
|
||||
<div className="flex items-center gap-3">
|
||||
{/* The glyph sits in the line like a prompt marker, not in a chip. A
|
||||
tinted rounded square around an icon is the stock feature-card
|
||||
treatment; here the terminal already gives us a better idiom. */}
|
||||
<div className="flex items-center gap-2.5">
|
||||
{glyph !== undefined && (
|
||||
<div
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className="flex size-[34px] shrink-0 items-center justify-center rounded-md border border-hairline text-xl leading-none"
|
||||
className="shrink-0 text-lg leading-none"
|
||||
style={color !== undefined ? { color } : undefined}
|
||||
>
|
||||
{glyph}
|
||||
</div>
|
||||
</span>
|
||||
)}
|
||||
<div className="text-[15px] font-medium text-primary">{title}</div>
|
||||
</div>
|
||||
|
||||
@@ -37,12 +37,16 @@ interface CalloutProps {
|
||||
className?: string
|
||||
}
|
||||
|
||||
/** An aside with a coloured left rule. `warn` carries the tape amber. */
|
||||
/**
|
||||
* An aside. `warn` carries the tape amber.
|
||||
*
|
||||
* The tone lives in the label, not in a coloured left rule — one ribbon per
|
||||
* card is decoration, and the label was already saying the same thing twice.
|
||||
*/
|
||||
export const Callout = ({ title, tone = 'accent', children, className }: CalloutProps) => (
|
||||
<div
|
||||
className={cn(
|
||||
'rounded-md border border-hairline border-l-[3px] bg-panel px-[18px] py-5 sm:px-[22px]',
|
||||
tone === 'warn' ? 'border-l-warning' : 'border-l-accent',
|
||||
'rounded-md border border-hairline bg-panel px-[18px] py-5 sm:px-[22px]',
|
||||
'[&>p]:leading-[25px] [&>p]:text-secondary',
|
||||
className,
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user