Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
import { type ReactNode } from 'react';
|
|
|
|
|
import { cn } from '@/lib/utils';
|
|
|
|
|
|
|
|
|
|
interface PageHeaderProps {
|
|
|
|
|
title: string;
|
|
|
|
|
description?: string;
|
|
|
|
|
actions?: ReactNode;
|
|
|
|
|
className?: string;
|
2026-04-28 02:25:08 +02:00
|
|
|
/** Optional small uppercase label above the title. */
|
|
|
|
|
eyebrow?: string;
|
|
|
|
|
/** Optional one-line stats / KPI summary under the description. */
|
|
|
|
|
kpiLine?: ReactNode;
|
|
|
|
|
/** Render with the polished gradient-brand-soft background strip. */
|
|
|
|
|
variant?: 'plain' | 'gradient';
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-28 02:25:08 +02:00
|
|
|
* Consistent page-level header: title, optional description, KPI sub-line,
|
|
|
|
|
* eyebrow, and an action slot. Use `variant="gradient"` for hero strips on
|
|
|
|
|
* landing pages and detail headers; the plain variant remains the default so
|
|
|
|
|
* existing call-sites stay unchanged.
|
2026-04-29 14:23:40 +02:00
|
|
|
*
|
|
|
|
|
* Mobile-aware: below sm (640px) the header stacks vertically (title above
|
|
|
|
|
* actions) instead of side-by-side, and the description hides when actions
|
|
|
|
|
* are present (to preserve scroll real estate). Title font scales down too.
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
*/
|
2026-04-28 02:25:08 +02:00
|
|
|
export function PageHeader({
|
|
|
|
|
title,
|
|
|
|
|
description,
|
|
|
|
|
actions,
|
|
|
|
|
className,
|
|
|
|
|
eyebrow,
|
|
|
|
|
kpiLine,
|
|
|
|
|
variant = 'plain',
|
|
|
|
|
}: PageHeaderProps) {
|
|
|
|
|
const isGradient = variant === 'gradient';
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
return (
|
2026-04-28 02:25:08 +02:00
|
|
|
<div
|
|
|
|
|
className={cn(
|
2026-04-29 14:23:40 +02:00
|
|
|
'mb-4 flex flex-col gap-3 sm:mb-6 sm:flex-row sm:items-start sm:justify-between sm:gap-4',
|
2026-04-28 02:25:08 +02:00
|
|
|
isGradient &&
|
|
|
|
|
'rounded-xl border border-slate-200 bg-gradient-brand-soft px-5 py-4 shadow-xs',
|
|
|
|
|
className,
|
|
|
|
|
)}
|
|
|
|
|
>
|
2026-04-29 14:23:40 +02:00
|
|
|
<div className="min-w-0 flex-1">
|
2026-04-28 02:25:08 +02:00
|
|
|
{eyebrow ? (
|
|
|
|
|
<div className="mb-1 text-xs font-semibold uppercase tracking-wide text-brand">
|
|
|
|
|
{eyebrow}
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
2026-04-29 14:23:40 +02:00
|
|
|
<h1 className="truncate text-xl font-bold tracking-tight text-foreground sm:text-2xl">
|
|
|
|
|
{title}
|
|
|
|
|
</h1>
|
|
|
|
|
{description ? (
|
|
|
|
|
<p className={cn('mt-1 text-sm text-muted-foreground', actions && 'hidden sm:block')}>
|
|
|
|
|
{description}
|
|
|
|
|
</p>
|
|
|
|
|
) : null}
|
2026-04-28 02:25:08 +02:00
|
|
|
{kpiLine ? (
|
|
|
|
|
<div className="mt-2 flex flex-wrap items-center gap-x-4 gap-y-1 text-sm text-muted-foreground">
|
|
|
|
|
{kpiLine}
|
|
|
|
|
</div>
|
|
|
|
|
) : null}
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
</div>
|
2026-04-29 14:23:40 +02:00
|
|
|
{actions ? (
|
|
|
|
|
<div className="flex shrink-0 flex-wrap items-center gap-2 sm:flex-nowrap">{actions}</div>
|
|
|
|
|
) : null}
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|