feat(ui): PageHeader + SectionHeading editorial primitives

Assisted-by: Claude:claude-opus-4-8 [Claude Code]
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2026-06-18 10:34:43 +00:00
parent b73b93850c
commit abd8162aad
4 changed files with 48 additions and 0 deletions

View File

@@ -1159,6 +1159,36 @@
margin: 0;
}
.page-header--editorial {
display: flex;
align-items: flex-end;
justify-content: space-between;
gap: var(--spacing-lg);
flex-wrap: wrap;
margin-bottom: var(--space-section, var(--spacing-xl));
}
.page-header__lead { display: flex; flex-direction: column; gap: var(--spacing-xs); min-width: 0; }
.page-header__eyebrow {
font-family: var(--font-mono);
font-size: var(--text-xs);
font-weight: var(--font-weight-semibold);
text-transform: uppercase;
letter-spacing: 0.14em;
color: var(--color-eyebrow);
display: inline-flex;
align-items: center;
gap: var(--spacing-xs);
}
.page-header__eyebrow::before {
content: '';
width: 18px;
height: 1px;
background: var(--color-eyebrow);
opacity: 0.7;
}
.page-header__supporting { color: var(--color-text-secondary); font-size: var(--text-base); margin: 0; max-width: 60ch; }
.page-header__meta { display: flex; align-items: center; gap: var(--spacing-sm); flex-wrap: wrap; }
.page-subtitle {
font-size: var(--text-sm);
color: var(--color-text-secondary);

View File

@@ -0,0 +1,14 @@
// Editorial page header: left eyebrow + serif title + supporting line,
// right-aligned meta/actions slot. Asymmetric, left-aligned.
export default function PageHeader({ eyebrow, title, supporting, actions, className = '' }) {
return (
<header className={`page-header page-header--editorial ${className}`.trim()}>
<div className="page-header__lead">
{eyebrow && <span className="page-header__eyebrow">{eyebrow}</span>}
{title && <h1 className="page-title">{title}</h1>}
{supporting && <p className="page-header__supporting">{supporting}</p>}
</div>
{actions && <div className="page-header__meta">{actions}</div>}
</header>
)
}

View File

@@ -0,0 +1,3 @@
export default function SectionHeading({ children, className = '' }) {
return <h3 className={`section-heading ${className}`.trim()}>{children}</h3>
}

View File

@@ -112,6 +112,7 @@
--spacing-xl: 2rem;
--spacing-2xl: 3rem;
--spacing-3xl: 4rem;
--space-section: clamp(2rem, 1.2rem + 3vw, 3.5rem);
/* Radii — sharp, editorial */
--radius-sm: 3px;