Skip to content

Commit 1362729

Browse files
committed
style: update learn page design
1 parent 5ee890d commit 1362729

File tree

1 file changed

+75
-27
lines changed

1 file changed

+75
-27
lines changed

apps/docs/src/app/(home)/learn/page.tsx

Lines changed: 75 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,82 @@ export default function LearnIndexPage() {
99
const learnTabs = getLearnTabs();
1010

1111
return (
12-
<main className="flex flex-col items-center justify-center min-h-screen px-2 py-12 bg-white dark:bg-neutral-950 transition-colors">
13-
<h1 className="text-3xl md:text-4xl font-bold mb-4 text-neutral-900 dark:text-neutral-100">
14-
{tHome('learn', { defaultValue: 'Learn Next.js' })}
15-
</h1>
16-
<p className="mb-8 text-neutral-600 dark:text-neutral-400 text-center max-w-xl">
17-
{tHome('featuresSubtitle', {
18-
defaultValue: 'Choose a learning path to get started with Next.js.',
19-
})}
20-
</p>
21-
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 w-full max-w-3xl">
22-
{learnTabs.map((tab) => (
23-
<Link
24-
key={tab.url}
25-
href={tab.url}
26-
className="group flex items-center gap-4 p-6 rounded-xl border border-neutral-200 dark:border-neutral-800 bg-neutral-50 dark:bg-neutral-900 hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors shadow-sm"
27-
>
28-
<span className="text-2xl">{tab.icon}</span>
29-
<div className="flex-1">
30-
<div className="font-semibold text-lg text-neutral-900 dark:text-neutral-100 group-hover:text-blue-600 dark:group-hover:text-blue-400 transition-colors">
31-
{tab.title}
32-
</div>
33-
<div className="text-neutral-600 dark:text-neutral-400 text-sm mt-1">
34-
{tab.description}
12+
<main className="min-h-screen bg-fd-background">
13+
{/* Hero Section */}
14+
<section className="w-full py-20 relative overflow-hidden">
15+
{/* Background decoration */}
16+
<div className="absolute inset-0 bg-fd-muted opacity-50" />
17+
<div className="absolute top-0 right-1/4 w-96 h-96 bg-purple-100 dark:bg-purple-900/20 rounded-full blur-3xl opacity-30" />
18+
<div className="absolute bottom-0 left-1/4 w-96 h-96 bg-blue-100 dark:bg-blue-900/20 rounded-full blur-3xl opacity-30" />
19+
20+
<div className="container max-w-6xl mx-auto px-6 relative z-10">
21+
<div className="text-center">
22+
<h1 className="text-5xl md:text-7xl font-extrabold text-fd-foreground mb-6 leading-tight">
23+
{tHome('learn', { defaultValue: 'Learn Next.js' })}
24+
</h1>
25+
<p className="text-xl md:text-2xl text-fd-muted-foreground max-w-3xl mx-auto leading-relaxed">
26+
{tHome('featuresSubtitle', {
27+
defaultValue:
28+
'Choose a learning path to get started with Next.js internationalization.',
29+
})}
30+
</p>
31+
</div>
32+
</div>
33+
</section>
34+
35+
{/* Learning Paths Section */}
36+
<section className="container max-w-6xl mx-auto px-6 py-16">
37+
<div className="grid grid-cols-1 md:grid-cols-2 gap-8 max-w-4xl mx-auto">
38+
{learnTabs.map((tab, index) => (
39+
<Link
40+
key={tab.url}
41+
href={tab.url}
42+
className="group block bg-fd-card border border-fd-border rounded-2xl overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-300 hover:scale-105 relative"
43+
>
44+
{/* Hover effect background */}
45+
<div className="absolute inset-0 bg-purple-50 dark:bg-purple-900/10 opacity-0 group-hover:opacity-100 transition-opacity duration-300" />
46+
47+
<div className="relative p-8">
48+
{/* Icon and number */}
49+
<div className="flex items-center justify-between mb-6">
50+
<div className="text-4xl">{tab.icon}</div>
51+
<div className="w-8 h-8 bg-fd-accent text-fd-accent-foreground rounded-full flex items-center justify-center text-sm font-bold">
52+
{String(index + 1).padStart(2, '0')}
53+
</div>
54+
</div>
55+
56+
{/* Content */}
57+
<h3 className="text-2xl font-bold text-fd-foreground mb-4 group-hover:text-purple-600 dark:group-hover:text-purple-400 transition-colors duration-300">
58+
{tab.title}
59+
</h3>
60+
61+
<p className="text-fd-muted-foreground leading-relaxed mb-6">
62+
{tab.description}
63+
</p>
64+
65+
{/* Call to action */}
66+
<div className="flex items-center text-purple-600 dark:text-purple-400 font-medium opacity-0 group-hover:opacity-100 transition-all duration-300 transform translate-y-2 group-hover:translate-y-0">
67+
<span className="mr-2">Start learning</span>
68+
<svg
69+
className="w-4 h-4 transition-transform duration-300 group-hover:translate-x-1"
70+
fill="none"
71+
stroke="currentColor"
72+
viewBox="0 0 24 24"
73+
>
74+
<title>Arrow right</title>
75+
<path
76+
strokeLinecap="round"
77+
strokeLinejoin="round"
78+
strokeWidth={2}
79+
d="M9 5l7 7-7 7"
80+
/>
81+
</svg>
82+
</div>
3583
</div>
36-
</div>
37-
</Link>
38-
))}
39-
</div>
84+
</Link>
85+
))}
86+
</div>
87+
</section>
4088
</main>
4189
);
4290
}

0 commit comments

Comments
 (0)