Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add auth page reponsiveness #1367

Merged
merged 8 commits into from
Apr 6, 2023
Merged
31 changes: 14 additions & 17 deletions frontend/src/components/layouts/AccessLayout/AccessLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,29 @@ import React, { ReactNode } from 'react';

import Flex from '@/components/Primitives/Layout/Flex/Flex';
import Banner from '@/components/icons/Banner';
import { ImageBackground } from '@/components/layouts/AccessLayout/styles';
import {
BannerContainer,
BodyContainer,
FormContainer,
ImageBackground,
ImageContainer,
} from '@/components/layouts/AccessLayout/styles';

type AccessLayoutProps = {
children: ReactNode;
};

const AccessLayout = ({ children }: AccessLayoutProps) => (
<Flex justify="between" css={{ minHeight: '100vh', overflow: 'auto' }}>
<Flex direction="column" css={{ flexGrow: '1', px: '$72', pb: '$24' }}>
<Flex css={{ pt: '8.4%' }}>
<BodyContainer direction="column">
<BannerContainer>
<Banner />
</Flex>
<Flex direction="column" justify="between" css={{ height: '100%', mt: '$50' }}>
{children}
</Flex>
</Flex>
<Flex
css={{
width: '65%',
py: '$24',
pr: '$24',
flexShrink: 0,
}}
>
</BannerContainer>
<FormContainer direction="column">{children}</FormContainer>
</BodyContainer>
<ImageContainer>
<ImageBackground css={{ boxShadow: '-8px 8px 24px rgba(0, 0, 0, 0.16)' }} />
</Flex>
</ImageContainer>
</Flex>
);

Expand Down
58 changes: 57 additions & 1 deletion frontend/src/components/layouts/AccessLayout/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,49 @@ import { styled } from '@/styles/stitches/stitches.config';

import Flex from '@/components/Primitives/Layout/Flex/Flex';

const CenteredContainer = styled('div', {
position: 'absolute',
top: '5%',
right: '$150',

maxWidth: '500px',
height: 'fit-content',

display: 'flex',
flexDirection: 'column',

backgroundColor: '#ffffff',
borderRadius: '$12',
});
juniorboos marked this conversation as resolved.
Show resolved Hide resolved

const BodyContainer = styled(Flex, {
width: '100%',
margin: '$48',
gap: '$72',

'@md': {
margin: '$48 $72 $24',
width: '$362',
},
});

const FormContainer = styled(Flex, {
height: '100%',
justifyContent: 'space-between',
juniorboos marked this conversation as resolved.
Show resolved Hide resolved
});

const ImageContainer = styled(Flex, {
flexGrow: 1,
py: '$24',
pr: '$24',
flexShrink: 0,
display: 'none',

'@md': {
display: 'flex',
},
});

const ImageBackground = styled(Flex, {
height: '100%',
width: '100%',
Expand All @@ -12,4 +55,17 @@ const ImageBackground = styled(Flex, {
borderRadius: '$72 0 $72',
});

export { ImageBackground };
const BannerContainer = styled(Flex, {
'& svg': {
maxWidth: '100%',
},
});

export {
BannerContainer,
CenteredContainer,
BodyContainer,
FormContainer,
ImageContainer,
ImageBackground,
};