-
-
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): initial version of hero video for new landing page (#…
…841)
- Loading branch information
1 parent
0b02ac8
commit dec4112
Showing
7 changed files
with
83 additions
and
29 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,2 +1,2 @@ | ||
export const SIZES = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl'] as const; | ||
export const SIZES = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'] as const; | ||
export type Size = (typeof SIZES)[number]; |
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
20 changes: 20 additions & 0 deletions
20
website/src/app/[lang]/[region]/v2/(home)/(components)/mux-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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use client'; | ||
|
||
import MuxVideo from '@mux/mux-video-react'; | ||
|
||
const MuxVideoComponent = () => { | ||
return ( | ||
<MuxVideo | ||
className="h-full w-full object-cover" | ||
playbackId="KHN8ZJ7Zn7noPy8AHUToA4VSf017EdoKpkKmyp02Wr13o" | ||
// playbackId="QAjK00JKjEY9lojsht02VLckXDzrETx02glBSQ2WR9y3nk" //Portrait video | ||
poster="https://image.mux.com/KHN8ZJ7Zn7noPy8AHUToA4VSf017EdoKpkKmyp02Wr13o/thumbnail.jpg?time=0" | ||
loop | ||
muted | ||
autoPlay | ||
playsInline | ||
/> | ||
); | ||
}; | ||
|
||
export default MuxVideoComponent; |
31 changes: 11 additions & 20 deletions
31
website/src/app/[lang]/[region]/v2/(home)/(sections)/hero-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,39 +1,30 @@ | ||
import { DefaultParams } from '@/app/[lang]/[region]'; | ||
import { Translator } from '@socialincome/shared/src/utils/i18n'; | ||
import { BaseContainer, Button, Typography } from '@socialincome/ui'; | ||
import { Button, Typography } from '@socialincome/ui'; | ||
import { FontColor } from '@socialincome/ui/src/interfaces/color'; | ||
import Script from 'next/script'; | ||
import MuxVideoComponent from '../(components)/mux-video'; | ||
|
||
export async function HeroVideo({ lang, region }: DefaultParams) { | ||
export async function HeroVideo({ lang }: DefaultParams) { | ||
const translator = await Translator.getInstance({ | ||
language: lang, | ||
namespaces: ['website-home2', 'common'], | ||
}); | ||
|
||
return ( | ||
<BaseContainer className="mb-80 mt-72 flex h-fit w-fit flex-col items-center justify-center"> | ||
<div> | ||
<div className="relative z-10 m-auto flex w-3/5 flex-col text-center text-white "> | ||
<div> | ||
<div className="relative h-screen w-full"> | ||
<MuxVideoComponent /> | ||
<div className="absolute left-2 right-2 top-[10%] mx-auto max-w-4xl md:top-[30%]"> | ||
<div className="flex flex-col items-center"> | ||
<div className="text-center text-white"> | ||
{translator.t<{ text: string; color?: FontColor }[]>('section-1.title-1').map((title, index) => ( | ||
<Typography as="span" size="5xl" weight="medium" key={index} color={title.color}> | ||
<Typography as="span" size="6xl" weight="medium" key={index} lineHeight="normal" color={title.color}> | ||
{title.text}{' '} | ||
</Typography> | ||
))} | ||
</div> | ||
<Button className="relative z-10 mt-32 w-1/5 self-center text-center">Handle Jezt</Button> | ||
</div> | ||
<div className="self-center"> | ||
<iframe | ||
src="https://player.vimeo.com/video/938363500?h=514d15126c&color=ffffff&title=0&byline=0&portrait=0" | ||
className="absolute bottom-[calc(1vw-10.5%)] left-0 h-full w-full" | ||
frameBorder={0} | ||
allow="autoplay; fullscreen; picture-in-picture" | ||
allowFullScreen={true} | ||
/> | ||
</div> | ||
<Script src="https://player.vimeo.com/api/player.js"></Script> | ||
</div> | ||
</BaseContainer> | ||
<Button className="absolute inset-x-0 bottom-16 mx-auto w-48">Handle Jetzt</Button> | ||
</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