- Update HelloBar to announce Fresh 2.3 with feature callouts
(WebSockets, View Transitions, Temporal API)
- Rework hero section: new headline ("The framework so simple, you
already know it"), descriptive subtitle, moved CTA to left
- Remove old Simple section, add "Take a tour of Fresh" heading before
showcase
- Add new showcase sections: View Transitions, API Routes/Handlers,
WebSockets, `<Head>` element, OpenTelemetry
- Fix broken Deco showcase image (missing `/showcase/` directory)
- Fix syntax highlighting in Simple section (was using raw `<pre>`
instead of Prism)
- Update RenderingSection to use Temporal API instead of Date API
- Fix cursor styles on Forms and Partials interactive demos
- Move WebSocket docs from Examples to Advanced in TOC
- Densify all showcase sections: smaller headings, code blocks, icons,
demo boxes, arrows, and tighter spacing
---------
Co-authored-by: Josh Collinsworth <joshuajcollinsworth@gmail.com>
94 lines
3.1 KiB
TypeScript
94 lines
3.1 KiB
TypeScript
import { CodeBlock } from "../../components/CodeBlock.tsx";
|
|
import { CodeWindow } from "../../components/CodeWindow.tsx";
|
|
import { PageSection } from "../../components/PageSection.tsx";
|
|
import { SideBySide } from "../../components/SideBySide.tsx";
|
|
import { SectionHeading } from "../../components/homepage/SectionHeading.tsx";
|
|
import { DemoBox } from "../../components/homepage/DemoBox.tsx";
|
|
import { ExampleArrow } from "../../components/homepage/ExampleArrow.tsx";
|
|
import { RecipeDemo } from "../../components/homepage/RecipeDemo.tsx";
|
|
import { FancyLink } from "../../components/FancyLink.tsx";
|
|
|
|
const islandCode = `import { Partial } from "fresh/runtime";
|
|
|
|
export const Recipes = () => (
|
|
<div f-client-nav>
|
|
<aside>
|
|
<button f-partial="/recipes/lemonade">
|
|
Lemonade
|
|
</button>
|
|
<button f-partial="/recipes/lemon-honey-tea">
|
|
Lemon-honey tea
|
|
</button>
|
|
<button f-partial="/recipes/lemondrop">
|
|
Lemondrop Martini
|
|
</button>
|
|
</aside>
|
|
<main>
|
|
<Partial name="recipe">
|
|
Click a recipe to stream HTML into this spot
|
|
</Partial>
|
|
</main>
|
|
</div>
|
|
);`;
|
|
|
|
export function PartialsSection() {
|
|
return (
|
|
<PageSection id="partials">
|
|
<SideBySide
|
|
mdColSplit="3/2"
|
|
lgColSplit="3/2"
|
|
reverseOnDesktop
|
|
class="!items-start"
|
|
>
|
|
<div class="flex flex-col gap-4 md:sticky md:top-4">
|
|
<svg
|
|
aria-hidden="true"
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
class="icon icon-tabler icon-tabler-arrows-transfer-down text-fresh"
|
|
width="2.5rem"
|
|
height="2.5rem"
|
|
viewBox="0 0 24 24"
|
|
stroke-width="1.5"
|
|
stroke="currentColor"
|
|
fill="none"
|
|
stroke-linecap="round"
|
|
stroke-linejoin="round"
|
|
>
|
|
<title>Arrows transferring data down</title>
|
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
|
<path d="M17 3v6" />
|
|
<path d="M10 18l-3 3l-3 -3" />
|
|
<path d="M7 21v-18" />
|
|
<path d="M20 6l-3 -3l-3 3" />
|
|
<path d="M17 21v-2" />
|
|
<path d="M17 15v-2" />
|
|
</svg>
|
|
|
|
<SectionHeading>Stream HTML straight from the server</SectionHeading>
|
|
<p>
|
|
Swap chunks of HTML from the server straight into the page. No full
|
|
reload, no client-side routing library. Click a link or submit a
|
|
form and Fresh streams just the part that changed. Perfect for
|
|
interactive elements and dynamic apps.
|
|
</p>
|
|
<FancyLink href="/docs/advanced/partials" class="mt-4">
|
|
Learn more about Partials
|
|
</FancyLink>
|
|
</div>
|
|
<div class="flex flex-col gap-4">
|
|
<CodeWindow name="components/Recipes.tsx">
|
|
<CodeBlock
|
|
code={islandCode}
|
|
lang="jsx"
|
|
/>
|
|
</CodeWindow>
|
|
<ExampleArrow class="[transform:rotateY(-180deg)]" />
|
|
<DemoBox flip>
|
|
<RecipeDemo />
|
|
</DemoBox>
|
|
</div>
|
|
</SideBySide>
|
|
</PageSection>
|
|
);
|
|
}
|