Skip to content

Commit

Permalink
added mobile styling to landing page
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlee348 committed Dec 2, 2024
1 parent 0d178ac commit bb4e08d
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 43 deletions.
Binary file added src/assets/images/recovery-wallet-bg-mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/recovery-wallet-bg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions src/components/helpers/FilledCheckBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import EmptyCheckBox from '~/assets/icons/square-checkbox.svg'
export default function FilledCheckBox({ checked, size = 'lg' }: { checked: boolean; size?: 'lg' | 'md' }) {
return (
<Box
width={size === 'lg' ? '7' : '5'}
height={size === 'lg' ? '7' : '5'}
justifyContent="center"
alignItems="center"
style={{
Expand All @@ -27,7 +25,7 @@ export default function FilledCheckBox({ checked, size = 'lg' }: { checked: bool
<img
src={EmptyCheckBox}
alt="Empty Checkbox"
style={{ width: size === 'lg' ? '28px' : '20px', height: size === 'lg' ? '28px' : '20px' }}
style={{ width: size === 'lg' ? '28px' : '22px', height: size === 'lg' ? '28px' : '22px' }}
/>
)}
</Box>
Expand Down
20 changes: 0 additions & 20 deletions src/components/recovery/RecoveryFooter.tsx

This file was deleted.

5 changes: 3 additions & 2 deletions src/components/wallet/tokens/TokenList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,16 @@ export default function TokenList({ onSendClick }: { onSendClick: (tokenBalance:

return (
<Box>
<Box justifyContent="space-between" alignItems="center">
<Box alignItems="center">
<Box alignItems="center" gap="2">
<Image src={CoinIcon} width="5" height="5" />

<Text variant="normal" fontWeight="bold" color="text100">
Coins
</Text>
</Box>
<Box gap="4">

<Box gap="4" marginLeft="auto">
<Box
flexDirection="row"
alignItems="center"
Expand Down
62 changes: 45 additions & 17 deletions src/routes/Landing.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
import { Box, Button, Card, Image, Modal, Text, TextInput } from '@0xsequence/design-system'
import { Box, Button, Card, Divider, Image, Modal, Text, TextInput, useMediaQuery } from '@0xsequence/design-system'
import { ChangeEvent, useEffect, useState } from 'react'
import { Link } from 'react-router-dom'

import { useObservable, useStore } from '~/stores'
import { AuthStore } from '~/stores/AuthStore'

import RecoveryFooter from '~/components/recovery/RecoveryFooter'

import contractsIcon from '~/assets/icons/contracts.svg'
import walletIcon from '~/assets/icons/wallet.svg'
import bgImageMobile from '~/assets/images/recovery-wallet-bg-mobile.jpg'
import bgImage from '~/assets/images/recovery-wallet-bg.jpg'
import SequenceRecoveryLogo from '~/assets/images/sequence-wallet-recovery.svg'

function Landing() {
const mobileBg = {
backgroundImage: `url(${bgImageMobile})`,
backgroundSize: '100%',
backgroundPosition: 'top',
backgroundRepeat: 'no-repeat',
paddingTop: '60px'
}

const desktopBg = {
backgroundImage: `url(${bgImage})`,
backgroundSize: 'cover',
backgroundPosition: 'center'
}

export default function Landing() {
const isMobile = useMediaQuery('isMobile')

const authStore = useStore(AuthStore)
const isLoadingAccountObservable = useObservable(authStore.isLoadingAccount)

Expand Down Expand Up @@ -45,26 +61,40 @@ function Landing() {

return (
<Box
justifyContent="center"
justifyContent={isMobile ? 'center' : 'flex-start'}
height="vh"
style={{ background: 'linear-gradient(to bottom, #280a6b, #000000 50%)' }}
width="vw"
style={isMobile ? mobileBg : desktopBg}
padding={isMobile ? '4' : '20'}
marginBottom={isMobile ? '10' : undefined}
>
<Box
flexDirection="column"
justifyContent="center"
alignItems="center"
width="full"
justifyContent={isMobile ? 'flex-start' : 'center'}
alignItems={isMobile ? 'center' : 'flex-start'}
width={isMobile ? 'full' : '3/4'}
style={{ maxWidth: '1000px' }}
gap="10"
zIndex="20"
>
<Box flexDirection="column" gap="6">
<Image src={SequenceRecoveryLogo} height="8" />
<Box
flexDirection="column"
justifyContent={isMobile ? 'space-between' : 'center'}
height={isMobile ? 'full' : undefined}
alignItems={isMobile ? 'center' : 'flex-start'}
gap="6"
>
<Image src={SequenceRecoveryLogo} height="8"/>

{isMobile && <Divider color="transparent" style={{ minHeight: '160px'}} />}

<Text
textAlign="center"
textAlign={isMobile ? 'center' : 'left'}
variant="xlarge"
color="text100"
style={{ fontSize: '40px', lineHeight: '44px' }}
style={
isMobile ? { fontSize: '28px', lineHeight: '32px' } : { fontSize: '40px', lineHeight: '44px' }
}
>
A fully open source and forever accessible way to recover your Sequence Wallet
</Text>
Expand Down Expand Up @@ -122,7 +152,7 @@ function Landing() {
/>
<Button as={Link} to="/recovery" label="Start Recovery" variant="primary" size="md" />
</Box>
<Box flexDirection="row" gap="2" width="2/3">
<Box flexDirection={isMobile ? 'column' : 'row'} gap="2" width={isMobile ? 'full' : '2/3'}>
<Card flexDirection="column" gap="2">
<Box flexDirection="row" gap="2">
<Image src={contractsIcon} />
Expand Down Expand Up @@ -167,10 +197,8 @@ function Landing() {
</Box>
</Modal>
)}

<RecoveryFooter />
</Box>
)
}

export default Landing

3 changes: 3 additions & 0 deletions src/routes/Recovery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function Recovery() {
alignSelf="center"
flexDirection="column"
marginY="10"
paddingX="4"
gap="4"
width="full"
style={{ maxWidth: WALLET_WIDTH }}
Expand Down Expand Up @@ -312,6 +313,7 @@ function Recovery() {
size="md"
shape="square"
onClick={() => setShowManualAddress(true)}
style={{ whiteSpace: 'normal' }}
/>
)}

Expand All @@ -332,6 +334,7 @@ function Recovery() {
onClick={() => {
handleSignInWithRecoveryMnemonic()
}}
style={{ whiteSpace: 'normal' }}
/>
</Box>
</Box>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ function Wallet() {
<Box>
<RecoveryHeader />

<Box flexDirection="column" alignItems="center">
<Box flexDirection="column" alignItems="center" paddingX="4">
<Box
flexDirection="column"
padding="5"
Expand Down

0 comments on commit bb4e08d

Please sign in to comment.