-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(bridge): hero + features sections (#15)
* feat(plus): hero and features sections * fix: hero text spacing * fix: partners ticker title * fix: make partners ticker title dynamic * feat(plus): use cases section * fix: desktop styles * fix: image src sets * fixup * feat(plus): chains + get started sections * feat(settlement): page * feat(bridge): hero + features sections * fix: design qa * fix: use custom tw-merge * fixup * fixup * fix: qa * fix: qa * fixup * fix: build * fixup
- Loading branch information
Showing
13 changed files
with
214 additions
and
54 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
src/app/(routes)/across-bridge/_components/features-section.tsx
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 Image from "next/image"; | ||
|
||
import { | ||
CodeIcon, | ||
ShieldLargeIcon, | ||
DoubleChevronRightIcon, | ||
DollarIcon, | ||
} from "@/app/_components/icons"; | ||
import { Text } from "@/app/_components/text"; | ||
import { FeaturesGrid } from "@/app/_components/features-grid"; | ||
import bridge2Image from "@/app/_assets/bridge-2.png"; | ||
|
||
const features = [ | ||
{ | ||
Icon: <CodeIcon className="h-14 w-14" />, | ||
title: "efficient", | ||
body: "With Across, bridging your tokens at the fastest speed and lowest cost does not come with security tradeoffs. How? At Across, only bridge users or bridge LPs never shoulder the risks associated with cross-chain transfers.", | ||
}, | ||
{ | ||
Icon: <ShieldLargeIcon className="h-14 w-14" />, | ||
title: "Secure", | ||
body: "Using canonical assets is the only trustless way to transfer value, which is why Across only circulates genuine tokens, never representative or synthetic assets. In every transfer facilitated by Across, user assets are never put at risk.", | ||
}, | ||
{ | ||
Icon: <DoubleChevronRightIcon className="h-14 w-14" />, | ||
title: "Fast", | ||
body: "Intents architecture enables the fastest bridge experience. By using a network of third party relayers, incentivized to quickly fill transfers, fill times are usually completed in a few seconds.", | ||
}, | ||
{ | ||
Icon: <DollarIcon className="h-14 w-14" />, | ||
title: "Superior", | ||
body: "Canonical assets are the only trustless way to transfer value, which is why Across only circulates canonical tokens, never representative or synthetic ones. In every transfer at Across, users always receive canonical assets.", | ||
}, | ||
]; | ||
|
||
export function FeaturesSection() { | ||
return ( | ||
<section className="container mx-auto -mt-32 flex flex-col gap-16 px-4 sm:gap-24 md:-mt-48"> | ||
<Image | ||
src={bridge2Image} | ||
alt="Across settlement layers graphic" | ||
className="-mb-16 self-center sm:-mb-24 sm:max-w-[514px]" | ||
/> | ||
<div className="flex flex-col gap-4"> | ||
<Text variant="cap-case" className="text-center text-aqua-100"> | ||
built for safe travels | ||
</Text> | ||
<Text variant="heading-2" className="text-center capitalize text-light-200"> | ||
Engineered for best execution | ||
</Text> | ||
</div> | ||
<FeaturesGrid features={features} /> | ||
</section> | ||
); | ||
} |
42 changes: 42 additions & 0 deletions
42
src/app/(routes)/across-bridge/_components/hero-section.tsx
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,42 @@ | ||
import Image from "next/image"; | ||
|
||
import { Hero } from "@/app/_components/hero"; | ||
import { Text } from "@/app/_components/text"; | ||
import { BridgeNowLink } from "@/app/_components/bridge-now-link"; | ||
import { ArrowRightIcon } from "@/app/_components/icons/arrow-right"; | ||
import bridgeHeroImage from "@/app/_assets/bridge-hero.png"; | ||
|
||
export function HeroSection() { | ||
return ( | ||
<Hero title="supported chains"> | ||
<div className="container mx-auto flex flex-col items-center gap-16 px-4 pb-16 pt-8 md:flex-row-reverse md:gap-8 md:pt-16"> | ||
<div className="flex max-w-80 flex-1 sm:max-w-100 md:max-w-full"> | ||
<Image src={bridgeHeroImage} alt="Across bridge ui" priority={true} /> | ||
</div> | ||
<div className="flex flex-1 flex-col gap-6"> | ||
<Text | ||
variant="heading-1" | ||
className="text-center tracking-tight-5 sm:tracking-tight-2 md:text-left md:tracking-tight-1" | ||
> | ||
<span className="text-aqua-100">Bridge</span>{" "} | ||
<span className="text-light-100">Without</span>{" "} | ||
<br className="block sm:hidden md:block" /> | ||
<span className="text-aqua-100">Compromise</span> | ||
</Text> | ||
<div className="flex w-full flex-row justify-center md:justify-start"> | ||
<Text variant="body-nums" className="max-w-[430px] text-center md:text-left"> | ||
Experience extraordinarily fast and cost-effective cross-chain bridging, | ||
secured by an intents-based architecture. | ||
</Text> | ||
</div> | ||
<BridgeNowLink className="flex cursor-pointer flex-row items-center justify-center gap-2 text-aqua-100 md:justify-start"> | ||
<Text variant="cap-case">bridge now</Text> | ||
<div className="flex h-5 w-5 items-center justify-center rounded-full bg-aqua-100"> | ||
<ArrowRightIcon /> | ||
</div> | ||
</BridgeNowLink> | ||
</div> | ||
</div> | ||
</Hero> | ||
); | ||
} |
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 |
---|---|---|
@@ -1,14 +1,18 @@ | ||
import { Metadata } from "next"; | ||
|
||
import { HeroSection } from "./_components/hero-section"; | ||
import { FeaturesSection } from "./_components/features-section"; | ||
|
||
export const metadata: Metadata = { | ||
title: "Across Bridge", | ||
description: "Interoperability powered by Intents.", | ||
}; | ||
|
||
export default function BridgeLanding() { | ||
return ( | ||
<main className="z-0 min-h-screen overflow-hidden"> | ||
<div className="py-10 text-center">Across Bridge</div> | ||
<main className="z-0 mb-24 flex min-h-screen flex-col gap-24 overflow-hidden px-4 sm:gap-32 md:gap-48"> | ||
<HeroSection /> | ||
<FeaturesSection /> | ||
</main> | ||
); | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,33 @@ | ||
"use client"; | ||
|
||
import { useSearchParams } from "next/navigation"; | ||
import { Suspense } from "react"; | ||
|
||
type Props = React.ComponentProps<"a">; | ||
|
||
const bridgeAppBaseUrl = "https://app.across.to"; | ||
|
||
export function BridgeNowLink(props: Props) { | ||
return ( | ||
<Suspense> | ||
<_BridgeNowLink {...props} /> | ||
</Suspense> | ||
); | ||
} | ||
|
||
function _BridgeNowLink({ className, ...props }: Props) { | ||
const searchParams = useSearchParams(); | ||
|
||
const refParams = searchParams.get("ref") || searchParams.get("referrer"); | ||
const bridgeNowLink = `${bridgeAppBaseUrl}/bridge${refParams ? `?ref=${refParams}` : ""}`; | ||
|
||
return ( | ||
<a | ||
className={className} | ||
href={bridgeNowLink} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
{...props} | ||
/> | ||
); | ||
} |
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,33 @@ | ||
import { twMerge } from "tailwind-merge"; | ||
|
||
import { Text } from "./text"; | ||
|
||
type Feature = { | ||
title: string; | ||
body: string; | ||
Icon: React.ReactNode; | ||
}; | ||
|
||
type Props = React.ComponentProps<"div"> & { | ||
features: Feature[]; | ||
}; | ||
|
||
export function FeaturesGrid({ className, features, children, ...props }: Props) { | ||
return ( | ||
<div | ||
className={twMerge("grid grid-cols-1 gap-12 sm:gap-y-16 md:grid-cols-2", className)} | ||
{...props} | ||
> | ||
{features.map((feature) => ( | ||
<div key={feature.title}> | ||
{feature.Icon} | ||
<Text variant="heading-4" className="mb-4 mt-8 capitalize text-light-200"> | ||
{feature.title} | ||
</Text> | ||
<Text className="max-w-100 text-light-300">{feature.body}</Text> | ||
</div> | ||
))} | ||
{children} | ||
</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
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