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>
This commit is contained in:
co-authored by
Josh Collinsworth
parent
d16172e420
commit
cb6d02d2eb
@@ -7,9 +7,10 @@ import { DemoBox } from "../../components/homepage/DemoBox.tsx";
|
||||
import { ExampleArrow } from "../../components/homepage/ExampleArrow.tsx";
|
||||
|
||||
const serverCode = `export default function HomePage() {
|
||||
const time = new Date().toLocaleString();
|
||||
const now = Temporal.Now.plainDateTimeISO()
|
||||
.toLocaleString("en-US");
|
||||
return (
|
||||
<p>Freshly server-rendered {time}</p>
|
||||
<p>Freshly server-rendered {now}</p>
|
||||
);
|
||||
}`;
|
||||
|
||||
@@ -22,8 +23,8 @@ export function RenderingSection() {
|
||||
aria-hidden="true"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="icon icon-tabler icon-tabler-atom text-fresh"
|
||||
width="4rem"
|
||||
height="4rem"
|
||||
width="2.5rem"
|
||||
height="2.5rem"
|
||||
viewBox="0 0 24 24"
|
||||
stroke-width="1.5"
|
||||
stroke="currentColor"
|
||||
@@ -38,16 +39,13 @@ export function RenderingSection() {
|
||||
<path d="M19.071 4.929c-1.562 -1.562 -6 .337 -9.9 4.243c-3.905 3.905 -5.804 8.337 -4.242 9.9c1.562 1.561 6 -.338 9.9 -4.244c3.905 -3.905 5.804 -8.337 4.242 -9.9" />
|
||||
<path d="M4.929 4.929c-1.562 1.562 .337 6 4.243 9.9c3.905 3.905 8.337 5.804 9.9 4.242c1.561 -1.562 -.338 -6 -4.244 -9.9c-3.905 -3.905 -8.337 -5.804 -9.9 -4.242" />
|
||||
</svg>
|
||||
<SectionHeading>
|
||||
Build fast apps fast
|
||||
</SectionHeading>
|
||||
<SectionHeading>Server-rendered by default</SectionHeading>
|
||||
<p>
|
||||
Fresh routes are dynamically server-rendered{" "}
|
||||
Every route renders on the server as a{" "}
|
||||
<a href="https://preactjs.com/" class="underline">Preact</a>{" "}
|
||||
components, so there's zero JavaScript shipped to the browser by
|
||||
default.
|
||||
component. Zero JavaScript hits the browser unless you opt in with
|
||||
an island. Pages are fast because they start as plain HTML.
|
||||
</p>
|
||||
<p>Simple to write; fast to run.</p>
|
||||
</div>
|
||||
<div class="flex flex-col gap-4">
|
||||
<CodeWindow name="routes/index.tsx">
|
||||
@@ -56,10 +54,8 @@ export function RenderingSection() {
|
||||
<ExampleArrow class="ml-[55%]" />{" "}
|
||||
<DemoBox>
|
||||
<p>
|
||||
Freshly server-rendered {new Date().toLocaleString("default", {
|
||||
dateStyle: "medium",
|
||||
timeStyle: "medium",
|
||||
})} UTC
|
||||
Freshly server-rendered{" "}
|
||||
{Temporal.Now.plainDateTimeISO().toLocaleString("en-US")}
|
||||
</p>
|
||||
</DemoBox>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user