4 Commits

Author SHA1 Message Date
640c3f0cdd Update src/app/layout.tsx 2026-03-07 20:17:28 +00:00
d0362ef20e Update src/app/layout.tsx 2026-03-07 20:16:40 +00:00
0636d91c17 Merge version_4 into main
Merge version_4 into main
2026-03-07 20:14:42 +00:00
9e7a93ec6e Merge version_4 into main
Merge version_4 into main
2026-03-07 20:13:36 +00:00

View File

@@ -1,18 +1,16 @@
import type { Metadata } from "next"; import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google"; import localFont from "next/font/local";
import "./styles/variables.css"; import "./styles/variables.css";
import "./globals.css"; import "./styles/base.css";
const geistSans = Geist({ const geistSans = localFont({
variable: "--font-geist-sans", subsets: ["latin"], src: "./fonts/GeistVF.woff2", variable: "--font-geist-sans", weight: "100 900"});
});
const geistMono = Geist_Mono({ const geistMono = localFont({
variable: "--font-geist-mono", subsets: ["latin"], src: "./fonts/GeistMonoVF.woff2", variable: "--font-geist-mono", weight: "100 900"});
});
export const metadata: Metadata = { export const metadata: Metadata = {
title: "Exotic Pets - Premium Exotic Animals", description: "Discover ethically sourced, health-certified exotic animals including snakes, turtles, and macaws. Expert care and lifetime support."}; title: "Exotic Pets - Premium & Ethical Animals", description: "Discover ethically sourced, health-certified exotic animals including snakes, turtles, and macaws. Expert care and lifetime support."};
export default function RootLayout({ export default function RootLayout({
children, children,
@@ -21,28 +19,23 @@ export default function RootLayout({
}) { }) {
return ( return (
<html lang="en" suppressHydrationWarning> <html lang="en" suppressHydrationWarning>
<head> <body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
{children}
<script <script
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: ` __html: `
if (typeof window !== 'undefined') { try {
const html = document.documentElement; if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
html.style.setProperty('--vw', window.innerWidth / 100 + 'px'); document.documentElement.classList.add('dark')
window.addEventListener('resize', () => { } else {
html.style.setProperty('--vw', window.innerWidth / 100 + 'px'); document.documentElement.classList.remove('dark')
}); }
} } catch (e) {}
`, `,
}} }}
/> />
</head>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
suppressHydrationWarning
>
<ServiceWrapper>
{children}
</ServiceWrapper>
<script <script
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
@@ -1414,7 +1407,3 @@ export default function RootLayout({
</html> </html>
); );
} }
function ServiceWrapper({ children }: { children: React.ReactNode }) {
return <>{children}</>;
}