import PageFooter from "../components/Footer.tsx"; import DocsHeader from "../components/DocsHeader.tsx"; import NavigationBar from "../components/NavigationBar.tsx"; import ComponentGallery from "../islands/ComponentGallery.tsx"; import { Head } from "$fresh/runtime.ts"; import { Handlers, PageProps } from "$fresh/server.ts"; function getSource(path: string) { return Deno.readTextFile(new URL(path, import.meta.url)); } export const handler: Handlers = { async GET(req, ctx) { const props: HomeProps = { sources: { "Button": await getSource("../components/gallery/Button.tsx"), "LinkButton": await getSource("../components/gallery/LinkButton.tsx"), "ColoredButton": await getSource( "../components/gallery/ColoredButton.tsx", ), "Input": await getSource("../components/gallery/Input.tsx"), "Header": await getSource("../components/gallery/Header.tsx"), "Footer": await getSource("../components/gallery/Footer.tsx"), }, }; return ctx.render(props); }, }; interface HomeProps { sources: Record; } export default function Home(props: PageProps) { return (
Components | fresh

Fresh Components

A collection of components made for Fresh.

); }