Skip to content

Commit 8a1be75

Browse files
committed
feat: homepage sections to use ui/section
using new variant setup; applies custom ID to each for hash linking
1 parent fa9f8b0 commit 8a1be75

File tree

1 file changed

+21
-11
lines changed

1 file changed

+21
-11
lines changed

src/pages/index.tsx

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ const HomePage = ({
225225

226226
{/* Use Cases - A new way to use the internet */}
227227
<section
228+
id="use"
228229
className={cn(
229230
"max-lg:-mx-4 max-lg:flex max-lg:w-[100vw] max-lg:flex-col max-lg:overflow-hidden max-lg:px-4 sm:max-lg:-mx-6 sm:max-lg:px-6", // Mobile: Swiper cards
230231
"lg:grid lg:grid-cols-bento lg:gap-4" // Desktop: BentoBox grid
@@ -275,7 +276,7 @@ const HomePage = ({
275276
</section>
276277

277278
{/* Activity - The strongest ecosystem */}
278-
<Section>
279+
<Section id="activity" variant="responsiveFlex">
279280
<SectionBanner>
280281
<TwImage src={ActivityImage} alt="" />
281282
</SectionBanner>
@@ -295,7 +296,11 @@ const HomePage = ({
295296
</Section>
296297

297298
{/* Learn - Understand Ethereum */}
298-
<Section className="md:flex-row-reverse">
299+
<Section
300+
id="learn"
301+
variant="responsiveFlex"
302+
className="md:flex-row-reverse"
303+
>
299304
<SectionBanner>
300305
<TwImage src={LearnImage} alt="" />
301306
</SectionBanner>
@@ -341,7 +346,7 @@ const HomePage = ({
341346
{/* TODO: Add "The Internet Is Changing" section */}
342347

343348
{/* Builders - Blockchain's biggest builder community */}
344-
<Section>
349+
<Section id="builders" variant="responsiveFlex">
345350
<SectionBanner>
346351
<TwImage src={BuildersImage} alt="" />
347352
</SectionBanner>
@@ -410,7 +415,11 @@ const HomePage = ({
410415
</Section>
411416

412417
{/* Ethereum.org community - Built by the community */}
413-
<Section className="md:flex-row-reverse">
418+
<Section
419+
id="community"
420+
variant="responsiveFlex"
421+
className="md:flex-row-reverse"
422+
>
414423
<SectionBanner>
415424
<TwImage src={CommunityImage} alt="" />
416425
</SectionBanner>
@@ -499,7 +508,7 @@ const HomePage = ({
499508
</Section>
500509

501510
{/* Recent posts */}
502-
<div className="w-full">
511+
<Section id="recent">
503512
<h3 className="mb-4 mt-2 text-4xl font-black lg:text-5xl">
504513
{t("page-index:page-index-posts-header")}
505514
</h3>
@@ -554,10 +563,10 @@ const HomePage = ({
554563
))}
555564
</div>
556565
</div>
557-
</div>
566+
</Section>
558567

559-
{/* Event */}
560-
<div className="w-full">
568+
{/* Events */}
569+
<Section id="events">
561570
<h3 className="mb-4 mt-2 text-4xl font-black lg:text-5xl">
562571
{t("page-index:page-index-events-header")}
563572
</h3>
@@ -623,10 +632,11 @@ const HomePage = ({
623632
{t("page-index:page-index-events-action")} <MdChevronRight />
624633
</ButtonLink>
625634
</div>
626-
</div>
635+
</Section>
627636

628637
{/* Join ethereum.org */}
629-
<div
638+
<Section
639+
id="join"
630640
className={cn(
631641
"before:absolute before:-inset-px before:bottom-0 before:z-hide before:rounded-[calc(theme(borderRadius.4xl)+1px)] before:content-['']", // Border/gradient positioning
632642
"before:bg-gradient-to-b before:from-primary-hover/[0.24] before:to-primary-hover/[0.08] before:dark:from-primary-hover/40 before:dark:to-primary-hover/20", // Border/gradient coloring
@@ -655,7 +665,7 @@ const HomePage = ({
655665
)}
656666
</div>
657667
</div>
658-
</div>
668+
</Section>
659669
</div>
660670
</Flex>
661671
)

0 commit comments

Comments
 (0)