Skip to content

Commit 95cd11a

Browse files
committed
feat(page): enhance homepage layout with new sections and buttons
1 parent a45923b commit 95cd11a

File tree

2 files changed

+194
-38
lines changed

2 files changed

+194
-38
lines changed

src/app/(site)/layout.tsx

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
1-
import type { ReactNode } from "react";
2-
import { HomeLayout } from "fumadocs-ui/layouts/home";
31
import { baseOptions } from "@/app/layout.config";
2+
import { HomeLayout } from "fumadocs-ui/layouts/home";
3+
import type { ReactNode } from "react";
44

55
export default function Layout({ children }: { children: ReactNode }) {
66
return (
7-
<HomeLayout
8-
{...baseOptions}
9-
links={[
10-
{
11-
text: "Documentation",
12-
url: "/docs",
13-
},
14-
{
15-
text: "Programs",
16-
url: "/programs",
17-
},
18-
]}
19-
>
20-
{children}
21-
</HomeLayout>
7+
<>
8+
<HomeLayout
9+
{...baseOptions}
10+
style={
11+
{
12+
"--spacing-fd-container": "1280px",
13+
} as object
14+
}
15+
>
16+
{children}
17+
</HomeLayout>
18+
</>
2219
);
2320
}

src/app/(site)/page.tsx

Lines changed: 180 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,187 @@
1+
import { GitHubIcon } from "@/components/icons";
2+
import { Button } from "@/components/ui/button";
3+
import { ArrowRightIcon, CodeIcon, ExternalLinkIcon } from "lucide-react";
4+
import Image from "next/image";
15
import Link from "next/link";
26

