-
Notifications
You must be signed in to change notification settings - Fork 29
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 #1050 from internxt/feat/add-spring-banner
[MKT-264]: feat/adding spring banner
- Loading branch information
Showing
10 changed files
with
127 additions
and
126 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,70 @@ | ||
import { CheckCircle, CircleWavyCheck, X } from '@phosphor-icons/react'; | ||
import { CheckCircle, Flower, X } from '@phosphor-icons/react'; | ||
import { useTranslationContext } from 'app/i18n/provider/TranslationProvider'; | ||
|
||
const FeaturesBanner = ({ showBanner, onClose }: { showBanner: boolean; onClose: () => void }): JSX.Element => { | ||
const { translate } = useTranslationContext(); | ||
const { translate, translateList } = useTranslationContext(); | ||
|
||
const features = [ | ||
{ | ||
title: translate('featuresBanner.features.discount'), | ||
}, | ||
{ | ||
title: translate('featuresBanner.features.safeCloud'), | ||
}, | ||
{ | ||
title: translate('featuresBanner.features.openSource'), | ||
}, | ||
{ | ||
title: translate('featuresBanner.features.endToEnd'), | ||
}, | ||
{ | ||
title: translate('featuresBanner.features.unauthorized'), | ||
}, | ||
{ | ||
title: translate('featuresBanner.features.offerEnds'), | ||
}, | ||
]; | ||
const features = translateList('featuresBanner.features'); | ||
|
||
const handleOnClick = () => { | ||
window.open('https://internxt.com/pricing', '_blank', 'noopener noreferrer'); | ||
}; | ||
|
||
return ( | ||
//Background | ||
<div | ||
className={`${showBanner ? 'flex' : 'hidden'} | ||
absolute bottom-0 left-0 right-0 top-0 z-10 bg-opacity-40`} | ||
fixed bottom-0 left-0 right-0 top-0 z-50 h-screen bg-black bg-opacity-50 px-10 lg:px-0`} | ||
> | ||
{/* Banner */} | ||
<div | ||
className={`absolute left-1/2 top-1/2 flex h-auto w-full max-w-4xl -translate-x-1/2 -translate-y-1/2 transform | ||
flex-col overflow-hidden rounded-2xl bg-primary text-gray-100`} | ||
className={ | ||
'fixed left-1/2 top-1/2 flex h-auto -translate-x-[50%] -translate-y-[50%] flex-col overflow-hidden rounded-2xl border-4 border-primary/10 bg-white px-10' | ||
} | ||
> | ||
<button className="absolute right-0 m-5 flex w-auto text-white" onClick={onClose}> | ||
<button className="absolute right-0 m-7 flex text-black" onClick={onClose}> | ||
<X size={32} /> | ||
</button> | ||
<div className="flex w-full flex-row justify-between px-20 py-16"> | ||
<div className="flex w-full flex-col items-start justify-between space-y-10"> | ||
<div className="flex w-full max-w-[297px] flex-col space-y-4"> | ||
<p className="text-3xl font-semibold text-white">{translate('featuresBanner.header')}</p> | ||
<p className="text-5xl font-bold text-white">{translate('featuresBanner.title')}</p> | ||
<div className="flex w-full max-w-[800px] flex-col space-x-10 py-14 lg:flex-row"> | ||
<div className="flex w-full flex-col items-center justify-center space-y-3 text-center lg:items-start lg:justify-between lg:text-start"> | ||
<div className="flex rounded-lg bg-white px-3 py-1.5 ring-4 ring-primary/7"> | ||
<p className="text-2xl font-bold text-primary">{translate('featuresBanner.label')}</p> | ||
</div> | ||
<div className="flex flex-col space-y-4"> | ||
<p className="w-full max-w-[380px] text-4xl font-bold leading-tight text-black"> | ||
{translate('featuresBanner.title')} | ||
</p> | ||
|
||
<div className="flex flex-col items-center space-y-3 lg:items-start"> | ||
<button | ||
onClick={() => { | ||
window.open(`${process.env.REACT_APP_WEBSITE_URL}/lifetime`, '_blank', 'noopener noreferrer'); | ||
}} | ||
className="w-max rounded-lg bg-white px-5 py-3 text-lg font-medium text-black" | ||
onClick={handleOnClick} | ||
className="flex w-max items-center rounded-lg bg-primary px-5 py-3 text-lg font-medium text-white hover:bg-primary-dark" | ||
> | ||
{translate('featuresBanner.cta')} | ||
</button> | ||
<div className="flex flex-row items-center space-x-2"> | ||
<CheckCircle size={24} className="text-white" /> | ||
<p className="text-lg font-medium text-white">{translate('lifetimeBanner.guarantee')}</p> | ||
<div className="flex flex-row items-center space-x-3 pt-2 text-gray-80 dark:text-gray-20"> | ||
<CheckCircle size={24} className="" /> | ||
<p className="whitespace-nowrap font-medium lg:text-lg">{translate('featuresBanner.guarantee')}</p> | ||
</div> | ||
|
||
<p className="text-sm font-medium text-gray-50">{translate('featuresBanner.lastCta')}</p> | ||
</div> | ||
</div> | ||
<div className="flex h-full w-full flex-col space-y-6 text-white"> | ||
{features.map((item) => ( | ||
<div className="flex w-full flex-row items-center space-x-4" key={item.title}> | ||
<CircleWavyCheck weight={'fill'} className="text-white" size={32} /> | ||
<p className="whitespace-nowrap text-xl font-semibold">{item.title}</p> | ||
<div className="hidden items-center lg:flex"> | ||
<div className="flex flex-col"> | ||
<div className="flex flex-col space-y-8"> | ||
{features.map((card) => ( | ||
<div className="flex flex-row" key={card}> | ||
<Flower size={30} weight="fill" className="mr-4 text-primary" /> | ||
<p className="whitespace-nowrap text-lg font-semibold text-gray-80 dark:text-gray-20">{card}</p> | ||
</div> | ||
))} | ||
</div> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default FeaturesBanner; |
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
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