From c1e28224aa2e1450031669d9a7e359b63e04687d Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 22 Jul 2026 19:40:59 +0200 Subject: Init --- src/ui/base/BaseLayout.tsx | 134 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 src/ui/base/BaseLayout.tsx (limited to 'src/ui/base') diff --git a/src/ui/base/BaseLayout.tsx b/src/ui/base/BaseLayout.tsx new file mode 100644 index 0000000..c57d41e --- /dev/null +++ b/src/ui/base/BaseLayout.tsx @@ -0,0 +1,134 @@ +// @ts-types="corvos/mod.ts" +import { getGenerator, type Select } from "corvos/mod.ts"; + +import site from "@/corvos.config.ts"; + +import { SiteFooter } from "../components/SiteFooter.tsx"; +import { SiteNav } from "../components/SiteNav.tsx"; +import { Lightbox } from "../objects/Lightbox.tsx"; + +export interface Props { + page: Select; + image?: string; + theme?: "l1" | "l2" | null; + children?: JSX.Element; + class?: unknown; +} + +export const BaseLayout = site.$.component( + async ({ page, theme = "l1", image: imageUrl, children, class: cls }: Props, pages) => { + const query = site.$.query(pages); + + const stylesheet = await site.load("styles/style.scss"); + const script = await site.load("scripts/script.ts"); + const fonts = await site.glob("assets/**.woff2"); + const favicon = await site.load("assets/favicon.svg"); + const image = await site.load( + imageUrl ?? "https://strapi.volpeon.ink/uploads/icon_7999cf625e.png", + ); + + const feeds = query.type(".rss").many(); + + return ( + <> + {{ __html: "" }} + + + + + + + + + {fonts.map((font) => ( + + ))} + + + +