-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/#8-프레임-제작-기능-구현
- Loading branch information
Showing
42 changed files
with
487 additions
and
247 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -1,8 +1,6 @@ | ||
:root { | ||
font-family: "SUIT Variable", sans-serif; | ||
width: 100vw; | ||
height: 100vh; | ||
margin: 0; | ||
max-width: 1280px; | ||
text-align: center; | ||
width: 100vw; | ||
height: calc(var(--vh, 1vh) * 100); | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ body { | |
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
margin: 0; | ||
} | ||
|
||
.MakeFramebox { | ||
|
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,66 @@ | ||
import { useState } from "react"; | ||
import styles from "./Photoselect.module.scss"; | ||
import photo1 from "../../img/photo1.png"; | ||
import photo2 from "../../img/photo2.png"; | ||
import photo3 from "../../img/photo3.png"; | ||
import photo4 from "../../img/photo4.png"; | ||
import photo5 from "../../img/photo5.png"; | ||
import photo6 from "../../img/photo6.png"; | ||
import photo7 from "../../img/photo7.png"; | ||
import photo8 from "../../img/photo8.png"; | ||
import photo9 from "../../img/photo9.png"; | ||
import photo10 from "../../img/photo10.png"; | ||
import photo11 from "../../img/photo11.png"; | ||
import circleCheck from "../../img/circle-check-filled.png"; | ||
|
||
export default function PhotoSelect() { | ||
const photoArray = [ | ||
photo1, photo2, photo3, photo4, photo5, photo6, | ||
photo7, photo8, photo9, photo10, photo11 | ||
]; | ||
|
||
const [selectedPhotos, setSelectedPhotos] = useState([]); | ||
|
||
const handlePhotoClick = (index) => { | ||
// 이미 선택된 사진이면 제거, 아니면 추가 | ||
if (selectedPhotos.includes(index)) { | ||
setSelectedPhotos(selectedPhotos.filter((selectedIndex) => selectedIndex !== index)); | ||
} else { | ||
setSelectedPhotos([...selectedPhotos, index]); | ||
} | ||
|
||
console.log(selectedPhotos); | ||
}; | ||
|
||
return ( | ||
<div className={styles.wrapper}> | ||
<div className={styles.header}> | ||
<div className={styles.header1}> | ||
<button>선택</button> | ||
</div> | ||
<div className={styles.header2}> | ||
<button>나만의 포토북 제작하기</button> | ||
</div> | ||
</div> | ||
<div className={styles.bodySection}> | ||
<div className={styles.boxWrapper}> | ||
{/* 이미지 배열을 map 함수를 사용하여 렌더링 */} | ||
{photoArray.map((photo, index) => ( | ||
<div | ||
key={index} | ||
className={`${styles.photoBox} ${selectedPhotos.includes(index) ? styles.selectedPhoto : ''}`} | ||
onClick={() => handlePhotoClick(index)} | ||
> | ||
<img | ||
className={styles.photo} | ||
src={photo} | ||
width={120} | ||
alt={`photo-${index}`} | ||
/> | ||
</div> | ||
))} | ||
</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,91 @@ | ||
.wrapper { | ||
width: 100vw; | ||
height: 100vh; | ||
overflow-x: hidden; | ||
} | ||
|
||
.header { | ||
width: 100vw; | ||
height: 125px; | ||
display: flex; | ||
flex-direction: column; | ||
background-color: white; | ||
.header1 { | ||
height: 40px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: flex-end; | ||
border-bottom: 1.5px solid rgba(0, 0, 0, 0.06); | ||
button { | ||
margin-right: 18px; | ||
width: 45px; | ||
height: 24px; | ||
border: none; | ||
border-radius: 19px; | ||
background-color: #F7F8F8; | ||
color: #009EFF; | ||
text-align: center; | ||
font-size: 12px; | ||
font-weight: 400; | ||
cursor: pointer; | ||
} | ||
} | ||
.header2 { | ||
height: 85px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
button { | ||
height: 50px; | ||
width: 340px; | ||
border-radius: 10px; | ||
border: 1px solid #009EFF; | ||
color: #009EFF; | ||
text-align: center; | ||
font-size: 14px; | ||
font-weight: 500; | ||
background-color: white; | ||
&:hover { | ||
background-color: #009EFF; | ||
color: white; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.bodySection { | ||
width: 100vw; | ||
min-height: 673px; | ||
display: flex; | ||
justify-content: center; | ||
.boxWrapper { | ||
width: 340px; | ||
min-height: 673px; | ||
display: grid; | ||
grid-template-columns: repeat(2, 1fr); /* 2열로 나열 */ | ||
grid-template-rows: repeat(auto-fill, minmax(150px, 1fr)); | ||
grid-gap: 20px; /* 각 요소 사이의 간격 설정 */ | ||
} | ||
.photoBox { | ||
width: 160px; | ||
height: 160px; | ||
background-color: #F7F7F7; | ||
img { | ||
height: 160px; | ||
width: auto; | ||
} | ||
.selectedPhoto { | ||
position: absolute; | ||
z-index: 5; | ||
width: 160px; | ||
height: 160px; | ||
background-color: rgba(0, 0, 0, 0.10); | ||
} | ||
&:hover { | ||
border: 2px solid #009EFF; // 마우스 호버 시 테두리 스타일 | ||
} | ||
&.selectedPhoto { | ||
border: 2px solid #009EFF; // 선택된 PhotoBox에 테두리 스타일 | ||
} | ||
} | ||
} |
Oops, something went wrong.