Skip to content

Commit 7d015a3

Browse files
Zishan-7jjramirezn
authored andcommitted
Sync Landing page changes (#1111)
* reduce clouds size and update font * fix: hero section responsiveness issue * fix: formatting errors * add currency animation
1 parent 8325815 commit 7d015a3

File tree

12 files changed

+49
-999
lines changed

12 files changed

+49
-999
lines changed

public/currencies.webm

2.32 MB
Binary file not shown.

src/app/page.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,7 @@ export default function LandingPage() {
179179

180180
return (
181181
<Layout className="enable-select !m-0 w-full !p-0">
182-
<Hero
183-
heading={hero.heading}
184-
primaryCta={hero.primaryCta}
185-
buttonVisible={buttonVisible}
186-
buttonScale={buttonScale}
187-
/>
182+
<Hero primaryCta={hero.primaryCta} buttonVisible={buttonVisible} buttonScale={buttonScale} />
188183
<Marquee {...marqueeProps} />
189184
<NoFees />
190185
<Marquee {...marqueeProps} />

src/assets/illustrations/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ export { default as PEANUT_LOGO_BLACK } from './peanut-logo-dark.svg'
1111
export { default as PeanutsBG } from './peanuts-bg.svg'
1212
export { default as Sparkle } from './sparkle.svg'
1313
export { default as Star } from './star.svg'
14-
export { default as LandingCountries } from './landing-countries.svg'

src/assets/illustrations/landing-countries.svg

Lines changed: 0 additions & 934 deletions
This file was deleted.

src/components/LandingPage/RegulatedRails.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ export function RegulatedRails() {
102102
<h1 className="font-roboto-flex-extrabold text-left text-[3.25rem] font-extraBlack !leading-[5rem] md:text-6xl lg:text-headingMedium">
103103
REGULATED RAILS, SELF-CUSTODY CONTROL
104104
</h1>
105-
<p className="mt-6 text-left text-base md:text-2xl">
105+
<p className="font-roboto-flex mt-6 text-left text-xl md:text-4xl">
106106
Peanut connects your self-custodial wallet to global regulated banks and top compliance partners. It
107107
operates under international licenses and standards to keep every transaction secure, private, and
108108
under your control.
109109
</p>
110110

111-
<h6 className="mt-3 text-sm">
111+
<h6 className="font-roboto-flex mt-3 text-xs md:text-lg">
112112
Our partners hold{' '}
113113
<a
114114
href="https://www.bridge.xyz/legal/licenses/us-licenses-and-registrations"

src/components/LandingPage/dropLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function DropLink() {
2727
className="mx-auto mt-8 block md:mt-0 md:hidden"
2828
/>
2929

30-
<p className="text-left text-xl md:pr-24 md:text-2xl">
30+
<p className="font-roboto-flex text-left text-xl md:pr-24 md:text-2xl">
3131
Send or request funds in seconds through WhatsApp, a phone number, or a QR code. No bank
3232
details, no friction.
3333
</p>

src/components/LandingPage/hero.tsx

Lines changed: 30 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { ButterySmoothGlobalMoney, PeanutGuyGIF, Sparkle } from '@/assets'
2-
import { Stack } from '@chakra-ui/react'
32
import { motion } from 'framer-motion'
43
import { useEffect, useState } from 'react'
54
import { twMerge } from 'tailwind-merge'
@@ -14,7 +13,6 @@ type CTAButton = {
1413
}
1514

1615
type HeroProps = {
17-
heading: string
1816
primaryCta?: CTAButton
1917
secondaryCta?: CTAButton
2018
buttonVisible?: boolean
@@ -47,7 +45,7 @@ const getHoverAnimation = (variant: 'primary' | 'secondary') => ({
4745
const transitionConfig = { type: 'spring', damping: 15 } as const
4846

4947
const getButtonContainerClasses = (variant: 'primary' | 'secondary') =>
50-
`relative z-20 mt-8 md:mt-12 ${variant === 'primary' ? 'mx-auto w-fit' : 'right-[calc(50%-120px)]'}`
48+
`relative z-20 mt-8 md:mt-12 flex flex-col items-center justify-center ${variant === 'primary' ? 'mx-auto w-fit' : 'right-[calc(50%-120px)]'}`
5149

5250
const getButtonClasses = (variant: 'primary' | 'secondary') =>
5351
`${variant === 'primary' ? 'btn bg-white fill-n-1 text-n-1 hover:bg-white/90' : 'btn-yellow'} px-7 md:px-9 py-3 md:py-8 text-base md:text-xl btn-shadow-primary-4`
@@ -99,26 +97,19 @@ const renderArrows = (variant: 'primary' | 'secondary', arrowOpacity: number, bu
9997
</>
10098
)
10199

102-
export function Hero({ heading, primaryCta, secondaryCta, buttonVisible, buttonScale = 1 }: HeroProps) {
100+
export function Hero({ primaryCta, secondaryCta, buttonVisible, buttonScale = 1 }: HeroProps) {
103101
const [screenWidth, setScreenWidth] = useState(typeof window !== 'undefined' ? window.innerWidth : 1200)
104-
const [scrollY, setScrollY] = useState(0)
105102

106103
useEffect(() => {
107104
const handleResize = () => {
108105
setScreenWidth(window.innerWidth)
109106
}
110107

111-
const handleScroll = () => {
112-
setScrollY(window.scrollY)
113-
}
114-
115108
handleResize()
116109
window.addEventListener('resize', handleResize)
117-
window.addEventListener('scroll', handleScroll)
118110

119111
return () => {
120112
window.removeEventListener('resize', handleResize)
121-
window.removeEventListener('scroll', handleScroll)
122113
}
123114
}, [])
124115

@@ -148,53 +139,45 @@ export function Hero({ heading, primaryCta, secondaryCta, buttonVisible, buttonS
148139
</Button>
149140
</a>
150141

151-
<p className="font-roboto-flex-bold mt-2 text-xs italic text-n-1 md:text-sm">Takes 10 seconds</p>
142+
<p className="mx-auto mt-2 text-xs italic text-n-1 md:text-sm">Takes 10 seconds</p>
152143

153144
{renderArrows(variant, arrowOpacity, buttonVisible)}
154145
</motion.div>
155146
)
156147
}
157148

158149
return (
159-
<div className="relative flex h-[90vh] flex-col justify-between overflow-x-hidden overflow-y-hidden bg-primary-1">
150+
<section className="relative flex min-h-[85vh] w-full flex-col items-center justify-between bg-primary-1 px-4 py-4 xl:h-fit xl:justify-center">
160151
<CloudImages screenWidth={screenWidth} />
161-
162-
<div className="relative mb-8 mt-0 flex grow flex-col justify-between space-y-6 md:mb-10 md:mt-4">
152+
<div className="relative mt-10 w-full md:mt-0">
163153
<img
164-
src={PeanutGuyGIF.src}
165-
className="mg:bottom-0 absolute bottom-[55%] left-1/2 z-10 mx-auto h-auto max-h-[40vh] w-auto max-w-[90%] -translate-x-1/2 translate-y-1/2 transform object-contain"
166-
alt="Peanut Guy"
154+
src={ButterySmoothGlobalMoney.src}
155+
className="z-0 mx-auto w-full max-w-[1000px] object-contain md:w-[50%]"
156+
alt="Buttery Smooth Global Money"
167157
/>
168158

169-
<Stack spacing={2} className="relative h-1/3 items-center justify-center px-4 text-center lg:h-full">
170-
<img
171-
src={ButterySmoothGlobalMoney.src}
172-
className="z-0 mx-auto w-full max-w-[1000px] object-contain md:w-[50%]"
173-
alt="Buttery Smooth Global Money"
174-
/>
175-
176-
<HeroImages />
177-
</Stack>
178-
179-
<Stack spacing={2} className="relative h-1/3 items-center justify-center px-4 text-center lg:h-full">
180-
<div className="mt-8 md:mt-12 lg:mt-6">
181-
<h2 className="font-roboto-flex-extrabold text-[2.375rem] font-extraBlack text-black md:text-heading">
182-
INSTANTLY SEND & RECEIVE
183-
</h2>
184-
<span
185-
className="mt-2 block text-xl leading-tight text-n-1 md:mt-4 md:text-5xl"
186-
style={{ fontWeight: 500, letterSpacing: '-0.5px' }}
187-
>
188-
MONEY ACROSS THE GLOBE
189-
</span>
190-
</div>
191-
192-
{primaryCta && renderCTAButton(primaryCta, 'primary')}
193-
{secondaryCta && renderCTAButton(secondaryCta, 'secondary')}
194-
195-
<HeroImages />
196-
</Stack>
159+
<HeroImages />
160+
</div>
161+
<img
162+
src={PeanutGuyGIF.src}
163+
className="mg:bottom-0 absolute bottom-[55%] left-1/2 z-10 mx-auto h-auto max-h-[40vh] w-auto max-w-[90%] -translate-x-1/2 translate-y-1/2 transform object-contain"
164+
alt="Peanut Guy"
165+
/>
166+
167+
<div className="relative mb-4 flex w-full flex-col items-center justify-center md:mb-0">
168+
<h2 className="font-roboto-flex-extrabold mt-18 text-center text-[2.375rem] font-extraBlack text-black md:text-heading">
169+
INSTANTLY SEND & RECEIVE
170+
</h2>
171+
<span
172+
className="mt-2 block text-xl leading-tight text-n-1 md:mt-4 md:text-5xl"
173+
style={{ fontWeight: 500, letterSpacing: '-0.5px' }}
174+
>
175+
MONEY ACROSS THE GLOBE
176+
</span>
177+
{primaryCta && renderCTAButton(primaryCta, 'primary')}
178+
{secondaryCta && renderCTAButton(secondaryCta, 'secondary')}
179+
<HeroImages />
197180
</div>
198-
</div>
181+
</section>
199182
)
200183
}

src/components/LandingPage/imageAssets.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const CloudAnimation = ({
2121
speed?: number
2222
startXOffset?: number
2323
}) => {
24-
const imageWidth = 340 // Width of the cloud image (adjust as needed)
24+
const imageWidth = 200 // Width of the cloud image (adjust as needed)
2525
const vpWidth = screenWidth || 1080
2626

2727
// Total travel distance is screen width + image width + offset

src/components/LandingPage/noFees.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function NoFees() {
2323
// Get values from URL or use defaults
2424
const sourceCurrency = searchParams.get('from') || 'USD'
2525
const destinationCurrency = searchParams.get('to') || 'EUR'
26-
const urlSourceAmount = parseFloat(searchParams.get('amount') || '10') || 10
26+
const urlSourceAmount = searchParams.get('amount') ? parseFloat(searchParams.get('amount')!) : 10
2727

2828
// Exchange rate hook handles all the conversion logic
2929
const {

src/components/LandingPage/securityBuiltIn.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function SecurityBuiltIn() {
7676
<h3 className="font-roboto-flex-extrabold text-2xl lg:text-3xl">{feature.title}</h3>
7777
</div>
7878
<p
79-
className="w-full max-w-[360px] text-left font-roboto text-lg font-normal leading-relaxed md:text-lg"
79+
className="font-roboto-flex w-full max-w-[360px] text-left text-lg font-normal leading-relaxed md:text-xl"
8080
style={{ letterSpacing: '-0.5px' }}
8181
>
8282
{feature.description}

0 commit comments

Comments
 (0)