feat: add background image to /about (#5623)

* feat: add background image to /about

* 100% height
This commit is contained in:
Vignesh Mohankumar 2022-12-11 14:33:09 -05:00 committed by GitHub
parent 02b678b4a9
commit f933e538e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 KiB

@ -8,10 +8,14 @@ import { BREAKPOINTS } from 'theme'
import Card from './Card'
import { CARDS, STEPS } from './constants'
import backgroundImgSrc from './images/background.jpg'
import Step from './Step'
import { SubTitle, Title } from './Title'
const Page = styled.div<{ isDarkMode: boolean; titleHeight: number }>`
position: relative;
width: 100%;
align-self: center;
display: flex;
flex-direction: column;
align-items: center;
@ -19,6 +23,17 @@ const Page = styled.div<{ isDarkMode: boolean; titleHeight: number }>`
padding-top: calc(100vh - ${({ titleHeight }) => titleHeight + 200}px);
`
const BackgroundImage = styled.img`
position: absolute;
top: 0;
left: 0;
height: calc(100vh - 72px);
`
const AboutTitle = styled(Title)`
z-index: 1;
`
const Panels = styled.div`
display: flex;
flex-direction: column;
@ -163,10 +178,11 @@ export default function About() {
return (
<Trace page={PageName.ABOUT_PAGE} shouldLogImpression>
<Page isDarkMode={isDarkMode} titleHeight={titleHeight}>
<BackgroundImage src={backgroundImgSrc} />
<Content>
<Title ref={titleRef} isDarkMode={isDarkMode}>
<AboutTitle ref={titleRef} isDarkMode={isDarkMode}>
Uniswap is the leading on-chain marketplace for tokens and NFTs.
</Title>
</AboutTitle>
<PoweredBySection>
<div>
<SubTitle isDarkMode={isDarkMode}>Powered by the Uniswap Protocol</SubTitle>