Skip to content

Commit

Permalink
Merge pull request #93 from Youngseo-kangg/dev
Browse files Browse the repository at this point in the history
[Client] / #23 / Nav.js : nav bar display μˆ˜μ •
  • Loading branch information
Youngseo-kangg authored Aug 29, 2021
2 parents 6a77168 + 365da98 commit 7ae2f50
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 61 deletions.
Binary file modified .DS_Store
Binary file not shown.
53 changes: 26 additions & 27 deletions client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useState } from "react";
import Nav from "./comp/Nav";
import Modal from "./comp/Modal";
import Mypage from "./pages/Mypage";
import { BrowserRouter, Switch, Route, Link } from "react-router-dom";
import {BrowserRouter, Switch, Route, Link} from "react-router-dom"
import WriteModal from "./comp/WriteModal";

function App() {
Expand All @@ -15,42 +15,41 @@ function App() {
const [searched, setSearched] = useState(false);
const [onModal, setOnModal] = useState(false);
const [writeModal, setWriteModal] = useState(false);

return (
<BrowserRouter>
<div id="wrap">
{onModal ? <Modal /> : null}
{writeModal ? <WriteModal /> : null}
<Nav isLogin={isLogin} />

<div className="exNav">
<header>
<Link to="/">
<h1 id="jurimma"></h1>
</Link>
</header>

<div className="exNav">
<header>
<Link to="/">
<h1 id="jurimma"></h1>
</Link>
</header>

<Switch>
<>
<div className="exNav">
<Route exact path="/mypage">
<Mypage />
</Route>
<Route exact path="/">
{isLogin === true && searched === true ? (
<SearchMore data={dummyData.word} />
) : (
<Search data={dummyData.word} />
)}
</Route>
<footer>copyright JURIMMA</footer>
</div>
</>
</Switch>
</div>
<Switch>
<>
<Route path="/mypage">
<Mypage />
</Route>
<Route exact path="/">
{isLogin === true && searched === true ? (
<SearchMore data={dummyData.word} />
) : (
<Search data={dummyData.word} />
)}
</Route>
<footer>copyright JURIMMA</footer>
</>
</Switch>
</div>
</div>
</BrowserRouter>
);
}

export default App;

16 changes: 3 additions & 13 deletions client/src/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ button {
font-family: "Nanum Gothic", "Noto Sans", sans-serif;
box-sizing: border-box;
}
/* HTML5 display-role reset for older browsers */

body {
line-height: 1;
Expand Down Expand Up @@ -88,10 +87,13 @@ h1 {

#wrap {
display: flex;
width:100%;
height:100%;
}

.exNav {
flex: 5 1 auto;
min-height:100vh;
}

header {
Expand All @@ -101,18 +103,6 @@ header {
place-items: center;
}

nav {
background-color: #38372e;
/* background-color: blacks; */
height: 100vh;
flex: 1 1 auto;
}

section {
height: 60vh;
background-color: #ffe65b;
}

footer {
height: 4.5vh;
line-height: 4.5vh;
Expand Down
12 changes: 6 additions & 6 deletions client/src/comp/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import profile from "../none_profile.jpeg";
function Nav({ isLogin }) {
const NavWrap = styled.nav`
background-color: #38372e;
/* background-color: black; */
position: sticky;
top: 0;
height: 100vh;
flex: 1 1 auto;
display: grid;
place-items: center;
display:flex;
min-height:100vh;
justify-content:center;
align-items:center;
/* display: grid;
place-items: center; */
`;

const Button1 = styled.button`
Expand Down
25 changes: 12 additions & 13 deletions client/src/pages/Mypage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@ import React from "react";
import styled from "styled-components";

const MypageWrap = styled.div`
width: 100%;
height: 55vh;
display: grid;
place-items: center;
font-size: max(16px, 0.8vw);
`;
width:100%;
min-height:55vh;
font-size:max(16px, 0.8vw);
`
const MypageContent = styled.div`
width: 75%;
min-width: 200px;
display: flex;
flex-direction: column;
flex-wrap: wrap;
`;
width:75%;
min-width:200px;
margin:0 auto;
display:flex;
flex-direction:column;
flex-wrap:wrap;
`
const UserContent = styled.div`
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -71,7 +70,7 @@ function Mypage() {
<option>μž‘μ„± λ‚ μ§œ 순</option>
</select>
</UserContent>

<ContentList>
<li className="content">
<input type="checkbox" />
Expand Down
9 changes: 7 additions & 2 deletions client/src/pages/Search.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import styled from "styled-components";
import SearchInput from "../comp/SearchInput";
import SearchResult from "../comp/SearchResult";

const SearchSection = styled.section`
min-height:55vh;
`

function Search({data}) {
return (
<section>
<SearchSection>
<SearchInput />
<SearchResult data={data} />
</section>
</SearchSection>
);
}

Expand Down

0 comments on commit 7ae2f50

Please sign in to comment.