Files
sweet/www/components/CodeWindow.tsx
T
Bartek IwańczukandJosh Collinsworth cb6d02d2eb feat: refresh landing page for Fresh 2.3 (#3775)
- 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>
2026-04-24 18:03:22 +02:00

39 lines
1.1 KiB
TypeScript

import type { JSX } from "preact";
interface CodeWindowProps extends JSX.HTMLAttributes<HTMLDivElement> {
name?: string;
}
export function CodeWindow(props: CodeWindowProps) {
return (
<div
{...props}
class={`-mx-4 sm:mx-0 w-[calc(100%+2rem)] sm:w-full sm:rounded-lg bg-slate-700 overflow-hidden sm:max-w-full [&>*]:rounded-t-none ${
props.class ?? ""
}`}
style={props.style}
>
<div class="flex items-stretch justify-start">
<div class="p-3 flex items-center">
<svg
aria-hidden="true"
width="41"
height="10"
viewBox="0 0 41 10"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<ellipse cx="20.9388" cy="5" rx="4.99155" ry="5" fill="#FFBD2D" />
<ellipse cx="5.96421" cy="5" rx="4.99155" ry="5" fill="#FF5F56" />
<ellipse cx="35.9134" cy="5" rx="4.99155" ry="5" fill="#26C940" />
</svg>
</div>
<div class="p-3 w-full leading-none text-slate-400 text-sm font-mono">
{props.name ?? ""}
</div>
</div>
{props.children}
</div>
);
}