-
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.
Merge pull request #41 from WatchItDev/feat/section/statistics
feat: added statistics section to landing
- Loading branch information
Showing
7 changed files
with
522 additions
and
826 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// REACT IMPORTS | ||
import React, { FC } from 'react' | ||
|
||
// MUI IMPORTS | ||
import { Grid, Container, Box, styled, BoxProps, useTheme } from '@mui/material' | ||
|
||
// THIRD PARTY IMPORTS | ||
import { AnimationOnScroll } from 'react-animation-on-scroll' | ||
|
||
// PROJECT IMPORTS | ||
import LandingStaticsLight from '@assets/img/watchit_statistics_white.svg' | ||
import LandingStatics from '@assets/img/watchit_statistics.svg' | ||
import LandingInfo from '@pages/Landing/components/LandingInfo' | ||
import { Translation } from '@src/i18n' | ||
|
||
// ===========================|| LANDING - STATISTICS ||=========================== // | ||
|
||
const LandingStatistics: FC = (): JSX.Element => { | ||
const theme = useTheme() | ||
const isThemeLight = Object.is(theme.palette.mode, 'light') | ||
|
||
return ( | ||
<Container sx={{ zIndex: 2 }}> | ||
<Grid | ||
container spacing={3} justifyContent='center' alignItems='center' | ||
sx={{ flexDirection: { xs: 'column-reverse', sm: 'row' }, flexWrap: { xs: 'nowrap', sm: 'wrap' } }} | ||
> | ||
<Grid item width='100%' xs={12} sm={6} zIndex={10}> | ||
<AnimationOnScroll animateIn='animate__bounceInLeft' animateOut='animate__fadeOut'> | ||
<LandingInfo | ||
title={<Translation target='LANDING_STATISTICS_TITLE' />} | ||
subTitle={<Translation target='LANDING_STATISTICS_SUBTITLE' />} | ||
/> | ||
</AnimationOnScroll> | ||
</Grid> | ||
<Grid item xs={12} sm={6} zIndex={10} width='100%'> | ||
<AnimationOnScroll | ||
animateIn='animate__fadeIn' animateOut='animate__fadeOut' | ||
style={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center' }} | ||
> | ||
<LandingStatisticsImage> | ||
{ | ||
isThemeLight ? <LandingStaticsLight /> : <LandingStatics /> | ||
} | ||
</LandingStatisticsImage> | ||
</AnimationOnScroll> | ||
</Grid> | ||
</Grid> | ||
</Container> | ||
) | ||
} | ||
|
||
export const LandingStatisticsImage = styled(Box)<BoxProps>(({ theme }) => ({ | ||
zIndex: 2, | ||
width: '100%', | ||
maxWidth: '30rem', | ||
svg: { | ||
width: '100%', | ||
height: 'auto' | ||
}, | ||
[theme.breakpoints.down('sm')]: { | ||
maxWidth: '19rem' | ||
} | ||
})) | ||
|
||
export default LandingStatistics |