fix: improve mobile spacing/ordering on /about (#5632)

This commit is contained in:
Vignesh Mohankumar 2022-12-11 14:42:32 -05:00 committed by GitHub
parent 3c3158f443
commit 3703e843f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 19 deletions

@ -25,8 +25,8 @@ export const SubTitle = styled.h2<{ isDarkMode?: boolean }>`
font-weight: 500; font-weight: 500;
max-width: 340px; max-width: 340px;
color: transparent; color: transparent;
font-size: 36px; font-size: 20px;
line-height: 44px; line-height: 28px;
background: ${({ isDarkMode }) => background: ${({ isDarkMode }) =>
isDarkMode isDarkMode
@ -35,4 +35,9 @@ export const SubTitle = styled.h2<{ isDarkMode?: boolean }>`
background-clip: text; background-clip: text;
-webkit-background-clip: text; -webkit-background-clip: text;
@media screen and (min-width: ${BREAKPOINTS.md}px) {
font-size: 36px;
line-height: 44px;
}
` `

@ -30,10 +30,6 @@ const BackgroundImage = styled.img`
height: calc(100vh - 72px); height: calc(100vh - 72px);
` `
const AboutTitle = styled(Title)`
z-index: 1;
`
const Panels = styled.div` const Panels = styled.div`
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -62,10 +58,11 @@ const Content = styled.div`
justify-content: center; justify-content: center;
align-items: flex-start; align-items: flex-start;
padding: 0px 16px 16px 16px; padding: 0px 16px 16px 16px;
gap: 96px; gap: 48px;
@media screen and (min-width: ${BREAKPOINTS.md}px) { @media screen and (min-width: ${BREAKPOINTS.md}px) {
padding: 0px 80px 80px 80px; padding: 0px 80px 80px 80px;
gap: 96px;
} }
` `
@ -129,14 +126,6 @@ const Thumbnail = styled.img`
width: 100%; width: 100%;
` `
const PoweredBySection = styled(Panels)`
order: 1;
@media screen and (min-width: ${BREAKPOINTS.md}px) {
order: 0;
}
`
const SocialRow = styled.div` const SocialRow = styled.div`
display: flex; display: flex;
gap: 24px; gap: 24px;
@ -180,10 +169,10 @@ export default function About() {
<Page isDarkMode={isDarkMode} titleHeight={titleHeight}> <Page isDarkMode={isDarkMode} titleHeight={titleHeight}>
<BackgroundImage src={backgroundImgSrc} /> <BackgroundImage src={backgroundImgSrc} />
<Content> <Content>
<AboutTitle 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.
</AboutTitle> </Title>
<PoweredBySection> <Panels>
<div> <div>
<SubTitle isDarkMode={isDarkMode}>Powered by the Uniswap Protocol</SubTitle> <SubTitle isDarkMode={isDarkMode}>Powered by the Uniswap Protocol</SubTitle>
</div> </div>
@ -198,7 +187,7 @@ export default function About() {
</InfoButton> </InfoButton>
</ActionsContainer> </ActionsContainer>
</Intro> </Intro>
</PoweredBySection> </Panels>
<CardGrid> <CardGrid>
{CARDS.map((card) => ( {CARDS.map((card) => (
<Card key={card.title} {...card} /> <Card key={card.title} {...card} />