app-whistling-shiba-drift/app/layout.tsx

155 lines
6.0 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { Metadata } from "next";
import "./globals.css";
import { GeistSans } from "geist/font/sans";
import { cn } from "@/lib/utils";
import { ThemeProvider } from "@/context/theme-provider";
import { LanguageProvider } from "@/context/language-provider";
import { NavBar } from "@/components/navbar";
import { KleapScripts } from "@/components/kleap-scripts";
import { DevToolsGuard } from "./devtools-guard";
import { TailwindCDNClient } from "@/components/tailwind-cdn-client";
export const metadata: Metadata = {
title: {
default: "Accident | See it. Report it. Save lives. | شاهد بلّغ أنقذ الأرواح",
template: "%s | Accident",
},
description:
"Accident - See it. Report it. Save lives. شاهد بلّغ أنقذ الأرواح. A bilingual platform for reporting incidents and ensuring public safety.",
keywords: ["Accident", "Safety", "Reporting", "Emergency", "Bilingual", "Arabic", "English"],
authors: [{ name: "Accident Reporting Team" }],
creator: "Accident Safety Org",
publisher: "Accident Safety Org",
icons: {
icon: "/favicon.ico",
shortcut: "/favicon.ico",
apple: "/favicon.ico",
},
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
"max-video-preview": -1,
"max-image-preview": "large",
"max-snippet": -1,
},
},
openGraph: {
type: "website",
locale: "en_US",
url: process.env.NEXT_PUBLIC_URL || "https://kleap.co",
siteName: "Accident - Report Incidents & Stay Safe",
title: "Accident - Report Incidents & Stay Safe - AI-Powered Solution",
description:
"Built with Kleap - AI-powered platform to create stunning websites and apps. Turn your ideas into reality in minutes.",
images: [
{
url: "/og-image.png",
width: 1200,
height: 630,
alt: "Accident - Report Incidents & Stay Safe",
},
],
},
twitter: {
card: "summary_large_image",
title: "Accident - Report Incidents & Stay Safe - AI-Powered Solution",
description:
"Built with Kleap - AI-powered platform to create stunning websites and apps. Turn your ideas into reality in minutes.",
images: ["/og-image.png"],
creator: "@accident_report",
},
metadataBase: new URL(process.env.NEXT_PUBLIC_URL || "https://kleap.co"),
alternates: {
canonical: "/",
},
};
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<html lang="en" suppressHydrationWarning>
<head suppressHydrationWarning>
{/*
CRITICAL: Base styles to prevent FOUC and hydration errors
⚠️ DO NOT REMOVE OR MODIFY WITHOUT CAREFUL TESTING ⚠️
React 19 requires href and precedence attributes on style tags
*/}
<style href="kleap-base-styles" precedence="high">{`
/* Base styles to prevent FOUC - always rendered server+client */
.bg-white { background-color: white; }
.bg-black { background-color: black; }
.text-white { color: white; }
.text-black { color: black !important; }
.text-neutral-700 { color: rgb(64 64 64) !important; }
.text-neutral-600 { color: rgb(82 82 82) !important; }
.text-neutral-500 { color: rgb(115 115 115) !important; }
.text-muted { color: rgb(82 82 82) !important; }
.antialiased { -webkit-font-smoothing: antialiased; }
.h-full { height: 100%; }
.w-full { width: 100%; }
/*
IMPORTANT: Button and shadcn/ui color styles
These classes are NOT generated by Tailwind v4 CDN and MUST be defined manually
Without these, buttons and shadcn components will appear unstyled
DO NOT REMOVE - Required for all shadcn/ui components to work properly
*/
.bg-primary { background-color: #020022; }
.text-primary-foreground { color: hsl(0 0% 98%); }
.hover\\:bg-primary\\/90:hover { background-color: rgba(2, 0, 34, 0.9); }
.bg-secondary { background-color: hsl(240 4.8% 95.9%); }
.text-secondary-foreground { color: hsl(240 5.9% 10%); }
.hover\\:bg-secondary\\/80:hover { background-color: hsla(240, 4.8%, 95.9%, 0.8); }
.bg-destructive { background-color: hsl(0 84.2% 60.2%); }
.text-destructive-foreground { color: hsl(0 0% 98%); }
.hover\\:bg-destructive\\/90:hover { background-color: hsla(0, 84.2%, 60.2%, 0.9); }
.border-input { border-color: hsl(240 5.9% 90%); }
.bg-background { background-color: hsl(0 0% 100%); }
.bg-accent { background-color: hsl(240 4.8% 95.9%); }
.text-accent-foreground { color: hsl(240 5.9% 10%); }
.hover\\:bg-accent:hover { background-color: hsl(240 4.8% 95.9%); }
.hover\\:text-accent-foreground:hover { color: hsl(240 5.9% 10%); }
.ring-offset-background { --tw-ring-offset-color: hsl(0 0% 100%); }
.focus-visible\\:ring-2:focus-visible { --tw-ring-width: 2px; }
.focus-visible\\:ring-ring:focus-visible { --tw-ring-color: hsl(240 5.9% 10%); }
.focus-visible\\:ring-offset-2:focus-visible { --tw-ring-offset-width: 2px; }
/* FOUC prevention - hide body until CSS is loaded */
body { opacity: 1; }
body:not(.css-loaded) { opacity: 0; }
`}</style>
</head>
<body
className={cn(
GeistSans.className,
"bg-white antialiased h-full w-full",
)}
suppressHydrationWarning // Prevents browser extension conflicts
>
<TailwindCDNClient />
<DevToolsGuard />
<ThemeProvider
attribute="class"
enableSystem={false}
disableTransitionOnChange
defaultTheme="light"
>
<LanguageProvider>
<KleapScripts />
<main>
<NavBar />
{children}
</main>
</LanguageProvider>
</ThemeProvider>
</body>
</html>
);
}