Skip to content

Commit 45a7078

Browse files
committed
feat: rework hero, densify showcase sections, polish UI
Move hero copy to "The framework so simple, you already know it" with descriptive subtitle. Remove Simple section. Add "Take a tour" heading. Downsize all showcase components: smaller section headings, code blocks, icons, demo boxes, and arrows. Tighten PageSection and SideBySide gaps. Update handlers/forms code examples to use createDefine import.
1 parent a2343f0 commit 45a7078

21 files changed

Lines changed: 120 additions & 100 deletions

www/components/CodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function CodeBlock(
55
) {
66
return (
77
<pre
8-
class="rounded-lg text-base leading-relaxed bg-slate-800 text-white p-4 sm:p-6 md:p-4 lg:p-6 2xl:p-8 overflow-x-auto"
8+
class="rounded-lg text-sm leading-relaxed bg-slate-800 text-white p-3 sm:p-4 overflow-x-auto"
99
data-language={lang}
1010
// deno-lint-ignore react-no-danger
1111
><code dangerouslySetInnerHTML={{ __html: Prism.highlight(code, Prism.languages[lang], lang)}} /></pre>

www/components/CodeWindow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function CodeWindow(props: CodeWindowProps) {
1414
style={props.style}
1515
>
1616
<div class="flex items-stretch justify-start">
17-
<div class="p-4 flex items-center">
17+
<div class="p-3 flex items-center">
1818
<svg
1919
aria-hidden="true"
2020
width="41"
@@ -28,7 +28,7 @@ export function CodeWindow(props: CodeWindowProps) {
2828
<ellipse cx="35.9134" cy="5" rx="4.99155" ry="5" fill="#26C940" />
2929
</svg>
3030
</div>
31-
<div class="p-4 w-full leading-none text-slate-400 text-base font-mono">
31+
<div class="p-3 w-full leading-none text-slate-400 text-sm font-mono">
3232
{props.name ?? ""}
3333
</div>
3434
</div>

www/components/PageSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export function PageSection(props: JSX.HTMLAttributes<HTMLDivElement>) {
44
return (
55
<section
66
id={props.id ?? ""}
7-
class={`w-full max-w-screen-xl mx-auto my-16 md:my-24 lg:my-32 px-4 sm:px-8 lg:px-16 2xl:px-0 flex flex-col gap-8 md:gap-16 ${
7+
class={`w-full max-w-screen-xl mx-auto my-8 md:my-12 lg:my-16 px-4 sm:px-8 lg:px-16 2xl:px-0 flex flex-col gap-6 md:gap-8 ${
88
props.class ?? ""
99
}`}
1010
>

www/components/SideBySide.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function SideBySide(props: SideBySideProps) {
2626

2727
return (
2828
<div
29-
class={`grid grid-cols-1 items-center gap-12 md:gap-16 xl:gap-32 ${
29+
class={`grid grid-cols-1 items-center gap-8 md:gap-10 xl:gap-16 ${
3030
props.reverseOnDesktop ? "[&>*]:md:first:order-1" : ""
3131
} ${mdSplitClass} ${lgSplitClass} ${props.class ?? ""}`}
3232
>

www/components/homepage/APIRoutesSection.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,19 @@ export const handlers = define.handlers({
2727
export function APIRoutesSection() {
2828
return (
2929
<PageSection>
30-
<SideBySide mdColSplit="3/2" lgColSplit="3/2" reverseOnDesktop class="!items-start">
30+
<SideBySide
31+
mdColSplit="3/2"
32+
lgColSplit="3/2"
33+
reverseOnDesktop
34+
class="!items-start"
35+
>
3136
<div class="flex flex-col gap-4 md:sticky md:top-4">
3237
<svg
3338
aria-hidden="true"
3439
xmlns="http://www.w3.org/2000/svg"
3540
class="icon icon-tabler icon-tabler-api text-fresh"
36-
width="4rem"
37-
height="4rem"
41+
width="2.5rem"
42+
height="2.5rem"
3843
viewBox="0 0 24 24"
3944
stroke-width="1.5"
4045
stroke="currentColor"

www/components/homepage/DemoBox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function DemoBox(props: DemoBoxProps) {
99
const innerFlip = props.flip ? "skew-y-2 skew-x-3" : "-skew-y-2 -skew-x-3";
1010
return (
1111
<div
12-
class={`bg-gradient-to-br font-medium from-blue-200 via-green-300 to-yellow-200 p-8 py-12 text-center items-center flex justify-center ${outerFlip}`}
12+
class={`bg-gradient-to-br font-medium from-blue-200 via-green-300 to-yellow-200 p-5 py-8 text-center items-center flex justify-center text-sm ${outerFlip}`}
1313
>
1414
<div class={`w-full ${innerFlip}`}>
1515
{props.children}

www/components/homepage/ExampleArrow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function ExampleArrow(
1313
xmlns="http://www.w3.org/2000/svg"
1414
xml:space="preserve"
1515
style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;"
16-
class={`w-12 -my-8 relative z-10 mx-auto ${props?.class ?? ""}`}
16+
class={`w-8 -my-6 relative z-10 mx-auto ${props?.class ?? ""}`}
1717
>
1818
<path
1919
d="M50.704,18c46.89,80.967 38.288,189.344 5.941,254.255"

www/components/homepage/FormsSection.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ export function FormsSection() {
3535
aria-hidden="true"
3636
xmlns="http://www.w3.org/2000/svg"
3737
class="icon icon-tabler icon-tabler-route-square-2 text-fresh"
38-
width="4rem"
39-
height="4rem"
38+
width="2.5rem"
39+
height="2.5rem"
4040
viewBox="0 0 24 24"
4141
stroke-width="1.5"
4242
stroke="currentColor"

www/components/homepage/HeadSection.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export function HeadSection() {
3434
aria-hidden="true"
3535
xmlns="http://www.w3.org/2000/svg"
3636
class="icon icon-tabler icon-tabler-file-code text-fresh"
37-
width="4rem"
38-
height="4rem"
37+
width="2.5rem"
38+
height="2.5rem"
3939
viewBox="0 0 24 24"
4040
stroke-width="1.5"
4141
stroke="currentColor"
@@ -52,20 +52,27 @@ export function HeadSection() {
5252
</svg>
5353
<SectionHeading>
5454
Full control of{" "}
55-
<span dangerouslySetInnerHTML={{ __html: "&lt;head&gt;" }} />
55+
<span
56+
// deno-lint-ignore react-no-danger
57+
dangerouslySetInnerHTML={{ __html: "&lt;head&gt;" }}
58+
/>
5659
</SectionHeading>
5760
<p>
5861
Use the{" "}
5962
<code
6063
class="bg-gray-100 px-1.5 py-0.5 rounded text-sm font-mono"
64+
// deno-lint-ignore react-no-danger
6165
dangerouslySetInnerHTML={{ __html: "&lt;Head&gt;" }}
6266
/>{" "}
6367
component from any page or island to set titles, meta tags,
6468
stylesheets, and scripts — no hoisting hacks or side channels
6569
needed.
6670
</p>
6771
<FancyLink href="/docs/advanced/head" class="mt-2">
68-
<span dangerouslySetInnerHTML={{ __html: "Learn about &lt;Head&gt;" }} />
72+
<span
73+
// deno-lint-ignore react-no-danger
74+
dangerouslySetInnerHTML={{ __html: "Learn about &lt;Head&gt;" }}
75+
/>
6976
</FancyLink>
7077
</div>
7178
<div class="flex flex-col gap-4">

www/components/homepage/Hero.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ export function Hero() {
99
<div class="bg-green-300 mt-0 pt-32 md:pt-48 !mb-0 bg-gradient-to-br from-blue-100 via-green-200 to-yellow-100">
1010
<div class="md:grid grid-cols-5 gap-8 md:gap-16 items-center w-full max-w-screen-xl mx-auto px-4 md:px-8 lg:px-16 2xl:px-0">
1111
<div class="flex-1 text-center md:text-left md:col-span-3 pb-8 md:pb-32">
12+
<p class="italic text-gray-500 text-lg mb-4">Introducing Fresh:</p>
1213
<h2 class="text-[calc(1rem+4vw)] leading-tight sm:text-5xl lg:text-6xl sm:tracking-tight sm:leading-none font-extrabold">
13-
The simple, approachable, productive web framework
14+
The framework so simple, you already know it.
1415
</h2>
16+
<p class="mt-6 text-lg sm:text-xl text-gray-700 text-balance max-w-prose">
17+
No config files, no build step, no node_modules. Just one file and
18+
you have a server with routing, JSX, and islands.
19+
</p>
1520
<div class="mt-12 flex flex-wrap justify-center items-stretch md:justify-start gap-4">
1621
<FancyLink href="/docs/getting-started">Get started</FancyLink>
1722
<CopyArea code={`deno run -Ar jsr:@fresh/init`} />
1823
</div>
1924
</div>
20-
<div class="md:col-span-2 flex justify-center items-end">
25+
<div class="md:col-span-2 flex justify-center items-end pb-8 md:pb-32">
2126
<LemonTop />
2227
</div>
2328
</div>

0 commit comments

Comments
 (0)