adjusting login layout

This commit is contained in:
Roland Osborne 2022-08-03 22:07:02 -07:00
parent 1b6891c639
commit 05da046297
4 changed files with 40 additions and 11 deletions

View File

@ -5,5 +5,4 @@ export const AppWrapper = styled.div`
position: absolute;
width: 100vw;
height: 100vh;
padding: 8px;
`;

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

View File

@ -4,6 +4,8 @@ import { AppContext } from 'context/AppContext';
import { ViewportContext } from 'context/ViewportContext';
import { LoginWrapper } from './Login.styled';
import login from 'images/login.png'
export function Login() {
const navigate = useNavigate();
@ -21,10 +23,17 @@ export function Login() {
return (
<LoginWrapper>
{ (viewport.state.display === 'large' || viewport.state.display === 'xlarge') && (
<div class="split-layout"></div>
<div class="split-layout">
<div class="left">
<img class="splash" src={login} alt={login} />
</div>
<div class="right">RIGHT</div>
</div>
)}
{ (viewport.state.display === 'medium' || viewport.state.display === 'small') && (
<div class="full-layout"></div>
<div class="full-layout">
<div class="center"></div>
</div>
)}
</LoginWrapper>
);

View File

@ -7,16 +7,37 @@ export const LoginWrapper = styled.div`
.full-layout {
width: 100%;
height: 100%;
border-radius: 4px;
background: ${Colors.formBackground};
padding: 8px;
.center {
width: 100%;
height: 100%;
border-radius: 4px;
background: ${Colors.formBackground};
}
}
.split-layout {
position: relative;
left: 50%;
width: 50%;
display: flex;
flex-direction: row;
height: 100%;
border-radius: 4px;
background: ${Colors.formBackground};
.left {
width: 50%;
height: 100%;
padding: 32px;
.splash {
width: 100%;
height: 100%;
object-fit: contain;
}
}
.right {
width: 50%;
height: 100%;
background: ${Colors.formBackground};
}
}
`;