Skip to content

Commit

Permalink
๐ŸŽจ Publish(#32): ๊ทธ๋ฆฌ๋“œ ๋น„์œจ ์ˆ˜์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
rhehfl committed Oct 2, 2024
1 parent 4735460 commit 06d1667
Show file tree
Hide file tree
Showing 8 changed files with 171 additions and 84 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ node_modules
dist
dist-ssr
*.local

.env
# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
11 changes: 10 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import Main from './pages/main/Main';
import Quest from './pages/Quest/Quest';
import Ranking from './pages/Ranking/Ranking';
function App() {
return (
<>
<Main></Main>
<BrowserRouter>
<Routes>
<Route path="/" element={<Main />}></Route>
<Route path="/quest" element={<Quest />}></Route>
<Route path="/Ranking" element={<Ranking />}></Route>
</Routes>
</BrowserRouter>
</>
);
}
Expand Down
46 changes: 46 additions & 0 deletions src/pages/Quest/Quest.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import {
AlignCenter,
GridContainer,
LayOutDiv,
FeatureDiv,
} from '../../style/LayOut';
import { Link } from 'react-router-dom';
export default function Quest() {
return (
<AlignCenter>
<GridContainer>
<LayOutDiv>
<FeatureDiv $width="176px" $height="42px" $marginTop="50px">
๋กœ๊ณ 
</FeatureDiv>
{['', 'Ranking', 'quest', 'store', 'profile', 'setting'].map(
(value, index) => (
<FeatureDiv
$width="176px"
$height="42px"
$marginTop="40px"
key={index}
>
{value}
<Link to={`/${value}`}>์ด๋™</Link>
</FeatureDiv>
)
)}
</LayOutDiv>
<LayOutDiv>
<FeatureDiv $width="666px" $height="381px" $marginTop="98px">
์˜ค๋Š˜์˜ ํ€˜์ŠคํŠธ ์นธ
</FeatureDiv>
<FeatureDiv $width="666px" $height="283px" $marginTop="24px">
๋ฉ”์ธ ํ€˜์ŠคํŠธ ์นธ
</FeatureDiv>
</LayOutDiv>
<LayOutDiv>
<FeatureDiv $width="294px" $height="42px" $marginTop="42px">
์ƒ๋ช…๋ ฅ/ํ”„๋กœํ•„
</FeatureDiv>
</LayOutDiv>
</GridContainer>
</AlignCenter>
);
}
50 changes: 50 additions & 0 deletions src/pages/Ranking/Ranking.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { Link } from 'react-router-dom';
import {
AlignCenter,
GridContainer,
LayOutDiv,
FeatureDiv,
} from '../../style/LayOut';

export default function Ranking() {
return (
<AlignCenter>
<GridContainer>
<LayOutDiv>
<FeatureDiv $width="176px" $height="42px" $marginTop="50px">
๋กœ๊ณ 
</FeatureDiv>
{['', 'Ranking', 'quest', 'store', 'profile', 'setting'].map(
(value, index) => (
<FeatureDiv
$width="176px"
$height="42px"
$marginTop="40px"
key={index}
>
{value}
<Link to={`/${value}`}>์ด๋™</Link>
</FeatureDiv>
)
)}
</LayOutDiv>
<LayOutDiv>
<FeatureDiv $width="666px" $height="338px" $marginTop="98px">
๋‚ด ๋žญํ‚น ์นธ
</FeatureDiv>
<FeatureDiv $width="666px" $height="28px" $marginTop="22px">
์ •๋ ฌ๊ธฐ์ค€
</FeatureDiv>
<FeatureDiv $width="666px" $height="338px" $marginTop="22px">
๋‹ค๋ฅธ ์‚ฌ๋žŒ๋“ค ๋žญํ‚น
</FeatureDiv>
</LayOutDiv>
<LayOutDiv>
<FeatureDiv $width="294px" $height="42px" $marginTop="42px">
์ƒ๋ช…๋ ฅ/ํ”„๋กœํ•„
</FeatureDiv>
</LayOutDiv>
</GridContainer>
</AlignCenter>
);
}
119 changes: 48 additions & 71 deletions src/pages/main/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,76 +1,53 @@
import { GridDiv } from '../../style/gridSystem';
import { LayOutDiv, FeatureDiv } from './style';
import { Link } from 'react-router-dom';
import {
GridContainer,
AlignCenter,
LayOutDiv,
FeatureDiv,
} from '../../style/LayOut';
export default function Main() {
return (
<GridDiv>
<LayOutDiv $height="739px">
<FeatureDiv
$width="200px"
$height="35px"
$backGroundColor="#FFFFFF"
$marginTop="50px"
>
๋กœ๊ณ 
</FeatureDiv>
{['learining', 'Ranking', 'quest', 'store', 'profile', 'setting'].map(
(value, index) => (
<FeatureDiv
$width="197px"
$height="53px"
$backGroundColor="#FFFFFF"
$marginTop="46px"
key={index}
>
{value}
</FeatureDiv>
)
)}
</LayOutDiv>
<LayOutDiv $height="100vh ">
<FeatureDiv
$width="676px"
$height="53px"
$backGroundColor="#FFFFFF"
$marginTop="42px"
>
์ง„ํ–‰๋„
</FeatureDiv>
<FeatureDiv
$width="676px"
$height="123px"
$backGroundColor="#FFFFFF"
$marginTop="25px"
>
์ฑ•ํ„ฐ ์„ ํƒ
</FeatureDiv>
<FeatureDiv
$width="676px"
$height="468px"
$backGroundColor="#FFFFFF"
$marginTop="25px"
>
์ฑ•ํ„ฐ
</FeatureDiv>
</LayOutDiv>
<AlignCenter>
<GridContainer>
<LayOutDiv $height="100vh">
<FeatureDiv $width="176px" $height="42px" $marginTop="50px">
๋กœ๊ณ 
</FeatureDiv>
{['', 'Ranking', 'quest', 'store', 'profile', 'setting'].map(
(value, index) => (
<FeatureDiv
$width="176px"
$height="42px"
$marginTop="40px"
key={index}
>
{value}
<Link to={`/${value}`}>์ด๋™</Link>
</FeatureDiv>
)
)}
</LayOutDiv>
<LayOutDiv $height="100vh ">
<FeatureDiv $width="666px" $height="45px" $marginTop="98px">
์ง„ํ–‰๋„
</FeatureDiv>
<FeatureDiv $width="666px" $height="105px" $marginTop="25px">
์ฑ•ํ„ฐ ์„ ํƒ
</FeatureDiv>
<FeatureDiv $width="666px" $height="468px" $marginTop="25px">
์ฑ•ํ„ฐ
</FeatureDiv>
</LayOutDiv>

<LayOutDiv $marginTop="42px" $height="303px">
<FeatureDiv
$width="240px"
$height="52px"
$backGroundColor="#FFFFFF"
$marginTop="25px"
>
์ƒ๋ช…๋ ฅ/ํ”„๋กœํ•„
</FeatureDiv>
<FeatureDiv
$width="250px"
$height="197px"
$backGroundColor="#FFFFFF"
$marginTop="54px"
>
์ผ์ผ ํ€˜์ŠคํŠธ
</FeatureDiv>
</LayOutDiv>
</GridDiv>
<LayOutDiv $height="100vh">
<FeatureDiv $width="294px" $height="42px" $marginTop="42px">
์ƒ๋ช…๋ ฅ/ํ”„๋กœํ•„
</FeatureDiv>
<FeatureDiv $width="274px" $height="158px" $marginTop="47px">
์ผ์ผ ํ€˜์ŠคํŠธ
</FeatureDiv>
</LayOutDiv>
</GridContainer>
</AlignCenter>
);
}
18 changes: 15 additions & 3 deletions src/pages/main/style.ts โ†’ src/style/LayOut.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
import styled from 'styled-components';
import { LayOut } from './type';
import { LayOut } from '../types/LayOut';
//์•„๋ž˜ ์ฝ”๋“œ๋Š” ๊ตฌ์—ญ์„ ๋‚˜๋ˆ„๊ธฐ ์œ„ํ•œ ๊ฒƒ ์ผ ๋ฟ์ด๋‹ˆ ๋‚˜์ค‘์— ์ง€์›Œ๋„ ๋ฉ๋‹ˆ๋‹ค
export const GridContainer = styled.div`
display: grid;
width: 1280px;
margin: 0 62px;
grid-template-columns: 2fr 7fr 3fr;
column-gap: 20px;
`;
export const AlignCenter = styled.div`
display: flex;
justify-content: center;
`;

export const LayOutDiv = styled.div<LayOut>`
display: flex;
flex-direction: column;
align-items: center;
margin-top: ${({ $marginTop }) => $marginTop || '0px'};
height: ${({ $height }) => $height || '0px'};
background-color: ${({ $backGroundColor }) => $backGroundColor || 'gray'};
height: ${({ $height }) => $height || '100vh'};
background-color: ${({ $backGroundColor }) => $backGroundColor || '#fffff'};
`;
export const FeatureDiv = styled.div<LayOut>`
width: ${({ $width }) => $width || '0px'};
Expand Down
8 changes: 0 additions & 8 deletions src/style/gridSystem.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/pages/main/type.ts โ†’ src/types/LayOut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export interface LayOut {
$height?: string;
$width?: string;
$backGroundColor?: string;
$gridColumn?: string;
}

0 comments on commit 06d1667

Please sign in to comment.