-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
213 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
@mixin font-style($size, $weight, $lineHeight, $color) { | ||
font-size: $size; | ||
font-weight: $weight; | ||
color: $color; | ||
line-height: $lineHeight; | ||
} | ||
|
||
.freeboard-detail-main { | ||
width: 1200px; | ||
margin: 0 auto; | ||
padding: 32px 0; | ||
} | ||
|
||
.board-detail-article-section { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
margin-bottom: 32px; | ||
} | ||
|
||
.title-wrapper { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
margin-bottom: 16px; | ||
|
||
h1 { | ||
@include font-style(20px, 700, 32px, var(--gray800)); | ||
} | ||
|
||
img { | ||
width: 24px; | ||
height: 24px; | ||
} | ||
} | ||
|
||
.content-wrapper { | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.user-wrapper { | ||
display: flex; | ||
align-items: center; | ||
|
||
img { | ||
width: 40px; | ||
height: 40px; | ||
margin-right: 16px; | ||
} | ||
|
||
h3 { | ||
@include font-style(14px, 500, 24px, var(--gray600)); | ||
margin-right: 8px; | ||
} | ||
|
||
span { | ||
@include font-style(14px, 400, 24px, var(--gray400)); | ||
} | ||
} | ||
|
||
.favorite-wrapper { | ||
display: flex; | ||
align-items: center; | ||
padding: 4px 12px; | ||
border: 1px solid var(--gray200); | ||
border-radius: 35px; | ||
gap: 3px; | ||
|
||
img { | ||
width: 32px; | ||
height: 32px; | ||
} | ||
|
||
span { | ||
@include font-style(16px, 500, 26px, var(--gray500)); | ||
} | ||
} | ||
|
||
.vertical-divider { | ||
border-left: 1px solid var(--gray200); | ||
width: 0; | ||
height: 40px; | ||
margin: 0 32px; | ||
} | ||
|
||
.horizontal-divider { | ||
border-top: 1px solid var(--gray200); | ||
width: 100%; | ||
height: 0px; | ||
margin: 16px 0 24px; | ||
} | ||
|
||
.content { | ||
@include font-style(18px, 400, 26px, var(--gray800)); | ||
} | ||
|
||
.comment { | ||
margin-top: 40px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Article } from "@/types/articleTypes"; | ||
import styles from "./BoardDetailArticle.module.scss"; | ||
import defalutProfleImg from "@/public/images/icons/ic_user.svg"; | ||
import kebabImg from "@/public/images/icons/ic_kebab.svg"; | ||
import favoriteImg from "@/public/images/icons/ic_heart.svg"; | ||
import { getFormatTime } from "@/utils/Utils"; | ||
|
||
export default function BoardDetailArticle({ | ||
article: { | ||
title, | ||
content, | ||
writer: { nickname }, | ||
likeCount, | ||
createdAt, | ||
}, | ||
}: { | ||
article: Article; | ||
}) { | ||
return ( | ||
<section className={styles["board-detail-article-section"]}> | ||
<div className={styles["title-wrapper"]}> | ||
<h1>{title}</h1> | ||
<img src={kebabImg.src} /> | ||
</div> | ||
<div className={styles["content-wrapper"]}> | ||
<div className={styles["user-wrapper"]}> | ||
<img src={defalutProfleImg.src} /> | ||
<h3>{nickname}</h3> | ||
<span>{getFormatTime(createdAt, false)}</span> | ||
</div> | ||
<span className={styles["vertical-divider"]}></span> | ||
<div className={styles["favorite-wrapper"]}> | ||
<img src={favoriteImg.src} /> | ||
<span>{likeCount}</span> | ||
</div> | ||
</div> | ||
<span className={styles["horizontal-divider"]}></span> | ||
<span className={styles.content}>{content}</span> | ||
</section> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
|
||
&.bottom-button { | ||
gap: 0; | ||
padding: 0; | ||
|
||
.bottom-button { | ||
margin-top: 16px; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters