- rebuild the public site on the Next.js App Router with static export, per-section SEO pages, metadata, sitemap, robots and a generated OG image - add full-screen scroll-snap regions, staged scroll reveals, a hash-free tab navigation with a sliding indicator and region-by-region menu scrolling - replace the theme text toggle with animated sun/moon icons - restructure the CRM API into config, middleware, models, routes, services and utils layers - redesign the CRM shell with a single surface, tab rail, full-width blurred DataTable, record dialogs and mask-based icons - update Docker/Nginx publishing, Makefile targets, shared UI polish and docs
61 lines
1.6 KiB
TypeScript
61 lines
1.6 KiB
TypeScript
import type { ReactNode } from "react";
|
|
import { cn } from "@cohaise/ui";
|
|
|
|
export interface SectionProps {
|
|
id: string;
|
|
children: ReactNode;
|
|
className?: string;
|
|
/**
|
|
* Secondes d'attente avant de révéler la région, une fois qu'elle occupe
|
|
* le centre de l'écran. Absent → délai par défaut de `useScrollReveal`.
|
|
*/
|
|
delay?: number;
|
|
}
|
|
|
|
/**
|
|
* Une région = un écran. `min-h-dvh` et le scroll-snap de `globals.css`
|
|
* garantissent qu'on ne s'arrête jamais entre deux sections ; le contenu est
|
|
* centré verticalement et laisse respirer l'en-tête sticky en haut.
|
|
*/
|
|
export const Section = ({ id, children, className, delay }: SectionProps) => (
|
|
<section
|
|
id={id}
|
|
data-region
|
|
data-region-delay={delay === undefined ? undefined : String(delay)}
|
|
className={cn(
|
|
"relative mx-auto flex min-h-dvh w-full max-w-6xl flex-col justify-center px-4 pb-8 pt-20 sm:px-6 sm:py-16",
|
|
className,
|
|
)}
|
|
>
|
|
{children}
|
|
</section>
|
|
);
|
|
|
|
export const SectionHeading = ({
|
|
eyebrow,
|
|
title,
|
|
subtitle,
|
|
className,
|
|
}: {
|
|
eyebrow?: string;
|
|
title: string;
|
|
subtitle?: string;
|
|
className?: string;
|
|
}) => (
|
|
<div className={cn("mb-8 flex flex-col gap-3", className)} data-reveal>
|
|
{eyebrow ? (
|
|
<span className="font-display text-[0.625rem] font-semibold uppercase tracking-label text-accent-graphic">
|
|
{eyebrow}
|
|
</span>
|
|
) : null}
|
|
<h2 className="font-display text-3xl font-bold uppercase tracking-display sm:text-4xl">
|
|
{title}
|
|
</h2>
|
|
{subtitle ? (
|
|
<p className="max-w-2xl text-sm leading-relaxed text-muted-foreground sm:text-base">
|
|
{subtitle}
|
|
</p>
|
|
) : null}
|
|
</div>
|
|
);
|