-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature (website): sections for new landing page (#805)
- Loading branch information
1 parent
c394f5d
commit 589d624
Showing
24 changed files
with
443 additions
and
115 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
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.
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+75.7 KB
website/src/app/[lang]/[region]/v2/(home)/(assets)/yellowBlueDotsImgData.png
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
38 changes: 38 additions & 0 deletions
38
website/src/app/[lang]/[region]/v2/(home)/(components)/income-input.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,38 @@ | ||
'use client'; | ||
|
||
import { ChevronDownIcon } from '@heroicons/react/24/outline'; | ||
import { Button, Popover, PopoverContent, PopoverTrigger, Typography } from '@socialincome/ui'; | ||
|
||
export function IncomeInput() { | ||
const choices = ['CHF', 'USD']; | ||
|
||
return ( | ||
<div className="flex flex-col text-white"> | ||
<div className="align-center flex items-center justify-center"> | ||
<Typography size="5xl" weight="medium" className=" mr-1 w-32 py-2 text-right opacity-40"> | ||
6 | ||
</Typography> | ||
<Popover openDelay={100} closeDelay={200}> | ||
<PopoverTrigger asChild> | ||
<Button className="flex items-center space-x-1 "> | ||
<Typography size="xs">{choices[0]}</Typography> | ||
<ChevronDownIcon className="h-4 w-4" /> | ||
</Button> | ||
</PopoverTrigger> | ||
<PopoverContent asChild className="bg-popover w-12 p-0"> | ||
<ul className="divide-muted divide-y"> | ||
{choices.map((choice, index) => ( | ||
<li key={index} className="hover:bg-popover-muted py-2 text-center"> | ||
<Typography size="xs">{choice}</Typography> | ||
</li> | ||
))} | ||
</ul> | ||
</PopoverContent> | ||
</Popover> | ||
</div> | ||
<div className="w-64 self-center opacity-40"> | ||
<hr /> | ||
</div> | ||
</div> | ||
); | ||
} |
64 changes: 64 additions & 0 deletions
64
website/src/app/[lang]/[region]/v2/(home)/(components)/quotes-carousel.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,64 @@ | ||
'use client'; | ||
import { useScreenSize } from '@/hooks/useScreenSize'; | ||
import { Carousel, CarouselContent, Typography } from '@socialincome/ui'; | ||
import { FontColor } from '@socialincome/ui/src/interfaces/color'; | ||
import Image from 'next/image'; | ||
import UNImageData from '../(assets)/un-logo.png'; | ||
|
||
export type CarouselCardProps = { | ||
quote: { | ||
text: string; | ||
color: FontColor; | ||
}[]; | ||
icon: ImageData | string; | ||
author: string; | ||
}[]; | ||
|
||
export function QuotesCarousel(cardsObj: CarouselCardProps) { | ||
const screenSize = useScreenSize(); | ||
let cardsArr = []; | ||
for (const index in cardsObj) { | ||
cardsArr.push(cardsObj[index]); | ||
} | ||
|
||
let slidesToScroll; | ||
switch (screenSize) { | ||
case null: | ||
case 'xs': | ||
slidesToScroll = 1; | ||
break; | ||
case 'sm': | ||
case 'md': | ||
slidesToScroll = 2; | ||
break; | ||
default: | ||
slidesToScroll = 3; | ||
break; | ||
} | ||
return ( | ||
<Carousel | ||
options={{ | ||
loop: false, | ||
autoPlay: { enabled: true, delay: 5000 }, | ||
slidesToScroll: slidesToScroll, | ||
}} | ||
showDots={true} | ||
> | ||
{cardsArr.map((card, index) => ( | ||
<CarouselContent key={index} className="flex basis-full flex-col items-center justify-center"> | ||
<div className="w-3/4 self-center text-center"> | ||
{card.quote.map((title, index) => ( | ||
<Typography as="span" size="2xl" weight="medium" color={title.color} key={index}> | ||
{title.text}{' '} | ||
</Typography> | ||
))} | ||
</div> | ||
<Image src={UNImageData} alt="UN symbol" className="mb-3 mt-5 h-12 w-12" /> | ||
<Typography size="sm" className="mb-12"> | ||
{card.author} | ||
</Typography> | ||
</CarouselContent> | ||
))} | ||
</Carousel> | ||
); | ||
} |
27 changes: 18 additions & 9 deletions
27
website/src/app/[lang]/[region]/v2/(home)/(sections)/explainer-video.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 |
---|---|---|
@@ -1,24 +1,33 @@ | ||
import { DefaultParams } from '@/app/[lang]/[region]'; | ||
import { VimeoVideo } from '@/components/vimeo-video'; | ||
import { Translator } from '@socialincome/shared/src/utils/i18n'; | ||
import { BaseContainer, Typography } from '@socialincome/ui'; | ||
import { FontColor } from '@socialincome/ui/src/interfaces/color'; | ||
|
||
export async function ExplainerVideo({ lang, region }: DefaultParams) { | ||
const translator = await Translator.getInstance({ | ||
language: lang, | ||
namespaces: ['website-home2'], | ||
namespaces: ['website-home2', 'website-videos'], | ||
}); | ||
|
||
return ( | ||
<BaseContainer> | ||
<div> | ||
{translator.t<{ text: string; color?: FontColor }[]>('section-4.title-1').map((title, index) => ( | ||
<Typography as="span" key={index} color={title.color}> | ||
{title.text}{' '} | ||
</Typography> | ||
))} | ||
<BaseContainer className="my-24"> | ||
<div className="align-center flex flex-col justify-center text-center"> | ||
<div className="mb-16 w-2/5 self-center"> | ||
{translator.t<{ text: string; color?: FontColor }[]>('section-4.title-1').map((title, index) => ( | ||
<Typography as="span" size="xl" key={index} color={title.color}> | ||
{title.text} | ||
{index ? '' : <br />} | ||
</Typography> | ||
))} | ||
</div> | ||
<div className="aspect-video w-80 self-center overflow-hidden rounded-lg"> | ||
<VimeoVideo videoId={Number(translator.t('id.video-02'))} /> | ||
</div> | ||
<Typography color="accent" size="xs" className="mt-2"> | ||
{translator.t('section-4.cta')} | ||
</Typography> | ||
</div> | ||
<Typography>{translator.t('section-4.cta')}</Typography> | ||
</BaseContainer> | ||
); | ||
} |
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
Oops, something went wrong.