import { asset, Head } from "$fresh/runtime.ts"; import { Handlers, PageProps } from "$fresh/server.ts"; import VERSIONS from "$fresh/versions.json" with { type: "json" }; import Footer from "$fresh/www/components/Footer.tsx"; import Header from "$fresh/www/components/Header.tsx"; import { CTA } from "$fresh/www/components/homepage/CTA.tsx"; import { Hero } from "$fresh/www/components/homepage/Hero.tsx"; import { IslandsSection } from "$fresh/www/components/homepage/IslandsSection.tsx"; import { PartialsSection } from "$fresh/www/components/homepage/PartialsSection.tsx"; import { RenderingSection } from "$fresh/www/components/homepage/RenderingSection.tsx"; import { FormsSection } from "../components/homepage/FormsSection.tsx"; import { Simple } from "$fresh/www/components/homepage/Simple.tsx"; import { SocialProof } from "$fresh/www/components/homepage/SocialProof.tsx"; import { DenoSection } from "$fresh/www/components/homepage/DenoSection.tsx"; export const handler: Handlers = { GET(req, ctx) { const accept = req.headers.get("accept"); const userAgent = req.headers.get("user-agent"); if (userAgent?.includes("Deno/") && !accept?.includes("text/html")) { const path = `https://deno.land/x/fresh@${VERSIONS[0]}/init.ts`; return new Response(`Redirecting to ${path}`, { headers: { "Location": path }, status: 307, }); } return ctx.render(); }, }; const TITLE = "Fresh - The simple, approachable, productive web framework."; const DESCRIPTION = "Fresh features just-in-time edge rendering, island based interactivity, and zero-configuration TypeScript support. Fast to write; fast to run."; export default function MainPage(props: PageProps) { const ogImageUrl = new URL(asset("/og-image.webp"), props.url).href; const origin = `${props.url.protocol}//${props.url.host}`; return ( <> {TITLE}
); } function HelloBar() { return ( Fresh v1.6 has been released with Tailwind CSS,{" "} better Plugin API and more{" "} → ); }