diff --git a/www/islands/CopyArea.tsx b/www/islands/CopyArea.tsx index 073eef3a..32065a78 100644 --- a/www/islands/CopyArea.tsx +++ b/www/islands/CopyArea.tsx @@ -4,15 +4,15 @@ import { IS_BROWSER } from "$fresh/runtime.ts"; import * as Icons from "../components/Icons.tsx"; import { useSignal } from "@preact/signals"; -export default function CopyArea(props: { children: ComponentChildren }) { +export default function CopyArea(props: { code: string }) { const copied = useSignal(false); async function handleClick() { - if (props.children === undefined || props.children === null) { + if (props.code === undefined || props.code === null) { return; } try { - await navigator.clipboard.writeText(props.children.toString()); + await navigator.clipboard.writeText(props.code.toString()); copied.value = true; } catch (error) { copied.value = false; @@ -33,7 +33,7 @@ export default function CopyArea(props: { children: ComponentChildren }) { return (
- {props.children}
+ {props.code}
Enter the newly created project directory and run the following command to start the development server:
-You can now open{" "} diff --git a/www/routes/update.tsx b/www/routes/update.tsx index eb0900de..0a7c15e9 100644 --- a/www/routes/update.tsx +++ b/www/routes/update.tsx @@ -1,14 +1,5 @@ -import { asset, Head } from "$fresh/runtime.ts"; import { Handlers, PageProps } from "$fresh/server.ts"; -import Counter from "../islands/Counter.tsx"; -import LemonDrop from "../islands/LemonDrop.tsx"; -import Footer from "../components/Footer.tsx"; import VERSIONS from "../../versions.json" assert { type: "json" }; -import * as FeatureIcons from "../components/FeatureIcons.tsx"; -import CopyArea from "../islands/CopyArea.tsx"; -import * as Icons from "../components/Icons.tsx"; -import Projects from "../components/Projects.tsx"; -import projects from "../data/showcase.json" assert { type: "json" }; export const handler: Handlers = { GET(req) { @@ -23,266 +14,3 @@ export const handler: Handlers = { }); }, }; - -const TITLE = "fresh - The next-gen web framework."; -const DESCRIPTION = - "Just in time edge rendering, island based interactivity, and no configuration TypeScript support using Deno."; - -export default function MainPage(props: PageProps) { - const ogImageUrl = new URL(asset("/home-og.png"), props.url).href; - const origin = `${props.url.protocol}//${props.url.host}`; - - return ( - <> -
-- Built for speed, reliability, and simplicity. -
-- Fresh embraces the tried and true design of server side rendering and - progressive enhancement on the client side. -
-- - Deno CLI - {" "} - version 1.25.0 or higher is required.{" "} - - Install - {" "} - or{" "} - - update - . -
-- To bootstrap a new project: -
- -- Enter the newly created project directory and run the following command - to start the development server: -
- -- You can now open{" "} - - http://localhost:8000 - {" "} - in your browser to view the page. -
-- A more in-depth{" "} - - Getting Started - {" "} - guide is available in{" "} - the docs. -
-- This text is being server side rendered on the fly. It was rendered at - {" "} - {timeFmt.format(new Date())}. -
-- The counter below was rendered on the server with a starting value of 3, - and was then hydrated on the client to provide interactivity. Try out - the buttons! -
-- Only the JS required to render that counter is sent to the client. -
-- Below is a selection of projects that have been built with Fresh. -
-