Merge pull request #89 from TeamBNBN/fe/icons
[Front-End] design: 아이콘 svg 추가
This commit is contained in:
commit
f842906454
1095
frontend/package-lock.json
generated
1095
frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -31,6 +31,7 @@
|
|||||||
"eslint-plugin-react-refresh": "^0.4.7",
|
"eslint-plugin-react-refresh": "^0.4.7",
|
||||||
"prettier": "^3.3.2",
|
"prettier": "^3.3.2",
|
||||||
"vite": "^5.3.1",
|
"vite": "^5.3.1",
|
||||||
|
"vite-plugin-svgr": "^4.2.0",
|
||||||
"vitest": "^1.6.0"
|
"vitest": "^1.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
5
frontend/src/assets/icons/back.svg
Normal file
5
frontend/src/assets/icons/back.svg
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="Chevron left">
|
||||||
|
<path id="Icon" d="M12.5 15L7.5 10L12.5 5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 240 B |
10
frontend/src/assets/icons/edit.svg
Normal file
10
frontend/src/assets/icons/edit.svg
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="Edit" clip-path="url(#clip0_708_1897)">
|
||||||
|
<path id="Icon" d="M7.33325 2.66665H2.66659C2.31296 2.66665 1.97382 2.80713 1.72378 3.05718C1.47373 3.30723 1.33325 3.64637 1.33325 3.99999V13.3333C1.33325 13.6869 1.47373 14.0261 1.72378 14.2761C1.97382 14.5262 2.31296 14.6667 2.66659 14.6667H11.9999C12.3535 14.6667 12.6927 14.5262 12.9427 14.2761C13.1928 14.0261 13.3333 13.6869 13.3333 13.3333V8.66665M12.3333 1.66665C12.5985 1.40144 12.9582 1.25244 13.3333 1.25244C13.7083 1.25244 14.068 1.40144 14.3333 1.66665C14.5985 1.93187 14.7475 2.29158 14.7475 2.66665C14.7475 3.04173 14.5985 3.40144 14.3333 3.66665L7.99992 9.99999L5.33325 10.6667L5.99992 7.99999L12.3333 1.66665Z" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_708_1897">
|
||||||
|
<rect width="16" height="16" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 954 B |
13
frontend/src/assets/icons/play.svg
Normal file
13
frontend/src/assets/icons/play.svg
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="Play circle" clip-path="url(#clip0_708_1883)">
|
||||||
|
<g id="Icon">
|
||||||
|
<path d="M7.99992 14.6667C11.6818 14.6667 14.6666 11.6819 14.6666 8.00004C14.6666 4.31814 11.6818 1.33337 7.99992 1.33337C4.31802 1.33337 1.33325 4.31814 1.33325 8.00004C1.33325 11.6819 4.31802 14.6667 7.99992 14.6667Z" stroke="#FEE9E7" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
<path d="M6.66658 5.33337L10.6666 8.00004L6.66658 10.6667V5.33337Z" stroke="#FEE9E7" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<clipPath id="clip0_708_1883">
|
||||||
|
<rect width="16" height="16" fill="white"/>
|
||||||
|
</clipPath>
|
||||||
|
</defs>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 741 B |
5
frontend/src/assets/icons/reply.svg
Normal file
5
frontend/src/assets/icons/reply.svg
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="Corner down-right">
|
||||||
|
<path id="Icon" d="M12.5 8.3335L16.6667 12.5002M16.6667 12.5002L12.5 16.6668M16.6667 12.5002H6.66671C5.78265 12.5002 4.93481 12.149 4.30968 11.5239C3.68456 10.8987 3.33337 10.0509 3.33337 9.16683V3.3335" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 407 B |
5
frontend/src/assets/icons/right.svg
Normal file
5
frontend/src/assets/icons/right.svg
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="Chevron right">
|
||||||
|
<path id="Icon" d="M9 18.5L15 12.5L9 6.5" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 241 B |
5
frontend/src/assets/icons/user.svg
Normal file
5
frontend/src/assets/icons/user.svg
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<g id="User">
|
||||||
|
<path id="Icon" d="M20 21V19C20 17.9391 19.5786 16.9217 18.8284 16.1716C18.0783 15.4214 17.0609 15 16 15H8C6.93913 15 5.92172 15.4214 5.17157 16.1716C4.42143 16.9217 4 17.9391 4 19V21M16 7C16 9.20914 14.2091 11 12 11C9.79086 11 8 9.20914 8 7C8 4.79086 9.79086 3 12 3C14.2091 3 16 4.79086 16 7Z" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 485 B |
@ -1,3 +1,4 @@
|
|||||||
|
import BackIcon from '/src/assets/icons/back.svg?react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import styles from './ArticleDetail.module.css';
|
import styles from './ArticleDetail.module.css';
|
||||||
import ArticleDetailAnswer from './ArticleDetailAnswer/ArticleDetailAnswer';
|
import ArticleDetailAnswer from './ArticleDetailAnswer/ArticleDetailAnswer';
|
||||||
@ -7,19 +8,17 @@ export default function ArticleDetail({ topic, title, author = null, content, an
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.articleDetail}>
|
<div className={styles.articleDetail}>
|
||||||
<header>
|
<header className={styles.header}>
|
||||||
|
<Link
|
||||||
|
to={'..'}
|
||||||
|
className={styles.goBack}
|
||||||
|
>
|
||||||
|
<BackIcon />
|
||||||
|
<span>{topic}</span>
|
||||||
|
</Link>
|
||||||
<div>
|
<div>
|
||||||
<Link
|
<h1 className={styles.title}>{title}</h1>
|
||||||
to={'..'}
|
{author && <span className={styles.author}>{author}</span>}
|
||||||
className={styles.backButton}
|
|
||||||
>
|
|
||||||
<div>-</div>
|
|
||||||
<div className={styles.backText}>{topic}</div>
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<div className={styles.title}>{title}</div>
|
|
||||||
{author && <div className={styles.author}>{author}</div>}
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div>
|
<div>
|
||||||
|
@ -9,29 +9,34 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.backButton {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
color: var(--text-color-secondary);
|
flex-direction: column;
|
||||||
flex-wrap: nowrap;
|
align-items: start;
|
||||||
line-height: 1.2;
|
gap: 8px;
|
||||||
font-weight: 400;
|
|
||||||
font-size: 20px;
|
|
||||||
padding-bottom: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.backText {
|
.goBack {
|
||||||
padding-left: 4px;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 1.2;
|
||||||
|
font-weight: 400;
|
||||||
|
color: var(--text-color-secondary);
|
||||||
|
stroke: var(--text-color-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 32px;
|
font-size: 32px;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
font-weight: 800;
|
font-weight: 800;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.author {
|
.author {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 200;
|
font-weight: 400;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
color: var(--text-color-secondary);
|
color: var(--text-color-secondary);
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
import styles from './ArticleDetailAnswer.module.css';
|
import styles from './ArticleDetailAnswer.module.css';
|
||||||
|
import ReplyIcon from '/src/assets/icons/reply.svg?react';
|
||||||
|
|
||||||
export default function ArticleDetailAnswer({ answer }) {
|
export default function ArticleDetailAnswer({ answer }) {
|
||||||
return (
|
return (
|
||||||
<div className={styles.answer}>
|
<section className={styles.answer}>
|
||||||
<div className={styles.answerHeader}>
|
<div className={styles.answerHeader}>
|
||||||
<div>--</div>
|
<ReplyIcon />
|
||||||
<div className={styles.author}>선생님의 답변</div>
|
<div className={styles.author}>선생님의 답변</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.content}>{answer}</div>
|
<p className={styles.content}>{answer}</p>
|
||||||
</div>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
.answer {
|
.answer {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
@ -8,20 +11,21 @@
|
|||||||
|
|
||||||
.answerHeader {
|
.answerHeader {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
gap: 4px;
|
||||||
}
|
color: var(--text-color-secondary);
|
||||||
|
stroke: var(--text-color-secondary);
|
||||||
.content {
|
|
||||||
margin-top: 8px;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 300;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.author {
|
.author {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 200;
|
font-weight: 400;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
color: var(--text-color-secondary);
|
}
|
||||||
margin-left: 4px;
|
|
||||||
|
.content {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 1.4;
|
||||||
|
margin: 0;
|
||||||
|
color: var(--text-color);
|
||||||
}
|
}
|
||||||
|
@ -1,19 +1,17 @@
|
|||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import styles from './ArticlePreview.module.css';
|
import styles from './ArticlePreview.module.css';
|
||||||
|
import RightIcon from '/src/assets/icons/right.svg?react';
|
||||||
|
|
||||||
export default function ArticlePreview({ to, title, contents = [] }) {
|
export default function ArticlePreview({ to, title, contents = [] }) {
|
||||||
// TODO: 아이콘 변경
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
<div className={styles.header}>
|
<Link
|
||||||
<Link
|
to={to}
|
||||||
to={to}
|
className={styles.header}
|
||||||
className={styles.title}
|
>
|
||||||
>
|
<h2 className={styles.title}>{title}</h2>
|
||||||
{title}
|
<RightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
<Link to={to}>ICON</Link>
|
|
||||||
</div>
|
|
||||||
<div className={styles.main}>
|
<div className={styles.main}>
|
||||||
{contents.map((content) => {
|
{contents.map((content) => {
|
||||||
return (
|
return (
|
||||||
|
@ -11,12 +11,15 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
color: var(--text-color);
|
||||||
|
stroke: var(--text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 24px;
|
font-size: 24px;
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
import EditIcon from '/src/assets/icons/edit.svg?react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import styles from './ArticleBoard.module.css';
|
import styles from './ArticleBoard.module.css';
|
||||||
|
|
||||||
export default function ArticleBoard({ title, canCreate, children }) {
|
export default function ArticleBoard({ title, canCreate, children }) {
|
||||||
// TODO : ㅁ 을 글쓰기 아이콘으로 변경
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.articleBoard}>
|
<div className={styles.articleBoard}>
|
||||||
<div className={styles.header}>
|
<div className={styles.header}>
|
||||||
@ -13,7 +13,7 @@ export default function ArticleBoard({ title, canCreate, children }) {
|
|||||||
className={styles.writeButton}
|
className={styles.writeButton}
|
||||||
to="write"
|
to="write"
|
||||||
>
|
>
|
||||||
<div>ㅁ</div>
|
<EditIcon className={styles.icon} />
|
||||||
<div className={styles.buttonText}>글쓰기</div>
|
<div className={styles.buttonText}>글쓰기</div>
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
|
@ -36,6 +36,10 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
stroke: var(--text-color);
|
||||||
|
}
|
||||||
|
|
||||||
.buttonText {
|
.buttonText {
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
.content {
|
.content {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 300;
|
font-weight: 400;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
color: var(--text-color-secondary);
|
color: var(--text-color-secondary);
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import styles from './LectureHeader.module.css';
|
import styles from './LectureHeader.module.css';
|
||||||
|
import PlayIcon from '/src/assets/icons/play.svg?react';
|
||||||
|
|
||||||
export default function LectureHeader({ img, title, tutorImg, tutor, isLive = false }) {
|
export default function LectureHeader({ img, title, tutorImg, tutor, isLive = false }) {
|
||||||
return (
|
return (
|
||||||
@ -26,7 +27,8 @@ export default function LectureHeader({ img, title, tutorImg, tutor, isLive = fa
|
|||||||
type="button"
|
type="button"
|
||||||
className={styles.liveButton}
|
className={styles.liveButton}
|
||||||
>
|
>
|
||||||
실시간 강의 입장하기
|
<PlayIcon />
|
||||||
|
<span>실시간 강의 입장하기</span>
|
||||||
</button>
|
</button>
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
|
@ -73,6 +73,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.liveButton {
|
.liveButton {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import react from '@vitejs/plugin-react-swc';
|
import react from '@vitejs/plugin-react-swc';
|
||||||
|
import vitePluginSvgr from 'vite-plugin-svgr';
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [react()],
|
plugins: [react(), vitePluginSvgr()],
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user