Skip to content

Commit

Permalink
[ADD] Preview Board 게시판 이동 표시 (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ju1e3718 committed Jul 20, 2023
1 parent fd62ca3 commit 16111b8
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 63 deletions.
58 changes: 0 additions & 58 deletions job1/src/Main/PrevArt.css

This file was deleted.

2 changes: 1 addition & 1 deletion job1/src/Main/PrevArt.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "./PrevArt.css";
import "./Preview.css";

function PrevArt(props) {
return (
Expand Down
66 changes: 64 additions & 2 deletions job1/src/Main/Preview.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
display: flex;
}

.hotCommu {
.selectedBtn {
color: #8d8ba7;
text-align: center;
font-family: DM Sans;
Expand All @@ -17,9 +17,10 @@
line-height: 1.5rem; /* 150% */

padding: 0 1rem;
text-decoration: none;
}

.newCommu {
.Btn {
color: #000;
text-align: center;
font-family: DM Sans;
Expand All @@ -29,6 +30,7 @@
line-height: 1.5rem; /* 150% */

padding: 0 1rem;
text-decoration: none;
}

.cWriteBtn {
Expand All @@ -46,3 +48,63 @@
font-weight: 700;
line-height: 1.5rem; /* 150% */
}

/* PrevArt */
.cArticle {
display: flex;
justify-content: space-between;

/*width: 54.3125rem;
height: 3rem;
flex-shrink: 0;*/
}

.cTitle {
color: #000;
text-align: center;
font-family: DM Sans;
font-size: 1rem;
font-style: normal;
font-weight: 500;
line-height: 1.5rem; /* 150% */
}

.cLikes {
color: #920000;
text-align: center;
font-family: DM Sans;
font-size: 1rem;
font-style: normal;
font-weight: 500;
line-height: 1.5rem; /* 150% */
}

.cDate {
color: #8a8a8a;
text-align: center;
font-family: DM Sans;
font-size: 1rem;
font-style: normal;
font-weight: 500;
line-height: 1.5rem; /* 150% */
}

.cTitleHref {
color: #000;
}

.cTitleHref:link {
text-decoration: none;
}

.cTitleHref:visited {
text-decoration: none;
}

.cTitleHref:hover {
text-decoration: underline;
}

.cTitleHref:active {
text-decoration: underline;
}
23 changes: 21 additions & 2 deletions job1/src/Main/Preview.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
import PrevCont from "./PrevCont";
import { Link } from "react-router-dom";
import "./Preview.css";
import { useState } from "react";

function Preview() {
const [section, setSection] = useState("hot");
return (
<div>
<h2>게시판</h2>
<div className="bar">
<div className="cType">
<h3 className="hotCommu">HOT</h3>
<h3 className="newCommu">NEW</h3>
<Link
to={"#"}
className={section === "hot" ? "selectedBtn" : "Btn"}
onClick={() => {
setSection("hot");
}}
>
HOT
</Link>
<Link
to={"#"}
className={section === "new" ? "selectedBtn" : "Btn"}
onClick={() => {
setSection("new");
}}
>
NEW
</Link>
</div>
<button className="cWriteBtn">글쓰기</button>
</div>
Expand Down

0 comments on commit 16111b8

Please sign in to comment.