-
Notifications
You must be signed in to change notification settings - Fork 2
[FE] SISC1-211-FE [FEAT] : 게시판·게시글 API 적용 #161
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a9d9246
[FE] SISC1-211 [FEAT] : 모든 요소 API 추가(향후 수정 필요하지만 브랜치 옮기기 위해서 우선 커밋함
cmmoon03 f4644f8
[FE] SISC1-211 [CHORE] : 브랜치 이동을 위한 커밋
cmmoon03 0603063
[FE] SISC1-211 [CHORE] : 원격 브랜치 병합
cmmoon03 63742db
[FE] SISC1-211-FE [FEAT] : 게시판 API 적용
cmmoon03 2c1a016
[FE] SISC1-211-FE [FIX] : 코드래빗이 언급한 부분 수정
cmmoon03 a852d5c
Merge branch 'main' into SISC1-211-FE
cmmoon03 32b60ae
[FE] SISC1-211-FE [FIX] : 동은님이 언급하신 부분 수정
cmmoon03 90a7131
[FE] SISC1-211-FE [FEAT] : 페이지네이션 기능 구현, 상세페이지 컴포넌트 분리
cmmoon03 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
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,26 @@ | ||
| import React from 'react'; | ||
| import styles from './CategoryTabs.module.css'; | ||
|
|
||
| const CategoryTabs = ({ activeTab, onTabChange, tabs, onCreateSubBoard }) => { | ||
| return ( | ||
| <div className={styles.categoryTabsRow}> | ||
| <div className={styles.tabsLeft}> | ||
| {tabs?.map((tab) => ( | ||
| <button | ||
| key={tab.id} | ||
| className={`${styles.tab} ${activeTab === tab.id ? styles.active : ''}`} | ||
| onClick={() => onTabChange(tab.id)} | ||
| > | ||
| {tab.name} | ||
| </button> | ||
| ))} | ||
| </div> | ||
|
|
||
| <button className={styles.subBoardButton} onClick={onCreateSubBoard}> | ||
| 하위 게시판 추가 + | ||
| </button> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default CategoryTabs; | ||
This file contains hidden or 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,72 @@ | ||
| .categoryTabsRow { | ||
| display: flex; | ||
| justify-content: space-between; | ||
| align-items: center; | ||
| margin: 30px 0 20px 0; | ||
| width: 100%; | ||
| } | ||
|
|
||
| .tabsLeft { | ||
| display: flex; | ||
| gap: 10px; | ||
| } | ||
|
|
||
| .tab { | ||
| height: 43px; | ||
| padding: 12px 20px; | ||
| background: #ffffff; | ||
| border: 1px solid #d4d4d4; | ||
| border-radius: 8px; | ||
|
|
||
| /* 폰트 스타일 */ | ||
| font-size: 16px; | ||
| font-weight: 600; | ||
| font-style: normal; | ||
| line-height: 100%; | ||
| letter-spacing: 0; | ||
| color: rgba(23, 23, 23, 1); | ||
|
|
||
| cursor: pointer; | ||
| transition: all 0.2s; | ||
| white-space: nowrap; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| } | ||
|
|
||
| .tab:hover { | ||
| background: #f5f5f5; | ||
| border-color: #a8a8a8; | ||
| } | ||
|
|
||
| .tab.active { | ||
| background: rgba(238, 249, 255, 1); | ||
| border: 1px solid transparent; | ||
| color: rgba(29, 128, 244, 1); | ||
| font-weight: 600; | ||
| font-size: 16px; | ||
| line-height: 100%; | ||
| letter-spacing: 0; | ||
| } | ||
cmmoon03 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| /* 하위 게시판 추가 버튼 */ | ||
| .subBoardButton { | ||
| height: 43px; | ||
| padding: 12px 20px; | ||
| border-radius: 8px; | ||
| border: 1px solid #d4d4d4; | ||
| background: #ffffff; | ||
|
|
||
| font-size: 14px; | ||
| font-weight: 500; | ||
| color: rgba(23, 23, 23, 1); | ||
|
|
||
| cursor: pointer; | ||
| white-space: nowrap; | ||
| transition: all 0.2s; | ||
| } | ||
|
|
||
| .subBoardButton:hover { | ||
| background: #f5f5f5; | ||
| border-color: #a8a8a8; | ||
| } | ||
This file contains hidden or 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,43 @@ | ||
| import React from 'react'; | ||
| import styles from './CreateSubBoardModal.module.css'; | ||
|
|
||
| const CreateSubBoardModal = ({ value, onChange, onSave, onClose }) => { | ||
| const handleSubmit = (e) => { | ||
| e.preventDefault(); | ||
| onSave(); | ||
| }; | ||
|
|
||
| return ( | ||
| <div className={styles.modalOverlay} onClick={onClose}> | ||
| <div className={styles.modalContent} onClick={(e) => e.stopPropagation()}> | ||
| <h2 className={styles.modalTitle}>하위 게시판 생성</h2> | ||
|
|
||
| <form onSubmit={handleSubmit}> | ||
| <input | ||
| type="text" | ||
| value={value} | ||
| onChange={(e) => onChange(e.target.value)} | ||
| placeholder="하위 게시판 이름을 입력하세요" | ||
| className={styles.input} | ||
| autoFocus | ||
| /> | ||
|
|
||
| <div className={styles.buttonGroup}> | ||
| <button | ||
| type="button" | ||
| onClick={onClose} | ||
| className={styles.cancelButton} | ||
| > | ||
| 취소 | ||
| </button> | ||
| <button type="submit" className={styles.saveButton}> | ||
| 생성 | ||
| </button> | ||
| </div> | ||
| </form> | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
|
|
||
| export default CreateSubBoardModal; |
79 changes: 79 additions & 0 deletions
79
frontend/src/components/Board/CreateSubBoardModal.module.css
This file contains hidden or 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,79 @@ | ||
| .modalOverlay { | ||
| position: fixed; | ||
| top: 0; | ||
| left: 0; | ||
| right: 0; | ||
| bottom: 0; | ||
| background: rgba(0, 0, 0, 0.5); | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| z-index: 1000; | ||
| } | ||
|
|
||
| .modalContent { | ||
| background: white; | ||
| border-radius: 12px; | ||
| padding: 32px; | ||
| width: 90%; | ||
| max-width: 500px; | ||
| box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15); | ||
| } | ||
|
|
||
| .modalTitle { | ||
| font-size: 24px; | ||
| font-weight: 600; | ||
| margin-bottom: 24px; | ||
| color: #171717; | ||
| } | ||
|
|
||
| .input { | ||
| width: 100%; | ||
| padding: 12px 16px; | ||
| font-size: 16px; | ||
| border: 1px solid #d4d4d4; | ||
| border-radius: 8px; | ||
| margin-bottom: 24px; | ||
| box-sizing: border-box; | ||
| } | ||
|
|
||
| .input:focus { | ||
| outline: none; | ||
| border-color: #4a90e2; | ||
| } | ||
|
|
||
| .buttonGroup { | ||
| display: flex; | ||
| gap: 12px; | ||
| justify-content: flex-end; | ||
| } | ||
|
|
||
| .cancelButton, | ||
| .saveButton { | ||
| padding: 10px 24px; | ||
| font-size: 16px; | ||
| font-weight: 500; | ||
| border-radius: 8px; | ||
| cursor: pointer; | ||
| transition: all 0.2s; | ||
| } | ||
|
|
||
| .cancelButton { | ||
| background: #f5f5f5; | ||
| border: 1px solid #d4d4d4; | ||
| color: #171717; | ||
| } | ||
|
|
||
| .cancelButton:hover { | ||
| background: #e5e5e5; | ||
| } | ||
|
|
||
| .saveButton { | ||
| background: #4a90e2; | ||
| border: none; | ||
| color: white; | ||
| } | ||
|
|
||
| .saveButton:hover { | ||
| background: #3a80d2; | ||
| } |
This file contains hidden or 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
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.
Uh oh!
There was an error while loading. Please reload this page.