-
Notifications
You must be signed in to change notification settings - Fork 34
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 #463 from MetaMask/metamask-card-eu-giveaway
Prod deploy
- Loading branch information
Showing
121 changed files
with
836 additions
and
1 deletion.
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
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,14 @@ | ||
import LinkButton from '../link-button/LinkButton' | ||
import * as styles from './banner.module.scss' | ||
import React from 'react' | ||
|
||
const Banner = ({ children, image }) => { | ||
return ( | ||
<section className={styles.banner}> | ||
<div className={styles.imageWrapper}>{image}</div> | ||
<div className={styles.content}>{children}</div> | ||
</section> | ||
) | ||
} | ||
|
||
export default Banner |
63 changes: 63 additions & 0 deletions
63
src/components/Landing/card-giveaway/banner/banner.module.scss
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 '../../../../styles/card-giveaway/mixins.scss'; | ||
|
||
.banner { | ||
position: relative; | ||
overflow: hidden; | ||
color: #013330; | ||
width: 100%; | ||
max-width: 1200px; | ||
margin-inline: auto; | ||
background-color: #e5ffc3; | ||
clip-path: polygon( | ||
50px 0, | ||
100% 0, | ||
100% calc(100% - 50px), | ||
calc(100% - 50px) 100%, | ||
0 100%, | ||
0 50px | ||
); | ||
|
||
padding: 20px 20px 60px 20px; | ||
@include desktop { | ||
padding: 100px 0 124px 88px; | ||
} | ||
|
||
.content { | ||
width: 100%; | ||
@include desktop { | ||
max-width: 423px; | ||
} | ||
|
||
h2 { | ||
font-family: 'MM Sans'; | ||
font-size: 32px; | ||
line-height: 1.25; | ||
font-weight: 400; | ||
margin-bottom: 24px; | ||
} | ||
|
||
p { | ||
font-family: 'CentraNo1'; | ||
margin-bottom: 32px; | ||
} | ||
} | ||
|
||
.imageWrapper { | ||
height: auto; | ||
width: 100%; | ||
margin-bottom: 25px; | ||
|
||
@include desktop { | ||
position: absolute; | ||
right: 0; | ||
top: 0; | ||
height: 100%; | ||
width: auto; | ||
} | ||
|
||
img { | ||
height: 100%; | ||
width: auto; | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/components/Landing/card-giveaway/container/Container.js
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,13 @@ | ||
import clsx from 'clsx' | ||
import * as styles from './container.module.scss' | ||
import React from 'react' | ||
|
||
const Container = ({ width = 'narrow', children }) => { | ||
return ( | ||
<section className={clsx(styles.container, styles[width])}> | ||
{children} | ||
</section> | ||
) | ||
} | ||
|
||
export default Container |
15 changes: 15 additions & 0 deletions
15
src/components/Landing/card-giveaway/container/container.module.scss
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,15 @@ | ||
@import '../../../../styles/card-giveaway/mixins.scss'; | ||
|
||
.container { | ||
width: 100%; | ||
max-width: 1200px; | ||
margin-inline: auto; | ||
padding-inline: 20px; | ||
@include desktop { | ||
padding-inline: 0; | ||
} | ||
|
||
&.narrow { | ||
max-width: 687px; | ||
} | ||
} |
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,8 @@ | ||
import * as styles from './content.module.scss' | ||
import React from 'react' | ||
|
||
const Content = ({ children }) => { | ||
return <section className={styles.content}>{children}</section> | ||
} | ||
|
||
export default Content |
27 changes: 27 additions & 0 deletions
27
src/components/Landing/card-giveaway/content/content.module.scss
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,27 @@ | ||
.content { | ||
--text-color: #393d46; | ||
--title-color: #0a0a0a; | ||
|
||
font-family: var(--font-centra-no-1); | ||
font-size: 16px; | ||
line-height: 1.5; | ||
font-weight: 400; | ||
color: var(--text-color); | ||
|
||
h2 { | ||
font-family: var(--font-mm-sans); | ||
font-size: 24px; | ||
line-height: 1.3; | ||
font-weight: 400; | ||
color: var(--title-color); | ||
} | ||
|
||
> * a { | ||
color: var(--text-color); | ||
text-decoration: underline; | ||
} | ||
|
||
hr { | ||
margin-block: 60px; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/components/Landing/card-giveaway/geoblock-overlay/GeoblockOverlay.js
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,22 @@ | ||
import * as styles from './geoblock-overlay.module.scss' | ||
import React, { useEffect } from 'react' | ||
|
||
const GeoblockOverlay = ({ children }) => { | ||
useEffect(() => { | ||
document.body.classList.add('scroll-block') | ||
|
||
return () => { | ||
document.body.classList.remove('scroll-block') | ||
} | ||
}, []) | ||
|
||
return ( | ||
<section className={styles.overlay}> | ||
<div className={styles.dialog}> | ||
<div className={styles.content}>{children}</div> | ||
</div> | ||
</section> | ||
) | ||
} | ||
|
||
export default GeoblockOverlay |
48 changes: 48 additions & 0 deletions
48
src/components/Landing/card-giveaway/geoblock-overlay/geoblock-overlay.module.scss
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,48 @@ | ||
.overlay { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background-color: rgba(0, 0, 0, 0.5); | ||
z-index: 1000; | ||
|
||
.dialog { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
transform: translate(-50%, -50%); | ||
width: 100%; | ||
padding-inline: 10px; | ||
|
||
.content { | ||
width: 100%; | ||
max-width: 800px; | ||
margin-inline: auto; | ||
padding: 32px; | ||
background-color: #fff; | ||
|
||
h2 { | ||
font-family: var(--font-mm-sans); | ||
font-size: 24px; | ||
line-height: 1.4; | ||
font-weight: 400; | ||
margin-bottom: 24px; | ||
} | ||
|
||
p { | ||
color: #393d46; | ||
font-family: var(--font-centra-no-1); | ||
font-size: 16px; | ||
line-height: 24px; | ||
font-weight: 400; | ||
margin-bottom: 24px; | ||
|
||
a { | ||
color: #393d46; | ||
text-decoration: underline; | ||
} | ||
} | ||
} | ||
} | ||
} |
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,18 @@ | ||
import * as styles from './hero.module.scss' | ||
import React from 'react' | ||
|
||
const Hero = ({ title, description, buttons }) => { | ||
return ( | ||
<section className={styles.hero}> | ||
<div className={styles.container}> | ||
<div className={styles.wrapper}> | ||
<h1 className={styles.title}>{title}</h1> | ||
<p className={styles.description}>{description}</p> | ||
<div className={styles.actions}>{buttons}</div> | ||
</div> | ||
</div> | ||
</section> | ||
) | ||
} | ||
|
||
export default Hero |
70 changes: 70 additions & 0 deletions
70
src/components/Landing/card-giveaway/hero/hero.module.scss
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,70 @@ | ||
@import '../../../../styles/card-giveaway/mixins.scss'; | ||
|
||
.hero { | ||
height: 730px; | ||
@include desktop { | ||
height: 760px; | ||
} | ||
background-color: #661800; | ||
background-image: url('/images/landing/card-giveaway/hero.png'); | ||
background-size: auto 100%; | ||
background-origin: content-box; | ||
background-repeat: no-repeat; | ||
|
||
@include desktop { | ||
background-position: right; | ||
} | ||
|
||
@include mobile { | ||
background-size: auto 320px; | ||
background-position: bottom right; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
width: 100%; | ||
height: 100%; | ||
margin: 0 auto; | ||
padding: 43px 16px; | ||
@include desktop { | ||
padding: 0; | ||
max-width: 1200px; | ||
} | ||
|
||
.wrapper { | ||
width: 100%; | ||
max-width: 540px; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 32px; | ||
|
||
@include desktop { | ||
justify-content: center; | ||
} | ||
|
||
.title { | ||
font-family: 'MM Poly Variable'; | ||
color: #ff5c16; | ||
text-transform: uppercase; | ||
font-weight: normal; | ||
font-size: 4.25rem; | ||
line-height: 1; | ||
font-variation-settings: 'wdth' 25, 'RESO' 4; | ||
@include desktop { | ||
font-size: 6.75rem; | ||
} | ||
} | ||
|
||
.description { | ||
font-family: 'CentraNo1'; | ||
color: #ff5c16; | ||
font-size: 1rem; | ||
line-height: 1.5; | ||
@include desktop { | ||
font-size: 1.25rem; | ||
line-height: 1.2; | ||
} | ||
} | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/components/Landing/card-giveaway/link-button/LinkButton.js
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,22 @@ | ||
import * as styles from './link-button.module.scss' | ||
import React from 'react' | ||
import clsx from 'clsx' | ||
|
||
const LinkButton = ({ | ||
color = 'primary', | ||
href = '#', | ||
target = '_self', | ||
children = '', | ||
}) => { | ||
return ( | ||
<a | ||
href={href} | ||
target={target} | ||
className={clsx(styles.button, styles[color])} | ||
> | ||
{children} | ||
</a> | ||
) | ||
} | ||
|
||
export default LinkButton |
Oops, something went wrong.