-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Masthead component * update assets * update link copy * remove previous Safe Core protocol section * update whitepaper svg asset * adjust image size. show links in mobile * adjust page layout
- Loading branch information
1 parent
7f74a83
commit 4767cd1
Showing
7 changed files
with
174 additions
and
36 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { Box, Button, Chip, Grid, Typography } from '@mui/material' | ||
import { Container } from '@mui/system' | ||
import type { ReactElement } from 'react' | ||
|
||
import layoutCss from '@/components/common/styles.module.css' | ||
import css from './styles.module.css' | ||
import type { BaseBlock } from '@/components/Home/types' | ||
import LinkButton from '@/components/common/LinkButton' | ||
import Link from 'next/link' | ||
|
||
export const Masthead = ({ title, buttons, caption, image }: BaseBlock): ReactElement => { | ||
return ( | ||
<Container className={layoutCss.containerShort}> | ||
<div className={css.container}> | ||
<Grid container spacing={{ xs: '90px', sm: '30px' }} justifyContent="space-between"> | ||
<Grid item xs={12} md={7} lg={8}> | ||
<Chip | ||
label={ | ||
<Typography variant="caption" color="text.primary"> | ||
{caption} | ||
</Typography> | ||
} | ||
className={css.chip} | ||
variant="outlined" | ||
/> | ||
<Typography variant="h2" color="text.primary" mt={3} mb={5}> | ||
{title} | ||
</Typography> | ||
{buttons ? ( | ||
<Box display="flex" gap={3} color="white" flexDirection={{ xs: 'column', md: 'row' }} alignItems="center"> | ||
{buttons.map((button, index) => { | ||
const { text, variant, href } = button | ||
const isButton = variant === 'button' | ||
|
||
return ( | ||
<Link key={index} href={href} target="_blank" rel="noreferrer" passHref> | ||
{isButton ? ( | ||
<Button variant="contained" size="large" color="secondary"> | ||
{text} | ||
</Button> | ||
) : ( | ||
<LinkButton color="secondary" sx={{ width: 'fit-content' }}> | ||
{text} | ||
</LinkButton> | ||
)} | ||
</Link> | ||
) | ||
})} | ||
</Box> | ||
) : null} | ||
</Grid> | ||
{image ? ( | ||
<Grid item xs={12} md={4} lg={3} xl={2.5} className={css.image}> | ||
<img src={image.src} alt={image.alt} /> | ||
</Grid> | ||
) : null} | ||
</Grid> | ||
</div> | ||
</Container> | ||
) | ||
} | ||
|
||
export default Masthead |
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,53 @@ | ||
.container { | ||
text-align: center; | ||
background-color: var(--mui-palette-secondary-background); | ||
border-radius: 24px; | ||
color: var(--mui-palette-text-dark); | ||
padding: 24px; | ||
justify-content: space-between; | ||
margin-bottom: 40px; | ||
} | ||
|
||
.text { | ||
margin-bottom: 16px; | ||
} | ||
|
||
.button { | ||
color: var(--mui-palette-secondary-main); | ||
} | ||
|
||
.chip { | ||
border-color: var(--mui-palette-text-primary); | ||
width: fit-content; | ||
} | ||
|
||
.linkButton { | ||
display: none; | ||
} | ||
|
||
@media (min-width: 900px) { | ||
.container { | ||
padding: 68px 104px; | ||
border-bottom: 80px; | ||
text-align: left; | ||
background-image: url('/images/Core/whitepaper-bg.svg'); | ||
background-repeat: no-repeat; | ||
background-position: right top; | ||
} | ||
|
||
.linkButton { | ||
display: block; | ||
} | ||
|
||
.image { | ||
display: flex; | ||
align-items: center; | ||
} | ||
} | ||
|
||
@media (min-width: 1440px) { | ||
.container { | ||
margin-left: -104px; | ||
margin-right: -104px; | ||
} | ||
} |
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