-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add banner about staking data source
- Loading branch information
Showing
8 changed files
with
119 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { motion, Transition, Variants } from 'framer-motion'; | ||
import Banner, { getBannersLinks } from '@/components/banner'; | ||
import Footer from '@/components/footer'; | ||
import useStyles from '@/components/layout/styles'; | ||
import type { LayoutProps } from '@/components/layout/types'; | ||
import Nav from '@/components/nav'; | ||
import Typography from '@mui/material/Typography'; | ||
import useAppTranslation from '@/hooks/useAppTranslation'; | ||
|
||
const bannerLinks = getBannersLinks(); | ||
|
||
const variants: Variants = { | ||
initial: { filter: 'blur(4px)' }, | ||
animate: { filter: 'blur(0px)' }, | ||
exit: { filter: 'blur(4px)' }, | ||
}; | ||
|
||
const transition: Transition = { | ||
duration: 1, | ||
}; | ||
|
||
const Layout = (props: LayoutProps) => { | ||
const { classes, cx } = useStyles(); | ||
const { children, navTitle, className } = props; | ||
const { t } = useAppTranslation('validators'); | ||
|
||
return ( | ||
<motion.div | ||
initial="initial" | ||
animate="animate" | ||
exit="exit" | ||
variants={variants} | ||
transition={transition} | ||
className={classes.root} | ||
> | ||
<div className={classes.contentWrapper}> | ||
<Nav title={navTitle} /> | ||
<div className={classes.children}> | ||
<div className={classes.appBarPlaceholder} /> | ||
{!!bannerLinks.length && <Banner />} | ||
<div className={classes.content}> | ||
<Typography variant="h4"> {t('stakingDataIsSourcedFromCosmoshub')}</Typography> | ||
</div> | ||
<div className={cx(className, 'main-content')}>{children}</div> | ||
</div> | ||
</div> | ||
<Footer className={classes.footer} /> | ||
</motion.div> | ||
); | ||
}; | ||
|
||
export default Layout; |
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,50 @@ | ||
import { CSSObject } from '@emotion/react'; | ||
import { makeStyles } from 'tss-react/mui'; | ||
|
||
const useStyles = makeStyles()((theme) => ({ | ||
root: { | ||
[theme.breakpoints.up('lg')]: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
minHeight: '100vh', | ||
}, | ||
}, | ||
contentWrapper: { | ||
[theme.breakpoints.up('lg')]: { | ||
display: 'flex', | ||
flex: 1, | ||
}, | ||
}, | ||
footer: { | ||
[theme.breakpoints.up('lg')]: { | ||
position: 'relative', | ||
zIndex: 1299, | ||
}, | ||
}, | ||
appBarPlaceholder: { | ||
...(theme.mixins.toolbar as CSSObject), | ||
}, | ||
children: { | ||
flexGrow: 1, | ||
display: 'flex', | ||
flexDirection: 'column', | ||
'& .main-content': { | ||
width: '100%', | ||
flex: 1, | ||
}, | ||
}, | ||
content: { | ||
flex: 1, | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'space-around', | ||
color: theme.palette.custom.fonts.fontOne, | ||
backgroundColor: theme.palette.custom.wallet.backgroundTwo, | ||
padding: theme.spacing(1.5), | ||
marginTop: theme.spacing(2), | ||
marginLeft: theme.spacing(1), | ||
marginRight: theme.spacing(1) | ||
}, | ||
})); | ||
|
||
export default useStyles; |
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,7 @@ | ||
import { ReactNode } from 'react'; | ||
|
||
export interface LayoutProps { | ||
children: ReactNode; | ||
navTitle?: string; | ||
className?: string; | ||
} |
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