-
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.
- Loading branch information
1 parent
804b5ba
commit 58a8a78
Showing
6 changed files
with
168 additions
and
6 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.
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,47 @@ | ||
import type { ReactNode } from 'react' | ||
import type { BaseBlock } from '@/components/Home/types' | ||
import HeaderCTA from '@/components/common/HeaderCTA' | ||
import { Container, Grid, Typography } from '@mui/material' | ||
import layoutCss from '@/components/common/styles.module.css' | ||
import css from './styles.module.css' | ||
import ArrowIcon from '@/public/images/arrow-out-icon.svg' | ||
|
||
const GridItemBigTitle = ({ title, text, children, link }: Partial<BaseBlock> & { children?: ReactNode }) => { | ||
return ( | ||
<Grid item xs={12} md={4} className={css.card}> | ||
<a href={link?.href} target="_blank" rel="noreferrer" className={css.cardLink}> | ||
<div> | ||
<Typography variant="h4" mb={1} color="text.primary"> | ||
{title} | ||
</Typography> | ||
<Typography color="primary.light">{text}</Typography> | ||
</div> | ||
<ArrowIcon className={css.icon} /> | ||
{children ? <div className={css.childrenWrapper}>{children}</div> : null} | ||
</a> | ||
</Grid> | ||
) | ||
} | ||
|
||
const OurMission = (props: Omit<BaseBlock, 'items'> & { items?: Partial<BaseBlock & { tagline: string }>[] }) => { | ||
return ( | ||
<Container className={`${layoutCss.containerShort} ${css.gradientEmphasis}`}> | ||
<HeaderCTA {...props} bigTitle /> | ||
|
||
<Grid container className={css.gridContainer}> | ||
{props.items?.map((item, index) => ( | ||
<GridItemBigTitle key={index} {...item}> | ||
{item.image ? <img src={item.image.src} alt={item.image.alt} /> : null} | ||
{item.tagline ? ( | ||
<Typography variant="caption" className={css.tagline}> | ||
{item.tagline} | ||
</Typography> | ||
) : null} | ||
</GridItemBigTitle> | ||
))} | ||
</Grid> | ||
</Container> | ||
) | ||
} | ||
|
||
export default OurMission |
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,78 @@ | ||
.gradientEmphasis b { | ||
background: linear-gradient(90deg, #00c9ff 0%, #92fe9d 100%); | ||
-webkit-background-clip: text; | ||
color: transparent; | ||
} | ||
|
||
.card { | ||
border: 1px solid var(--mui-palette-border-light); | ||
transition: 0.3s; | ||
padding: 24px; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
position: relative; | ||
} | ||
|
||
.card:first-of-type { | ||
border-top-left-radius: 12px; | ||
border-top-right-radius: 12px; | ||
} | ||
|
||
.card:last-of-type { | ||
border-bottom-left-radius: 12px; | ||
border-bottom-right-radius: 12px; | ||
} | ||
|
||
.card:hover { | ||
border-color: var(--mui-palette-primary-main); | ||
z-index: 2; | ||
cursor: pointer; | ||
} | ||
|
||
.card:hover .icon { | ||
transform: rotate(45deg); | ||
} | ||
|
||
.card:hover .icon path { | ||
fill: var(--mui-palette-primary-main); | ||
} | ||
|
||
.icon { | ||
position: absolute; | ||
top: 32px; | ||
right: 32px; | ||
transition: transform 0.3s; | ||
} | ||
|
||
.icon path { | ||
transition: fill 0.3s; | ||
} | ||
|
||
.childrenWrapper { | ||
margin-top: 40px; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 16px; | ||
} | ||
|
||
.tagline { | ||
color: var(--mui-palette-text-primary); | ||
text-decoration: underline; | ||
text-underline-offset: 8px; | ||
} | ||
|
||
@media (min-width: 600px) { | ||
.card:first-of-type { | ||
border-top-right-radius: 0px; | ||
border-top-left-radius: 12px; | ||
border-bottom-left-radius: 12px; | ||
margin-right: -1px; | ||
} | ||
|
||
.card:last-of-type { | ||
border-bottom-left-radius: 0px; | ||
border-top-right-radius: 12px; | ||
border-bottom-right-radius: 12px; | ||
} | ||
} |
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