ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.
Python astracloudflarecontrol-panelcyberpaneldnsfablehosting-control-panelhosting-panelkimi-k3server-managementserverkitubuntu-web-panelwebserver
refactor(styles): delete the retired .page-header layout
Juan Denis5f44bf4442c9
diff --git a/frontend/src/pages/Docker.jsx b/frontend/src/pages/Docker.jsxindex bae0a7f7..da5b259a 100644--- a/frontend/src/pages/Docker.jsx+++ b/frontend/src/pages/Docker.jsx@@ -167,15 +167,11 @@ const Docker = () => {return <EmptyState loading loadingVariant="table" title="Checking Docker status..." />;}+ // No page header here: the unavailable panel below is its own heading, and+ // the workspace this falls back from carries no top bar either.if (!dockerStatus?.installed) {return (<div className="page-container docker-page">- <div className="page-header">- <div className="page-header-content">- <h1>Docker</h1>- <p className="page-description">Container management</p>- </div>- </div><div className="docker-unavailable"><div className="docker-unavailable-icon"><svg viewBox="0 0 24 24" width="64" height="64" stroke="currentColor" fill="none" strokeWidth="1">diff --git a/frontend/src/pages/StyleGuide.jsx b/frontend/src/pages/StyleGuide.jsxindex 6e09ecd2..f79b277b 100644--- a/frontend/src/pages/StyleGuide.jsx+++ b/frontend/src/pages/StyleGuide.jsx@@ -15,8 +15,9 @@ import {ChevronDown, ChevronRight, ExternalLink, Server, Database, Globe,Shield, Lock, Zap, Activity, BarChart3, Cloud, Terminal, Layers,Inbox, Table, AlertCircle, FileText, Monitor, Key, FolderOpen,- GitBranch, Package, HardDrive, Wifi, WifiOff+ GitBranch, Package, HardDrive, Wifi, WifiOff, Clock} from 'lucide-react';+import { PageTopbar, SearchField } from '@/components/ds';import Modal from '../components/Modal';import { ConfirmDialog } from '../components/ConfirmDialog';import StatusBadge from '../components/StatusBadge';@@ -95,12 +96,11 @@ export default function StyleGuide() {return (<div className="styleguide">- <div className="page-header">- <div>- <h1>Style Guide</h1>- <p className="subtitle">Design system reference — dev only</p>- </div>- </div>+ <PageTopbar+ icon={<Palette size={18} />}+ title="Style Guide"+ meta="Design system reference — dev only"+ /><Tabs value={activeSection} onValueChange={setActiveSection}><TabsList>@@ -1067,45 +1067,59 @@ export default function StyleGuide() {{/* ── PAGE HEADERS ── */}{activeSection === 'pageheaders' && (<div className="space-y-6">- <SectionTitle title="Standard Page Header (.page-header)" />- <p className="text-sm text-secondary mb-2">The canonical pattern. Use this for all pages.</p>- <div className="card" style={{ padding: 24 }}>- <div className="page-header" style={{ margin: 0, padding: 0 }}>- <div>- <h1>Page Title</h1>- <p className="subtitle">Description of the page</p>- </div>- <div className="flex gap-2">- <Button variant="outline"><RefreshCw size={16} /> Refresh</Button>- <Button><Plus size={16} /> Create</Button>- </div>- </div>+ <SectionTitle title="Tab group — the default (no title)" />+ <p className="text-sm text-secondary mb-2">+ How most pages get their bar: a parent <code>TabGroupLayout</code> renders+ one titleless <code>PageTopbar</code> for the whole group and swaps only the+ content below. Child pages render <strong>no bar of their own</strong> —+ they publish actions through <code>useTopbarActions()</code>, search+ right-most. The tab strip is the heading, so there is no title to repeat.+ </p>+ <div className="card" style={{ padding: 0, overflow: 'hidden' }}>+ <PageTopbar+ navLabel="Domains"+ tabs={[+ { to: '#sg-domains', label: 'Domains' },+ { to: '#sg-ssl', label: 'SSL Certificates' },+ ]}+ actions={(+ <>+ <Button variant="outline" size="sm"><RefreshCw size={15} /> Check DNS</Button>+ <Button size="sm"><Plus size={15} /> Add domain</Button>+ <SearchField placeholder="Search domains…" />+ </>+ )}+ /></div>- <SectionTitle title="Header with Stats Subtitle" />- <div className="card" style={{ padding: 24 }}>- <div className="page-header" style={{ margin: 0, padding: 0 }}>- <div>- <h1>Services</h1>- <p className="subtitle">12 services · 9 live</p>- </div>- <Button><Plus size={16} /> New Service</Button>- </div>+ <SectionTitle title="Standalone page — titled bar" />+ <p className="text-sm text-secondary mb-2">+ Only for pages with no tab group, and for entity pages where the title+ names <em>which</em> record you are on (Service Detail, Workspace…).+ Everything else should join a group.+ </p>+ <div className="card" style={{ padding: 0, overflow: 'hidden' }}>+ <PageTopbar+ icon={<Clock size={18} />}+ title="Cron Jobs"+ actions={(+ <>+ <Button variant="outline" size="sm"><RefreshCw size={15} /> Refresh</Button>+ <Button size="sm"><Plus size={15} /> Create job</Button>+ <SearchField placeholder="Search jobs or commands…" />+ </>+ )}+ /></div>- <SectionTitle title="Header with Conditional Actions" />- <div className="card" style={{ padding: 24 }}>- <div className="page-header" style={{ margin: 0, padding: 0 }}>- <div>- <h1>Git Server</h1>- <p className="subtitle">Self-hosted Git repository management</p>- </div>- <div className="flex gap-2">- <Button variant="outline"><ExternalLink size={16} /> Open Gitea</Button>- <Button variant="destructive">Stop Server</Button>- </div>- </div>- </div>+ <SectionTitle title="Retired: .page-header" />+ <p className="text-sm text-secondary mb-2">+ The old <code><div className="page-header"></code> +{' '}+ <code><h1></code> block has been removed from the codebase and its+ styles deleted. Don't reintroduce it — use one of the two bars above.+ Bespoke workspace pages (Docker, Database Explorer) intentionally carry no+ page bar at all; that is not a licence to invent a third header.+ </p><SectionTitle title="Card with Header + Actions" /><p className="text-sm text-secondary mb-2">For cards inside pages that need their own header row.</p>diff --git a/frontend/src/styles/components/_tabs.scss b/frontend/src/styles/components/_tabs.scssindex c090c364..bb60e034 100644--- a/frontend/src/styles/components/_tabs.scss+++ b/frontend/src/styles/components/_tabs.scss@@ -158,17 +158,14 @@}}-// Hide nested page headers when a page component is embedded as a tab+// Hide a nested page's own top bar when a page component is embedded as a tab+// (the `.page-header` selectors that used to live here went with the class)..tab-embedded {- > .page-container > .page-header,- > .page-header,> .top-bar,- > div > .page-header,> div > .top-bar {display: none;}- > [class*="-page"] > .page-header,> [class*="-page"] > header.top-bar,> [class*="-page"] > .top-bar {display: none;diff --git a/frontend/src/styles/layout/_main-content.scss b/frontend/src/styles/layout/_main-content.scssindex ddca5771..4df89011 100644--- a/frontend/src/styles/layout/_main-content.scss+++ b/frontend/src/styles/layout/_main-content.scss@@ -127,50 +127,11 @@}}-// Page Header (shared base)-.page-header {- display: flex;- justify-content: space-between;- align-items: flex-start;- margin-bottom: $space-6;- flex-wrap: wrap;- gap: $space-4;-- .page-header-content,- .header-info {- h1 {- font-size: $font-size-2xl;- font-weight: $font-weight-semibold;- margin: 0 0 $space-1 0;- color: $text-primary;- }-- .page-description,- p {- color: $text-secondary;- font-size: $font-size-sm;- margin: 0;- }- }-- .page-header-actions,- .header-actions {- display: flex;- gap: $space-2;- align-items: center;- flex-wrap: wrap;- }-- @media (max-width: $breakpoint-md) {- flex-direction: column;- align-items: stretch;-- .page-header-actions,- .header-actions {- justify-content: flex-end;- }- }-}+// REMOVED: `.page-header` (the old <div class="page-header"><h1>…</h1></div>+// block). Every page now gets its bar from PageTopbar — either titleless via+// TabGroupLayout (the default) or titled for standalone/entity pages. Bespoke+// workspace pages (Docker, Database Explorer) carry no page bar by design.+// See pages/StyleGuide.jsx → "Page Headers". Don't reintroduce this class.// .page is a legacy alias for .page-container — kept for any stragglers, no styling.// New pages should use .page-container directly.diff --git a/frontend/src/styles/pages/_docker.scss b/frontend/src/styles/pages/_docker.scssindex 5743c36c..4d91614c 100644--- a/frontend/src/styles/pages/_docker.scss+++ b/frontend/src/styles/pages/_docker.scss@@ -7,12 +7,6 @@padding: 0;}-.docker-page-header {- display: flex;- justify-content: space-between;- align-items: center;- margin-bottom: $space-6;-}.docker-page-title {h2 {@@ -624,22 +618,6 @@padding: $space-5;}- .page-header {- margin-bottom: $space-6;-- .page-header-content {- h1 {- font-size: $font-size-2xl;- font-weight: $font-weight-semibold;- margin: 0 0 $space-1 0;- }-- .page-description {- color: $text-secondary;- margin: 0;- }- }- }}.docker-unavailable {@@ -1105,16 +1083,11 @@padding: $space-5;overflow: hidden;- .page-header,.lv-header,.dx-stats-row,.dx-tabs {flex-shrink: 0;}-- .page-header {- margin-bottom: 0;- }}.dx-panel {@@ -1784,14 +1757,13 @@// Docker workspace polish: File Manager-style rail + click-open details drawer.docker-page-new.dx-page {- // Full-bleed zeroes out .main-content's padding, and the page-header is- // hidden, so without this the workbar hugs the viewport top. Give it the- // same breathing room other routes get from .main-content.+ // Full-bleed zeroes out .main-content's padding, and this workspace carries+ // no page bar, so without this the workbar hugs the viewport top. Give it+ // the same breathing room other routes get from .main-content.padding: $space-6 $space-5 $space-5;gap: $space-3;background: transparent;- .page-header,.lv-header,.dx-stats-row,.dx-tabs {diff --git a/frontend/src/styles/pages/_marketplace.scss b/frontend/src/styles/pages/_marketplace.scssindex 2f8ca87e..be447a98 100644--- a/frontend/src/styles/pages/_marketplace.scss+++ b/frontend/src/styles/pages/_marketplace.scss@@ -46,22 +46,6 @@}}- .page-header-content {- h1 {- margin: 0 0 $space-2;- font-size: $font-size-3xl;- line-height: $line-height-tight;- letter-spacing: 0;- }-- .page-description {- max-width: 680px;- color: $text-secondary;- font-size: $font-size-base;- line-height: $line-height-normal;- }- }-.marketplace-tabs__list {margin-bottom: $space-5;@@ -410,10 +394,6 @@}@media (max-width: $breakpoint-sm) {- .page-header-content h1 {- font-size: $font-size-2xl;- }-.marketplace-section__header {align-items: flex-start;flex-direction: column;diff --git a/frontend/src/styles/pages/_wordpress-pipeline.scss b/frontend/src/styles/pages/_wordpress-pipeline.scssindex 8b38352d..0556e509 100644--- a/frontend/src/styles/pages/_wordpress-pipeline.scss+++ b/frontend/src/styles/pages/_wordpress-pipeline.scss@@ -14,25 +14,6 @@.wp-projects-page {padding: $space-4;- .page-header {- margin-bottom: $space-6;- }-- .page-header-content {- h1 {- font-size: $font-size-xl;- font-weight: $font-weight-bold;- color: $text-primary;- margin: 0 0 $space-1;- }- }-- .page-description {- font-size: $font-size-sm;- color: $text-tertiary;- margin: 0;- }-.empty-state-large {display: flex;flex-direction: column;diff --git a/frontend/src/styles/pages/_wordpress.scss b/frontend/src/styles/pages/_wordpress.scssindex 8a709800..09a0137e 100644--- a/frontend/src/styles/pages/_wordpress.scss+++ b/frontend/src/styles/pages/_wordpress.scss@@ -31,34 +31,6 @@// WordPress Page Layout (extends Docker page styles).wordpress-page {- .page-header {- display: flex;- justify-content: space-between;- align-items: flex-start;- margin-bottom: $space-6;- padding: $space-4 $space-4 0;- flex-wrap: wrap;- gap: $space-4;-- .page-header-content {- h1 {- font-size: $font-size-2xl;- font-weight: $font-weight-semibold;- margin: 0 0 $space-1 0;- }-- .page-description {- color: $text-secondary;- margin: 0;- }- }-- .page-header-actions {- display: flex;- gap: $space-2;- }- }-.empty-state-large {display: flex;flex-direction: column;