77 lines
1.9 KiB
TypeScript
77 lines
1.9 KiB
TypeScript
'use client'
|
|
import Footer from "@/components/Landing Page/Footer";
|
|
import { Navbar } from "@/components/navbar";
|
|
import { fontSans } from "@/config/fonts";
|
|
import { siteConfig } from "@/config/site";
|
|
import "@/styles/globals.css";
|
|
import clsx from "clsx";
|
|
import { Metadata } from "next";
|
|
import { Providers } from "./providers";
|
|
import { usePathname } from "next/navigation";
|
|
import { PPIDLayout } from "@/components/layout/ppid-layout";
|
|
import NavbarHumas from "@/components/navbar/NavbarHumas";
|
|
|
|
// export const metadata: Metadata = {
|
|
// title: {
|
|
// default: siteConfig.name,
|
|
// template: `%s - ${siteConfig.name}`,
|
|
// },
|
|
// description: siteConfig.description,
|
|
// themeColor: [
|
|
// { media: "(prefers-color-scheme: light)", color: "white" },
|
|
// { media: "(prefers-color-scheme: dark)", color: "black" },
|
|
// ],
|
|
// icons: {
|
|
// icon: "/favicon.ico",
|
|
// shortcut: "/favicon-16x16.png",
|
|
// apple: "/apple-touch-icon.png",
|
|
// },
|
|
// };
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
const pathname = usePathname();
|
|
console.log(pathname)
|
|
|
|
return (
|
|
<html lang="en" suppressHydrationWarning>
|
|
<head />
|
|
<body
|
|
className={clsx(
|
|
"bg-background font-sans antialiased",
|
|
fontSans.variable
|
|
)}
|
|
>
|
|
<Providers themeProps={{ attribute: "class", defaultTheme: "dark" }}>
|
|
{pathname === "/" ? (
|
|
<div className="relative">
|
|
<NavbarHumas />
|
|
<section className="md:absolute md:top-0 w-full ">
|
|
<img
|
|
alt="banner"
|
|
src="/headerbannerpng.png"
|
|
className=" w-full"
|
|
/>
|
|
<main className="pt-8 px-2 md:px-4 lg:px-6 flex-grow">
|
|
{children}
|
|
</main>
|
|
<Footer />
|
|
</section>
|
|
</div>
|
|
) : (
|
|
<>
|
|
<PPIDLayout>
|
|
{children}
|
|
</PPIDLayout>
|
|
<Footer />
|
|
</>
|
|
)}
|
|
</Providers>
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|