mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-18 18:04:17 +00:00
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:
@@ -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%); }
|
||||
|
||||
@@ -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')} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user