Skip to content

Commit

Permalink
Merge branch 'feat/issue-#16' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
krokerdile committed Nov 11, 2023
2 parents 49d9f44 + 6883968 commit cb62878
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion src/page/MainPage.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,49 @@
import styled from "styled-components";

const MainPage = () => {
return <>Main</>;
return (
<GridContainer>
<LeftBar>sidebar</LeftBar>
<GridItem>main</GridItem>
<RightBar>sidebar</RightBar>
</GridContainer>
);
};

const GridContainer = styled.div`
display: grid;
grid-template-columns: 2fr 6fr 2fr;
grid-template-rows: 1fr;
width: 100vw;
height: 100vh;
background-color: white;
@media (max-width: 768px) {
grid-template-columns: 1fr;
grid-template-rows: 1fr 2fr 1fr;
}
`;

const GridItem = styled.div`
background-color: gray;
border: 1px dotted black;
margin: 1px;
@media (max-width: 768px) {
grid-row: 2;
}
`;

const LeftBar = styled(GridItem)`
background-color: white;
grid-row: span 3;
@media (max-width: 768px) {
grid-row: 1;
}
`;
const RightBar = styled(GridItem)`
background-color: white;
grid-row: span 3;
@media (max-width: 768px) {
grid-row: 3;
}
`;
export default MainPage;

0 comments on commit cb62878

Please sign in to comment.