Skip to content

Commit eb39fb9

Browse files
committed
Merge branch 'develop' into feature/Yun
2 parents c4c752e + 268c6a4 commit eb39fb9

File tree

10 files changed

+110
-8
lines changed

10 files changed

+110
-8
lines changed

.github/workflows/sync-fork.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Sync Fork
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
sync-fork:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Push to fork
22+
uses: ad-m/github-push-action@master
23+
with:
24+
github_token: ${{ secrets.FORK_TOKEN }}
25+
repository: LeeCh0129/Rolling
26+
branch: ${{ github.ref_name }}

index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.min.css"
1111
/>
1212
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
13+
<link
14+
rel="stylesheet"
15+
as="style"
16+
crossorigin
17+
href="https://cdn.jsdelivr.net/gh/orioncactus/[email protected]/dist/web/static/pretendard.min.css"
18+
/>
1319
<title>Vite + React</title>
1420
</head>
1521
<body>

src/App.jsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import './base.scss';
1+
import "./base.scss";
2+
import { Route, Routes } from "react-router-dom";
3+
import Header from "./components/layout/Header/Header";
4+
import Test from './pages/List-page/Test';
25

3-
function App() {
6+
export default function App() {
47
return (
5-
<div className="app">
6-
<h1>롤링 페이퍼 프로젝트</h1>
7-
</div>
8+
<>
9+
<Header/>
10+
<Routes>
11+
<Route path="/" element={<Test/>}/>
12+
</Routes>
13+
</>
814
);
915
}
10-
11-
export default App;

src/assets/images/rolling-logo.svg

Lines changed: 4 additions & 0 deletions
Loading

src/assets/styles/variables.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,5 @@ $font-weight-bold: 700;
127127
font-size: $font-size-12;
128128
font-weight: $font-weight-regular;
129129
}
130+
131+

src/base.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ a {
3434

3535
button {
3636
cursor: pointer;
37+
font-family: "Pretendard", sans-serif;
3738
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Link } from "react-router-dom";
2+
import { useLocation } from "react-router-dom";
3+
import styles from "./Header.module.scss";
4+
import logo from "../../../assets/images/rolling-logo.svg";
5+
6+
export default function Header(){
7+
const location = useLocation();
8+
const showButton = ['/', '/list'];
9+
const isLocation = showButton.includes(location.pathname);
10+
11+
return(
12+
<>
13+
<header className={styles.header}>
14+
<Link to="/">
15+
<img className={styles.logo} src={logo} alt="rolling logo"></img>
16+
</Link>
17+
{isLocation && <Link to="/post" className={styles.button}>롤링 페이퍼 만들기</Link>}
18+
</header>
19+
<div className={styles.underline}></div>
20+
</>
21+
)
22+
}
23+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@import '../../../assets/styles/variables.scss';
2+
3+
.header{
4+
display: flex;
5+
justify-content: space-between;
6+
align-items: center;
7+
width:100%;
8+
max-width: 1207px;
9+
margin:0 auto;
10+
}
11+
12+
.underline{
13+
height: 1px;
14+
background-color: #EDEDED;
15+
}
16+
17+
.logo{
18+
width: 106px;
19+
margin: 16px 0;
20+
}
21+
22+
.button{
23+
@include font-16-regular;
24+
padding: 7px 16px;
25+
border: 1px solid $gray-300;
26+
border-radius: 6px;
27+
white-space: nowrap;
28+
}

src/main.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import { StrictMode } from 'react';
22
import { createRoot } from 'react-dom/client';
3+
import { BrowserRouter } from 'react-router-dom';
34
import App from './App.jsx';
45

56
createRoot(document.getElementById('root')).render(
67
<StrictMode>
7-
<App />
8+
<BrowserRouter>
9+
<App/>
10+
</BrowserRouter>
811
</StrictMode>,
912
);

src/pages/List-page/Test.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default function Test(){
2+
return(
3+
<div style={{fontSize:"30px"}}>Route test component ^_^ </div>
4+
)
5+
}

0 commit comments

Comments
 (0)