deploy / deploy (push) Successful in 1m24s
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 Co-authored-by: Gitea Actions <-[email protected]>
111 lines
5.0 KiB
TypeScript
111 lines
5.0 KiB
TypeScript
import { cn } from "@cohaise/ui";
|
|
import type { DemoVariant } from "../data/demos";
|
|
|
|
const Bar = ({ className }: { className?: string }) => (
|
|
<span className={cn("block rounded-full bg-surface-hover", className)} aria-hidden="true" />
|
|
);
|
|
|
|
const Dot = ({ className }: { className?: string }) => (
|
|
<span className={cn("block rounded-full bg-surface-hover", className)} aria-hidden="true" />
|
|
);
|
|
|
|
/** Mini-interface neutre, dessinée en CSS : aucune capture, aucun logo, aucune marque. */
|
|
export const DemoMockup = ({ variant }: { variant: DemoVariant }) => (
|
|
<div className="relative aspect-[16/9] w-full overflow-hidden border-b border-border/60 bg-surface-sunken p-3 sm:p-4">
|
|
<div className="flex h-full flex-col">
|
|
<div className="mb-3 flex items-center gap-1.5" aria-hidden="true">
|
|
<Dot className="size-2 bg-border-control" />
|
|
<Dot className="size-2 bg-border-control" />
|
|
<Dot className="size-2 bg-accent-graphic" />
|
|
<span className="ml-auto h-2 w-24 rounded-full bg-surface-hover" />
|
|
</div>
|
|
{variant === "crm" ? <CrmMock /> : variant === "inventory" ? <InventoryMock /> : <LeaderboardMock />}
|
|
</div>
|
|
</div>
|
|
);
|
|
|
|
const CrmMock = () => (
|
|
<div className="flex min-h-0 flex-1 gap-3">
|
|
<div className="flex w-14 shrink-0 flex-col gap-2 rounded-md border border-border/50 bg-surface/50 p-2" aria-hidden="true">
|
|
<span className="h-1.5 w-6 rounded-full bg-accent-graphic" />
|
|
<Bar className="h-1.5 w-9" />
|
|
<Bar className="h-1.5 w-9" />
|
|
<Bar className="h-1.5 w-7" />
|
|
<div className="mt-auto" />
|
|
<Bar className="h-1.5 w-6" />
|
|
</div>
|
|
<div className="flex min-w-0 flex-1 flex-col gap-3">
|
|
<div className="grid shrink-0 grid-cols-3 gap-2" aria-hidden="true">
|
|
{[0, 1, 2].map((index) => (
|
|
<div key={index} className="flex flex-col gap-1.5 rounded-md border border-border/50 bg-surface/50 p-2">
|
|
<Bar className="h-1.5 w-8" />
|
|
<span className="h-3 w-7 rounded-sm bg-accent-graphic/70" />
|
|
</div>
|
|
))}
|
|
</div>
|
|
<div className="flex min-h-0 flex-1 flex-col gap-2.5 rounded-md border border-border/50 bg-surface/50 p-2.5" aria-hidden="true">
|
|
{[0, 1, 2, 3].map((index) => (
|
|
<div key={index} className="flex items-center gap-2">
|
|
<Dot className="size-3.5 shrink-0" />
|
|
<Bar className="h-2 w-1/2" />
|
|
<Bar className={cn("ml-auto h-1.5 w-9 rounded-full", index % 2 === 0 ? "bg-accent-graphic/50" : "bg-surface-hover")} />
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
|
|
const InventoryMock = () => (
|
|
<div className="flex min-h-0 flex-1 flex-col gap-3">
|
|
<div className="flex shrink-0 items-center gap-2" aria-hidden="true">
|
|
<span className="h-5 w-28 rounded-sm border border-border/50 bg-surface/50" />
|
|
<span className="ml-auto h-5 w-16 rounded-sm bg-accent-graphic/70" />
|
|
</div>
|
|
<div className="flex min-h-0 flex-1 gap-3">
|
|
<div className="flex min-w-0 flex-1 flex-col gap-2.5 rounded-md border border-border/50 bg-surface/50 p-2.5" aria-hidden="true">
|
|
{[0, 1, 2, 3, 4].map((index) => (
|
|
<div key={index} className="flex items-center gap-2">
|
|
<span className="size-3.5 shrink-0 rounded-sm bg-surface-hover" />
|
|
<Bar className="h-2 w-2/5" />
|
|
<Bar className="ml-auto h-2 w-14" />
|
|
<Bar className="h-1.5 w-8 rounded-full bg-accent-graphic/50" />
|
|
</div>
|
|
))}
|
|
</div>
|
|
<div className="flex w-16 shrink-0 flex-col justify-end gap-1.5 rounded-md border border-border/50 bg-surface/50 p-2" aria-hidden="true">
|
|
{["h-1/3", "h-2/3", "h-1/2", "h-4/5"].map((height, index) => (
|
|
<span key={index} className={cn("w-full rounded-sm", height, index === 3 ? "bg-accent-graphic/70" : "bg-surface-hover")} />
|
|
))}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
|
|
const LeaderboardMock = () => (
|
|
<div className="flex min-h-0 flex-1 gap-3">
|
|
<div className="flex w-2/5 shrink-0 flex-col justify-end gap-2" aria-hidden="true">
|
|
{[
|
|
{ label: "h-1/2", accent: true },
|
|
{ label: "h-4/5", accent: false },
|
|
{ label: "h-2/3", accent: false },
|
|
].map((item, index) => (
|
|
<div key={index} className="flex items-end justify-center gap-1">
|
|
<span className={cn("w-full rounded-md", item.label, item.accent ? "bg-accent-graphic" : "bg-surface-hover")} />
|
|
</div>
|
|
))}
|
|
</div>
|
|
<div className="flex min-w-0 flex-1 flex-col gap-2.5 rounded-md border border-border/50 bg-surface/50 p-2.5" aria-hidden="true">
|
|
{[0, 1, 2, 3].map((index) => (
|
|
<div key={index} className="flex items-center gap-2">
|
|
<Dot className="size-3.5 shrink-0 rounded-full bg-accent-graphic/70" />
|
|
<Bar className="h-2 w-1/3" />
|
|
<div className="ml-auto h-1.5 w-24 overflow-hidden rounded-full bg-surface-hover">
|
|
<span className={cn("block h-full rounded-full bg-accent-graphic/60", index === 0 ? "w-4/5" : index === 1 ? "w-3/5" : index === 2 ? "w-2/5" : "w-1/4")} />
|
|
</div>
|
|
</div>
|
|
))}
|
|
</div>
|
|
</div>
|
|
);
|