Commit a6eff782 authored by Vignesh Mohankumar's avatar Vignesh Mohankumar Committed by GitHub

fix: make background header a background-image (#5635)

* fix: make background header a background-image

* fit differently
parent 1aba4fbc
...@@ -12,7 +12,7 @@ import backgroundImgSrc from './images/background.jpg' ...@@ -12,7 +12,7 @@ import backgroundImgSrc from './images/background.jpg'
import Step from './Step' import Step from './Step'
import { SubTitle, Title } from './Title' import { SubTitle, Title } from './Title'
const Page = styled.div<{ isDarkMode: boolean; titleHeight: number }>` const Page = styled.div<{ isDarkMode: boolean; titleHeight: number; backgroundImgSrc: string }>`
position: relative; position: relative;
width: 100%; width: 100%;
align-self: center; align-self: center;
...@@ -21,13 +21,9 @@ const Page = styled.div<{ isDarkMode: boolean; titleHeight: number }>` ...@@ -21,13 +21,9 @@ const Page = styled.div<{ isDarkMode: boolean; titleHeight: number }>`
align-items: center; align-items: center;
width: 100%; width: 100%;
padding-top: calc(100vh - ${({ titleHeight }) => titleHeight + 200}px); padding-top: calc(100vh - ${({ titleHeight }) => titleHeight + 200}px);
` background: url(${backgroundImgSrc});
background-size: auto 100vh;
const BackgroundImage = styled.img` background-repeat: no-repeat;
position: absolute;
top: 0;
left: 0;
height: calc(100vh - 72px);
` `
const Panels = styled.div` const Panels = styled.div`
...@@ -166,8 +162,7 @@ export default function About() { ...@@ -166,8 +162,7 @@ export default function About() {
return ( return (
<Trace page={PageName.ABOUT_PAGE} shouldLogImpression> <Trace page={PageName.ABOUT_PAGE} shouldLogImpression>
<Page isDarkMode={isDarkMode} titleHeight={titleHeight}> <Page isDarkMode={isDarkMode} titleHeight={titleHeight} backgroundImgSrc={backgroundImgSrc}>
<BackgroundImage src={backgroundImgSrc} />
<Content> <Content>
<Title ref={titleRef} isDarkMode={isDarkMode}> <Title ref={titleRef} isDarkMode={isDarkMode}>
Uniswap is the leading on-chain marketplace for tokens and NFTs. Uniswap is the leading on-chain marketplace for tokens and NFTs.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment