fix(ui): wrap page header actions below the title on narrow screens

The page header kept the title and its action buttons on one row, and
the buttons do not shrink. At phone width the buttons took most of the
row, so the subtitle was squeezed to one character per line (the Skills
page at 390px). The title now keeps at least 280px and the actions wrap
below it when they do not fit; desktop layout is unchanged. The Hooks
page's own flex-wrap override is no longer needed.
This commit is contained in:
Willie
2026-11-09 23:49:26 +08:00
parent 9f9f26885a
commit 21dd8d000c
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -76,8 +76,9 @@ svg.lucide { flex: none; stroke-width: var(--isw); }
.ss-wrap the 28px flex gap already does it, and both together left a 56px hole. */
.ss-pgh { margin-bottom: 28px; }
.ss-wrap > .ss-pgh { margin-bottom: 0; }
.ss-ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.ss-ph .tt { display: flex; flex-direction: column; gap: 6px; }
/* The title keeps at least 280px; when the actions do not fit beside it they wrap below. */
.ss-ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.ss-ph .tt { display: flex; flex: 1 1 280px; flex-direction: column; gap: 6px; }
.ss-ph p { color: var(--ink-2); }
:root[data-theme="playful"] .ss-ph h1 span { background: linear-gradient(transparent 58%, var(--pa) 58%, var(--pa) 92%, transparent 92%); padding: 0 4px; margin: 0 -4px; }
:root[data-theme="playful"].dark .ss-ph h1 span { background: linear-gradient(transparent 58%, rgba(232,168,76,.45) 58%, rgba(232,168,76,.45) 92%, transparent 92%); }
+1 -1
View File
@@ -12,7 +12,7 @@ export default function HooksPage() {
<div className="animate-fade-in">
{error && <div className="ss-note bad mb-4"><span className="flex-1">{error.message}</span></div>}
{data ? (
<HooksScope data={data} header={(actions) => <PageHeader className="[&_.ss-ph]:flex-wrap" title={t('hooks.title')} subtitle={t('hooks.subtitle')} actions={actions} />} />
<HooksScope data={data} header={(actions) => <PageHeader title={t('hooks.title')} subtitle={t('hooks.subtitle')} actions={actions} />} />
) : (
<PageHeader title={t('hooks.title')} subtitle={t('hooks.subtitle')} />
)}