import type { JSX, JSXElement } from "solid-js"; // import { CookiesContainer } from "@/components/common/Cookies"; import { MobileNavigation } from "@/partials/MobileNavigation"; import { usePageContext } from "vike-solid/usePageContext"; // import { clientOnly } from "vike-react/clientOnly"; import { createEffect, createSignal } from "solid-js"; import { HeroSection } from "@/partials/HeroSection"; import { Navigation } from "@/partials/Navigation"; import { DocsLayout } from "./DocsLayout"; import { Link } from "@/components/Link"; import { Logo } from "@/components/Logo"; import { Toaster } from "solid-toast"; import clsx from "clsx"; import "./tailwind.css"; // const Search = clientOnly(() => import("@/components/Search").then((module) => module.Search)); function Search() { return null; } function GitHubIcon(props: JSX.IntrinsicElements["svg"]) { return ( ); } function Header() { const [isScrolled, setIsScrolled] = createSignal(false); createEffect(() => { function onScroll() { setIsScrolled(window.scrollY > 0); } onScroll(); window.addEventListener("scroll", onScroll, { passive: true }); return () => { window.removeEventListener("scroll", onScroll); }; }, []); return (
{/* } /> */}
); } function Footer() { return ( ); } type DefaultLayoutProps = { children: JSXElement; }; export default function DefaultLayout(props: DefaultLayoutProps) { const { urlPathname } = usePageContext(); const isHomePage = urlPathname === "/"; return ( <>
{isHomePage && }