37
export default function HomePage() {
48
return (
5-
<main className="flex flex-1 flex-col justify-center text-center">
6-
<h1 className="text-5xl font-extrabold leading-none tracking-tight text-gray-900 dark:text-white sm:text-6xl lg:text-7xl max-w-6xl mx-auto">
7-
Learn{" "}
8-
<span className="bg-gradient-to-br from-green-400 to-cyan-500 bg-clip-text font-extrabold text-transparent">
9-
Java
10-
</span>{" "}
11-
programming very fast and easily with{" "}
12-
<span className="bg-gradient-to-br from-sky-400 to-indigo-500 bg-clip-text font-extrabold text-transparent">
13-
Javaistic.
14-
</span>
15-
</h1>
16-
<p className="text-fd-muted-foreground">
17-
You can open{" "}
18-
<Link
19-
href="/docs/installation"
20-
className="text-fd-foreground font-semibold underline"
21-
>
22-
/docs/installation
23-
</Link>{" "}
24-
and see the documentation.
25-
</p>
9+
<main className="flex flex-col text-center px-4 sm:px-6 lg:px-8 max-w-7xl mx-auto">
10+
{/* Hero Section */}
11+
<section className="flex flex-col justify-center items-center sm:min-h-screen py-24">
12+
<h1 className="text-5xl tracking-tight font-funnel-display sm:text-6xl lg:text-[80px] font-extrabold text-neutral-900 dark:text-white max-w-5xl">
13+
Master{" "}
14+
<span className="bg-gradient-to-br from-green-400 to-cyan-500 bg-clip-text text-transparent">
15+
Java{" "}
16+
</span>
17+
Programming efficiently with{" "}
18+
<span className="bg-gradient-to-br from-sky-400 to-indigo-500 bg-clip-text text-transparent">
19+
Javaistic{" "}
20+
</span>
21+
</h1>
22+
<p className="mt-6 text-lg sm:text-xl text-muted-foreground max-w-4xl">
23+
Interactive, fast-paced learning for absolute beginners to advanced
24+
learners. A free and open-source platform to learn Java programming.
25+
</p>
26+
<div className="mt-8 flex flex-col sm:flex-row gap-4">
27+
<Link href="/docs">
28+
<Button
29+
size="lg"
30+
className="text-lg py-6 font-semibold dark:text-foreground rounded-lg bg-blue-600 hover:bg-blue-700"
31+
>
32+
Start Learning Now
33+
</Button>
34+
</Link>
35+
<Link href="https://github.com/javaistic/javaistic" target="_blank">
36+
<Button
37+
size="lg"
38+
variant="outline"
39+
className="text-lg py-6 font-semibold dark:text-foreground rounded-lg border-blue"
40+
>
41+
<GitHubIcon className="!size-5" />
42+
Star on GitHub
43+
</Button>
44+
</Link>
45+
</div>
46+
</section>
47+
{/* Features Section */}
48+
<section className="max-w-6xl mx-auto px-4 sm:px-10 md:px-12">
49+
<div className="text-center mt-5 mb-4">
50+
<h1 className="text-4xl sm:text-5xl font-bold font-funnel-display">
51+
Why learn Java with Javaistic?
52+
</h1>
53+
<p className="mt-4 text-lg font-medium dark:text-neutral-400 mx-auto">
54+
Designed to make learning Java fun, practical, and truly
55+
beginner-friendly.
56+
</p>
57+
</div>
58+
59+
{/* Section: Docs */}
60+
<article className="mx-auto mb-10 sm:space-x-10 flex flex-col items-center py-10 sm:flex-row">
61+
<div className="w-full sm:w-1/2">
62+
<Image
63+
src="/img/home/docs.svg"
64+
alt="Javaistic Docs"
65+
width={1213}
66+
height={1023}
67+
className="object-cover object-center"
68+
placeholder="blur"
69+
blurDataURL="/img/home/docs.svg"
70+
loading="lazy"
71+
/>
72+
</div>
73+
<div className="w-full sm:w-1/2 text-left">
74+
<h2 className="mb-6 font-funnel-display text-3xl sm:text-4xl font-extrabold text-neutral-900 dark:text-white">
75+
Quality over Quantity
76+
</h2>
77+
<p className="mb-8 text-xl font-medium leading-relaxed text-muted-foreground">
78+
We focus on quality — not noise. Every piece of content is crafted
79+
to be clear, engaging, and easy to understand. Learn Java with
80+
beautifully designed, beginner-friendly docs — all completely
81+
free.
82+
</p>
83+
<Link href="/docs">
84+
<Button size="lg" className="text-lg font-semibold">
85+
<span className="flex items-center">
86+
Explore the Docs
87+
<ArrowRightIcon className="ml-2 !size-5" />
88+
</span>
89+
</Button>
90+
</Link>
91+
</div>
92+
</article>
93+
94+
{/* Section: Coding */}
95+
<article className="flex flex-col-reverse sm:flex-row items-center py-14 space-y-10 sm:space-y-0 sm:space-x-10">
96+
<div className="w-full sm:w-1/2 text-left">
97+
<h2 className="mb-6 text-3xl sm:text-4xl font-funnel-display font-extrabold text-foreground">
98+
Coding Made Fun
99+
</h2>
100+
<p className="mb-8 text-xl font-medium leading-relaxed text-muted-foreground">
101+
Jump into hands-on coding right away or explore our step-by-step
102+
breakdowns of real Java programs. Whether you’re a beginner or
103+
brushing up, it’s coding made enjoyable.
104+
</p>
105+
<Link href="/programs">
106+
<Button size="lg" className="text-lg font-semibold">
107+
<span className="flex items-center">
108+
<CodeIcon className="mr-2 !size-5" />
109+
Try a Program Now
110+
</span>
111+
</Button>
112+
</Link>
113+
</div>
114+
<div className="w-full sm:w-1/2">
115+
<Image
116+
src="/img/home/programs.svg"
117+
alt="Javaistic Programs"
118+
width={1213}
119+
height={1023}
120+
className="object-cover object-center"
121+
placeholder="blur"
122+
blurDataURL="/img/home/programs.svg"
123+
loading="lazy"
124+
/>
125+
</div>
126+
</article>
127+
128+
{/* Section: GitHub */}
129+
<article className="flex flex-col sm:flex-row items-center py-14 space-y-10 sm:space-y-0 sm:space-x-10">
130+
<div className="w-full sm:w-1/2">
131+
<Image
132+
src="/img/home/open-source.svg"
133+
alt="Javaistic GitHub"
134+
width={613}
135+
height={521}
136+
className="object-cover object-center"
137+
placeholder="blur"
138+
blurDataURL="/img/home/open-source.svg"
139+
loading="lazy"
140+
/>
141+
</div>
142+
<div className="w-full sm:w-1/2 text-left">
143+
<h2 className="mb-6 text-3xl sm:text-4xl font-funnel-display font-extrabold text-foreground">
144+
Built Together.
145+
<br className="hidden lg:inline-block" />
146+
Fork it. Improve it.
147+
</h2>
148+
<p className="mb-8 text-xl font-medium leading-relaxed text-muted-foreground">
149+
Javaistic is fully open source — built by and for learners like
150+
you. Fork it, contribute, and shape the future of Java education
151+
with us.
152+
</p>
153+
<Link href="https://github.com/javaistic/javaistic" target="_blank">
154+
<Button size="lg" className="text-lg font-semibold">
155+
<span className="flex items-center">
156+
Contribute on GitHub
157+
<ExternalLinkIcon className="ml-2 !size-5" />
158+
</span>
159+
</Button>
160+
</Link>
161+
</div>
162+
</article>
163+
</section>
164+
165+
{/* CTA */}
166+
<section className="py-20 max-w-6xl">
167+
<div className="mx-auto rounded-3xl bg-gradient-to-br from-indigo-900 to-sky-700 px-6 py-16 text-center text-white shadow-xl">
168+
<h2 className="mb-4 text-4xl font-bold font-funnel-display">
169+
Ready to become a Java Pro?
170+
</h2>
171+
<p className="mb-8 text-lg font-medium dark:text-secondary-foreground">
172+
Begin your Java journey now — no credit card, no sign-up, just pure
173+
learning.
174+
</p>
175+
<Link href="/docs">
176+
<Button
177+
size="lg"
178+
className="inline-flex bg-white text-black hover:bg-white items-center text-lg font-semibold"
179+
>
180+
Start Learning
181+
</Button>
182+
</Link>
183+
</div>
184+
</section>
26185
</main>
27186
);
28187
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy