-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/#25/프로젝트 디테일 페이지 제작 및 마크다운 뷰어 추가
백틱(`) 논의 필요
- Loading branch information
Showing
8 changed files
with
343 additions
and
8 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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import "@uiw/react-md-editor/markdown-editor.css"; | ||
import "@uiw/react-markdown-preview/markdown.css"; | ||
import styles from "./styles.module.css"; | ||
import dynamic from "next/dynamic"; | ||
import { testReadme } from "./TestReadme"; | ||
|
||
const MDEditor = dynamic(() => import("@uiw/react-md-editor"), { ssr: false }); | ||
|
||
function MDEditorViewer() { | ||
return ( | ||
<div> | ||
<MDEditor | ||
className={styles.editor} | ||
preview={"preview"} | ||
hideToolbar={true} | ||
visiableDragbar={false} | ||
tabSize={2} | ||
value={testReadme} | ||
/> | ||
</div> | ||
); | ||
} | ||
|
||
export default MDEditorViewer; |
Large diffs are not rendered by default.
Oops, something went wrong.
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,15 @@ | ||
/* 컨테이너 스타일 */ | ||
.editor { | ||
min-height: 800px; /* 전체 에디터 높이 지정 */ | ||
} | ||
|
||
/* MDEditor 내부 스타일 */ | ||
.editor :global(.w-md-editor-content) { | ||
min-height: 800px; /* 내용 영역 높이 설정 */ | ||
font-size: 16px; /* 글꼴 크기 설정 */ | ||
} | ||
|
||
.editor :global(.w-md-editor-text-input) { | ||
height: 100%; /* 입력 영역을 꽉 채우도록 설정 */ | ||
font-size: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { useRouter } from "next/router"; | ||
import MDEditorViewer from "./MDEditor/MdeditorViewer"; | ||
|
||
export default function ProjectComponents() { | ||
const router = useRouter(); | ||
const { id } = router.query; | ||
|
||
return ( | ||
<div> | ||
<h1> 프로젝트 제목: {id} </h1> | ||
<h1> 사진 사진 사진 사진</h1> | ||
<h1> 링크 링크 링크 </h1> | ||
<h1> Markdown Viewer </h1> | ||
|
||
<MDEditorViewer /> | ||
</div> | ||
); | ||
} |
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,5 @@ | ||
import ProjectComponents from "@/components/Project/Project"; | ||
|
||
export default function Project() { | ||
return <ProjectComponents />; | ||
} |
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