import { ComponentChildren } from "preact"; import { resources } from "@lib/resources.ts"; import { CSS, KATEX_CSS } from "https://deno.land/x/gfm@0.2.5/mod.ts"; import { Head } from "$fresh/runtime.ts"; import Search, { RedirectSearchHandler } from "@islands/Search.tsx"; export type Props = { children: ComponentChildren; title?: string; name?: string; url: URL; description?: string; context?: { type: string }; }; export const MainLayout = ({ children, url, title, context }: Props) => { const hasSearch = url.search.includes("q="); return (
{title && {title}}
{hasSearch && } {!hasSearch && children}
); };