File tree Expand file tree Collapse file tree 10 files changed +110
-8
lines changed
Expand file tree Collapse file tree 10 files changed +110
-8
lines changed Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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 ;
Original file line number Diff line number Diff 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+
Original file line number Diff line number Diff line change 3434
3535button {
3636 cursor : pointer ;
37+ font-family : " Pretendard" , sans-serif ;
3738}
Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff line change 11import { StrictMode } from 'react' ;
22import { createRoot } from 'react-dom/client' ;
3+ import { BrowserRouter } from 'react-router-dom' ;
34import App from './App.jsx' ;
45
56createRoot ( document . getElementById ( 'root' ) ) . render (
67 < StrictMode >
7- < App />
8+ < BrowserRouter >
9+ < App />
10+ </ BrowserRouter >
811 </ StrictMode > ,
912) ;
Original file line number Diff line number Diff line change 1+ export default function Test ( ) {
2+ return (
3+ < div style = { { fontSize :"30px" } } > Route test component ^_^ </ div >
4+ )
5+ }
You can’t perform that action at this time.
0 commit comments