-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[이주안] Week13 #457
Merged
devym-37
merged 41 commits into
codeit-bootcamp-frontend:part3-이주안
from
juan0444:part3-이주안-week13
May 21, 2024
The head ref may contain hidden characters: "part3-\uC774\uC8FC\uC548-week13"
Merged
[이주안] Week13 #457
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
93a0e93
chore: 머지 후 브랜치 삭제 github action 추가
withyj-codeit 17be37c
Initial commit from Create Next App
withyj-codeit b2e37bd
reset
hanseulhee 6f8bbb0
Merge branch 'codeit-bootcamp-frontend:main' into main
hanseulhee e11e25f
fix: 머지 후 브랜치 삭제 github action 수정
hanseulhee 212e864
env: workflows 폴더로 이동
hanseulhee 4dc5dd0
Merge pull request #237 from hanseulhee/fix-github-actions
withyj-codeit 4dbede7
fix: 머지 후 브랜치 삭제 github action 수정
hanseulhee a5cd5f5
env: workflows 폴더로 이동
hanseulhee 09c3f4d
리액트테스트
96f3fc8
리액트테스트
2e40d62
리액트테스트
d0acde9
네이게이션 바, 컨텐츠 기초 틀 제작
28a72af
api수정, 기존 컨텐츠 틀 전체 변경
e8b56b0
메인 프로필, 검색바 추가
198dd00
네비게이션 바에서 로그인 버튼, footer 추가
95d31da
정보가 있을 경우 네비게이션 바에 프로필 추가
17e60b1
Merge branch 'codeit-bootcamp-frontend:main' into part2-이주안-week7
cdfa28e
Merge branch 'part2-이주안' into part2-이주안-week7
affcdbb
Merge pull request #293 from juan0444/part2-이주안-week7
devym-37 f12881f
test: git
f7721bf
feat: 반응형 추가
0335f9f
feat: 폴더 페이지 추가
f8ecd59
Merge branch 'part2-이주안' into part2-이주안-week8
9ca9c22
test: git
0fb099d
Merge branch 'part2-이주안-week8' of https://github.com/juan0444/5-Weekl…
72847c0
test: git
b5e71ba
Feat: 폴더 구조 변경
8362c94
Feat: 폴더 제목 추가
a03af65
Feat: 폴더 버튼 클릭시 해당하는 링크 카드를 나타냄
71940d1
Feat: 케밥 버튼 추가
fce377b
Feat: 케밥 버튼 추가
366fb18
Feat: 모달 추가
a0286a1
Feat: 추가한 모달 버튼에 추가
09fb67c
style: 클래스명 변경
4bcf2ab
Feat: 공유 모달 추가
1439709
Test: Next.js 테스트
02dc494
Feat: 컴포넌트 원래대로 배치
ef7fb12
Feat: 타입 추가
66cd7b8
Style: 모달 변경
ff5be4e
Merge branch 'part3-이주안' into part3-이주안-week13
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
/node_modules | ||
/.pnp | ||
.pnp.js | ||
.yarn/install-state.gz | ||
|
||
# testing | ||
/coverage | ||
|
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,109 @@ | ||
@import "/styles/globals.scss"; | ||
|
||
.container { | ||
z-index: 4; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: $modal-gray; | ||
} | ||
|
||
.content { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
align-items: center; | ||
transform: translate(-50%, -50%); | ||
gap: 1.5rem; | ||
|
||
padding: 2.2rem 2.5rem; | ||
|
||
width: 25rem; | ||
height: 26rem; | ||
|
||
border-radius: 0.9375rem; | ||
border: 1px solid $color-gray-light; | ||
background: $color-white; | ||
|
||
h2 { | ||
@include font(1.5rem, $color-gray100, 700); | ||
} | ||
} | ||
|
||
.title { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
|
||
@include font(1.2rem, $color-gray60, 400); | ||
|
||
p { | ||
width: 20rem; | ||
margin-top: 0.8rem; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
word-break: break-all; | ||
} | ||
} | ||
|
||
.input-text { | ||
border: 1px solid $color-primary; | ||
} | ||
|
||
.folder-block { | ||
display: flex; | ||
margin-top: 1rem; | ||
width: 20rem; | ||
height: 12rem; | ||
flex-direction: column; | ||
align-items: baseline; | ||
overflow: scroll; | ||
overflow-x: hidden; | ||
|
||
button { | ||
width: 100%; | ||
text-align: left; | ||
padding: 0.8rem; | ||
@include font(1.2rem, $color-black, 400); | ||
|
||
&:hover { | ||
border-radius: 0.5rem; | ||
background: $color-light-blue; | ||
@include font(1.2rem, $color-primary, 400); | ||
} | ||
} | ||
} | ||
|
||
.button-click { | ||
border-radius: 0.5rem; | ||
background: $color-light-blue; | ||
@include font(1.4rem, $color-primary, 400); | ||
} | ||
|
||
.add-button { | ||
display: flex; | ||
width: 100%; | ||
margin-top: 1.4rem; | ||
padding: 1rem 1.25rem; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 0.625rem; | ||
|
||
border-radius: 0.5rem; | ||
background: $color-linear-gradient; | ||
|
||
@include font(1.2rem, $color-gray-light, 600); | ||
} | ||
|
||
.button { | ||
border: none; | ||
background-color: #fff; | ||
} |
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,54 @@ | ||
import { useEffect, useRef } from "react"; | ||
import styles from "./AddFolderModal.module.scss"; | ||
import classNames from "classnames/bind"; | ||
import { COLSE_ICON } from "./constant"; | ||
|
||
const cx = classNames.bind(styles); | ||
|
||
export const AddFolderModal = ({ modal, setModal, url, folders }) => { | ||
const modalRef = useRef(null); | ||
|
||
// 모달 영역 밖 클릭 시 닫기 | ||
useEffect(() => { | ||
const handleModal = (event) => { | ||
if (modal && !modalRef.current?.contains?.(event.target)) { | ||
setModal(false); | ||
} | ||
}; | ||
|
||
document.addEventListener("mousedown", handleModal); | ||
|
||
return () => { | ||
document.removeEventListener("mousedown", handleModal); | ||
}; | ||
}, [modal, setModal, modalRef]); | ||
|
||
return ( | ||
<div className={cx("container")}> | ||
<div className={cx("content")} ref={modalRef}> | ||
<div className={cx("title")}> | ||
<h2>폴더에 추가</h2> | ||
<p>{url}</p> | ||
<div className={cx("folder-block")}> | ||
{folders.map((item) => { | ||
return ( | ||
<button | ||
key={item.id} | ||
className={cx("button")} | ||
// onClick={() => clickButton(item, index)} | ||
type="button" | ||
> | ||
<span>{item.name}</span> | ||
</button> | ||
); | ||
})} | ||
</div> | ||
|
||
<button className={cx("add-button")} type="button"> | ||
추가하기 | ||
</button> | ||
</div> | ||
</div> | ||
</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 @@ | ||
export const COLSE_ICON = "/closeIcon.svg"; |
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 @@ | ||
export * from "./AddFolderModal"; |
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,89 @@ | ||
@import "/styles/globals.scss"; | ||
|
||
.container { | ||
z-index: 4; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
background: $modal-gray; | ||
} | ||
|
||
.content { | ||
position: absolute; | ||
top: 50%; | ||
left: 50%; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
align-items: center; | ||
transform: translate(-50%, -50%); | ||
gap: 1.5rem; | ||
padding: 2.2rem 2.5rem; | ||
width: 25rem; | ||
height: 16rem; | ||
border-radius: 0.9375rem; | ||
border: 1px solid $color-gray-light; | ||
background: $color-white; | ||
|
||
h2 { | ||
@include font(1.5rem, $color-gray100, 700); | ||
} | ||
} | ||
|
||
.title { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
text-align: center; | ||
|
||
@include font(1.2rem, $color-gray60, 400); | ||
|
||
input { | ||
width: 20rem; | ||
margin-top: 0.8rem; | ||
padding: 1.2rem; | ||
border-radius: 0.5rem; | ||
background: $color-white; | ||
border: 1px solid $color-gray20; | ||
@include font(1.2rem, $color-gray100, 400); | ||
|
||
&:hover { | ||
border: 1px solid $color-primary; | ||
} | ||
} | ||
|
||
button { | ||
display: flex; | ||
width: 100%; | ||
margin-top: 1.4rem; | ||
padding: 1rem 1.25rem; | ||
justify-content: center; | ||
align-items: center; | ||
gap: 0.625rem; | ||
|
||
border-radius: 0.5rem; | ||
background: $color-linear-gradient; | ||
|
||
@include font(1.2rem, $color-gray-light, 600); | ||
} | ||
|
||
p { | ||
width: 20rem; | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
word-break: break-all; | ||
} | ||
} | ||
|
||
.input-text { | ||
border: 1px solid $color-primary; | ||
} | ||
|
||
.image { | ||
width: 1rem; | ||
height: 1rem; | ||
} |
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,36 @@ | ||
import { useEffect, useRef } from "react"; | ||
import styles from "./AddModal.module.scss"; | ||
import classNames from "classnames/bind"; | ||
import { COLSE_ICON } from "./constant"; | ||
import Image from "next/image"; | ||
|
||
const cx = classNames.bind(styles); | ||
|
||
export const AddModal = ({ modal, setModal, children }) => { | ||
const modalRef = useRef(null); | ||
|
||
// 모달 영역 밖 클릭 시 닫기 | ||
useEffect(() => { | ||
const handleModal = (event) => { | ||
if (modal && !modalRef.current?.contains?.(event.target)) { | ||
setModal(false); | ||
} | ||
}; | ||
|
||
document.addEventListener("mousedown", handleModal); | ||
|
||
return () => { | ||
document.removeEventListener("mousedown", handleModal); | ||
}; | ||
}, [modal, setModal, modalRef]); | ||
|
||
return ( | ||
<div className={cx("container")}> | ||
<Image className={cx("image")} src={COLSE_ICON} alt="모달 닫기 아이콘" width={100} height={100}/> | ||
|
||
<div className={cx("content")} ref={modalRef}> | ||
<div className={cx("title")}>{children}</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. classnames 가독성이 있고 해당 스타일명만으로도 코드 구조가 읽혀서 잘 작성해주신 것 같습니다 |
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 @@ | ||
export const COLSE_ICON = "/closeIcon.svg"; |
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 @@ | ||
export * from "./AddModal"; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
잘 작성해주셨습니다! 👍