-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from inkonchain/feat/new-home
feat: revamp PageHeader, create new Home page
- Loading branch information
Showing
27 changed files
with
478 additions
and
369 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"use client"; | ||
import { Button } from "@inkonchain/ink-kit"; | ||
|
||
import { ColoredText } from "@/components/ColoredText"; | ||
import { newLayoutSectionClasses } from "@/components/styles/container"; | ||
import { Link } from "@/routing"; | ||
|
||
import { AppsGrid } from "../../apps/_components/AppsGrid"; | ||
import { inkApps } from "../../apps/_components/InkApp"; | ||
|
||
export const HomeApps = () => { | ||
const apps = inkApps.slice(0, 8); | ||
return ( | ||
<div className={newLayoutSectionClasses()}> | ||
<div className="flex justify-between"> | ||
<ColoredText className="ink:text-h4" variant="purple"> | ||
Discover apps on Ink | ||
</ColoredText> | ||
<Button asChild> | ||
<Link href="/new/apps">View all apps</Link> | ||
</Button> | ||
</div> | ||
<AppsGrid | ||
apps={apps} | ||
featuredApps={[]} | ||
noAppsFound={null} | ||
network="Mainnet" | ||
/> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"use client"; | ||
import { useTranslations } from "next-intl"; | ||
|
||
import { | ||
SpecificEventCard, | ||
SpecificEventCardProps, | ||
} from "@/app/[locale]/_components/EventContent/EventContent"; | ||
import { EXTERNAL_LINKS } from "@/routing"; | ||
|
||
export const HomeEvent = () => { | ||
const t = useTranslations("events"); | ||
|
||
const ethDenverEventProps: SpecificEventCardProps = { | ||
title: t("ethdenver.cardTitle"), | ||
description: t("ethdenver.description"), | ||
cta: t("ethdenver.cta"), | ||
link: EXTERNAL_LINKS.inkdenver, | ||
date: t("ethdenver.date"), | ||
location: t("ethdenver.location"), | ||
image: "/ethdenver.webp", | ||
imageAlt: "ETHDenver", | ||
layout: "horizontal", | ||
}; | ||
return <SpecificEventCard {...ethDenverEventProps} color="purple" />; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
"use client"; | ||
import { Button, Card, CardContent, InkIcon } from "@inkonchain/ink-kit"; | ||
|
||
import { ColoredText } from "@/components/ColoredText"; | ||
import { Link } from "@/routing"; | ||
|
||
export const HomeTagLine = () => { | ||
return ( | ||
<Card> | ||
<CardContent.Tagline | ||
title={ | ||
<ColoredText variant="purple"> | ||
The future isn't written, | ||
<br /> | ||
it's waiting to be inked. | ||
</ColoredText> | ||
} | ||
buttons={ | ||
<> | ||
<Button asChild size="lg" iconLeft={<InkIcon.Bridge />}> | ||
<Link href="/new/bridge">Bridge now</Link> | ||
</Button> | ||
<Button | ||
asChild | ||
variant="secondary" | ||
size="lg" | ||
iconLeft={<InkIcon.Social.X />} | ||
> | ||
<Link href="https://x.com/inkonchain">Follow us</Link> | ||
</Button> | ||
</> | ||
} | ||
></CardContent.Tagline> | ||
</Card> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Button } from "@inkonchain/ink-kit"; | ||
|
||
import { ColoredText } from "@/components/ColoredText"; | ||
import { Link } from "@/routing"; | ||
|
||
import { PageHeader } from "../PageHeader"; | ||
|
||
export const HomeTitle = () => { | ||
return ( | ||
<PageHeader | ||
title="Ink the future" | ||
description={ | ||
<ColoredText variant="purple">Simplified DeFi for builders</ColoredText> | ||
} | ||
cta={ | ||
<Button variant="primary" size="lg"> | ||
<Link href="/new/apps">Explore Ink</Link> | ||
</Button> | ||
} | ||
size="home" | ||
/> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React from "react"; | ||
|
||
import { ColoredText } from "@/components/ColoredText"; | ||
import { classNames } from "@/util/classes"; | ||
|
||
interface PageHeaderProps { | ||
title: React.ReactNode; | ||
description: React.ReactNode; | ||
cta?: React.ReactNode; | ||
size?: "default" | "home"; | ||
} | ||
|
||
export const PageHeader = ({ | ||
title, | ||
description, | ||
cta, | ||
size = "default", | ||
}: PageHeaderProps) => { | ||
return ( | ||
<div | ||
className={classNames("flex flex-col flex-1", { | ||
"lg:gap-12 gap-6": size === "default", | ||
"lg:gap-16 gap-8": size === "home", | ||
})} | ||
> | ||
<div | ||
className={classNames("flex flex-col items-start gap-4", { | ||
"max-w-screen-lg": size === "default", | ||
"max-w-screen-2xl": size === "home", | ||
})} | ||
> | ||
<ColoredText | ||
className={classNames({ | ||
"text-4xl sm:text-6xl": size === "default", | ||
"text-5xl sm:text-6xl md:text-[110px] lg:text-[120px] sm:leading-[95%] xl:text-[130px]": | ||
size === "home", | ||
})} | ||
variant="purple" | ||
dampen="md" | ||
> | ||
<h2>{title}</h2> | ||
</ColoredText> | ||
<div | ||
className={classNames("max-w-screen-lg", { | ||
"ink:text-body-1-regular ink:text-text-muted": size === "default", | ||
"ink:text-h5 ink:xl:text-h3": size === "home", | ||
})} | ||
> | ||
{description} | ||
</div> | ||
</div> | ||
{cta && <div className="flex flex-col items-start w-full">{cta}</div>} | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.