/** @jsx h */ /** @jsxFrag Fragment */ import { Fragment, h, Head, tw } from "../client_deps.ts"; import Counter from "../islands/Counter.tsx"; export default function MainPage() { return ( <> fresh - The next-gen web framework. ); } function Hero() { const container = tw`w-full h-64 flex justify-center items-center flex-col`; const title = tw `text(4xl sm:5xl lg:6xl gray-900 center) sm:tracking-tight font-extrabold`; const subtitle = tw`mt-4 text(2xl gray-600)`; return (

fresh

The next-gen web framework.

); } function NavigationBar(props: { active: string }) { const items = [ { name: "Home", href: "/", }, { name: "Docs", href: "/docs", }, ]; return ( ); } function Intro() { return (

Fresh is a next generation web framework, built for speed, reliability, and simplicity. Some stand out features:

  • Just-in-time rendering on the edge.
  • Island based client hydration for maximum interactivity.
  • Zero runtime overhead: no JS is shipped to the client by default.
  • No build step.
  • No configuration necessary.
  • TypeScript support out of the box.

Fresh embraces the tried and true design of server side rendering and processing.

); } function GettingStarted() { return (

Getting started

To get started, make sure you have the{" "} Deno CLI {" "} installed.

Then, run the following command to install the `fresh` CLI:

        deno install -A -f --no-check -n fresh
        https://raw.githubusercontent.com/lucacasonato/fresh/main/cli.ts
      

Once installed, you can use the `fresh` command to bootstrap a new project:

        fresh init my-app
      

Enter the newly created project directory and run the following command to start the development server:

        deno run -A --watch main.ts
      

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.

); } const timeFmt = new Intl.DateTimeFormat("en-US", { timeStyle: "long", hour12: false, }); function Example() { return (

Example

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.

); }