- 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
121 lines
3.2 KiB
TypeScript
121 lines
3.2 KiB
TypeScript
import type { Metadata, Viewport } from "next";
|
|
import "./globals.css";
|
|
import { Providers } from "./providers";
|
|
import { Header } from "./components/Header";
|
|
import { Footer } from "./components/Footer";
|
|
import { BackToTop } from "./components/BackToTop";
|
|
import { Background } from "./components/Background";
|
|
import { ScrollReveal } from "./components/ScrollReveal";
|
|
import { SITE_DESCRIPTION, SITE_NAME, SITE_URL } from "./lib/site";
|
|
|
|
export const metadata: Metadata = {
|
|
metadataBase: new URL(SITE_URL),
|
|
title: {
|
|
default: "CoHaiSe — Développement web, applications et design sur mesure",
|
|
template: "%s | CoHaiSe",
|
|
},
|
|
description: SITE_DESCRIPTION,
|
|
applicationName: SITE_NAME,
|
|
authors: [{ name: "Esiah", url: SITE_URL }],
|
|
creator: "CoHaiSe",
|
|
publisher: "CoHaiSe",
|
|
category: "technology",
|
|
keywords: [
|
|
"développement web",
|
|
"site vitrine",
|
|
"application mobile",
|
|
"React",
|
|
"Next.js",
|
|
"UI UX design",
|
|
"logiciel sur mesure",
|
|
"CoHaiSe",
|
|
],
|
|
alternates: {
|
|
canonical: "/",
|
|
},
|
|
openGraph: {
|
|
type: "website",
|
|
locale: "fr_FR",
|
|
url: SITE_URL,
|
|
siteName: SITE_NAME,
|
|
title: "CoHaiSe — Développement web, applications et design sur mesure",
|
|
description: SITE_DESCRIPTION,
|
|
images: [
|
|
{
|
|
url: "/images/cohaise.webp",
|
|
width: 512,
|
|
height: 512,
|
|
alt: "CoHaiSe",
|
|
},
|
|
],
|
|
},
|
|
twitter: {
|
|
card: "summary_large_image",
|
|
title: "CoHaiSe — Développement web, applications et design sur mesure",
|
|
description: SITE_DESCRIPTION,
|
|
images: ["/images/cohaise.webp"],
|
|
},
|
|
icons: {
|
|
icon: [{ url: "/favicon.webp", type: "image/webp" }],
|
|
shortcut: ["/favicon.webp"],
|
|
},
|
|
robots: {
|
|
index: true,
|
|
follow: true,
|
|
googleBot: { index: true, follow: true },
|
|
},
|
|
};
|
|
|
|
export const viewport: Viewport = {
|
|
colorScheme: "light dark",
|
|
themeColor: [
|
|
{ media: "(prefers-color-scheme: light)", color: "#f7f5f4" },
|
|
{ media: "(prefers-color-scheme: dark)", color: "#050000" },
|
|
],
|
|
};
|
|
|
|
// Script anti-FOUC : applique le thème enregistré avant le premier rendu.
|
|
const themeScript = `(() => {
|
|
try {
|
|
const stored = localStorage.getItem("cohaise-theme");
|
|
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
const theme = stored ?? (prefersDark ? "dark" : "light");
|
|
if (theme === "dark") document.documentElement.classList.add("dark");
|
|
} catch {}
|
|
})();`;
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<html lang="fr" suppressHydrationWarning>
|
|
<head>
|
|
<script dangerouslySetInnerHTML={{ __html: themeScript }} />
|
|
</head>
|
|
<body className="bg-background text-foreground antialiased">
|
|
<Providers>
|
|
<div
|
|
id="top"
|
|
className="relative flex min-h-screen flex-col"
|
|
>
|
|
<Background />
|
|
|
|
<div className="relative z-10 flex flex-1 flex-col">
|
|
<Header />
|
|
<main data-scroll-snap className="flex flex-1 flex-col">
|
|
{children}
|
|
</main>
|
|
<Footer />
|
|
</div>
|
|
|
|
<BackToTop />
|
|
<ScrollReveal />
|
|
</div>
|
|
</Providers>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|