-
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.
♻️ Refactor: ImageGallery 컴포넌트 스타일 및 동작 개선, 동물 구조 요청 글타래에 슬라이더 적용 (#61)
- Loading branch information
Showing
6 changed files
with
285 additions
and
129 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,95 @@ | ||
.gallery { | ||
&-swiper.swiper { | ||
/* _imageGallery.scss */ | ||
|
||
.gallery-container { | ||
position: relative; | ||
width: 100%; | ||
height: fit-content; | ||
border-radius: var(--rad-lg); | ||
overflow: hidden; | ||
} | ||
|
||
.image-gallery-slider { | ||
width: 100%; | ||
// height: 8rem; | ||
overflow: hidden; | ||
} | ||
|
||
.image-gallery-slide-item { | ||
height: 100%; | ||
border-radius: var(--rad-lg); | ||
overflow: clip; | ||
|
||
img { | ||
width: 100%; | ||
height: 8rem; | ||
|
||
.swiper-pagination-bullet { | ||
width: 0.5rem; | ||
height: 0.5rem; | ||
background: rgb(var(--clr-white) / 0.5); | ||
border: 0.1rem solid rgb(var(--clr-gray)); | ||
opacity: 1; | ||
transition: all 0.25s; | ||
|
||
&-active { | ||
border-color: rgb(var(--clr-info)); | ||
background: rgb(var(--clr-white)); | ||
transform: scale(1.2); | ||
opacity: 1; | ||
} | ||
} | ||
height: 100%; | ||
object-fit: cover; | ||
} | ||
} | ||
|
||
&-slide { | ||
height: 100%; | ||
.image-gallery-slider-controls { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
position: absolute; | ||
inset: 0 0.4rem; | ||
margin-block: auto; | ||
height: 0; | ||
z-index: 2; | ||
} | ||
|
||
img { | ||
width: 100%; | ||
height: 100%; | ||
object-fit: cover; | ||
border-radius: var(--rad-lg); | ||
.button-slider-prev, | ||
.button-slider-next { | ||
display: grid; | ||
place-items: center; | ||
width: 1.8rem; | ||
height: 3.2rem; | ||
border-radius: var(--rad-sm); | ||
background-color: rgb(var(--clr-black) / 0.75); | ||
backdrop-filter: blur(1.8rem); | ||
outline: 0.1rem solid rgb(var(--clr-white) / 0.15); | ||
color: rgb(var(--clr-white)); | ||
transition: opacity 0.25s; | ||
|
||
&.swiper-button-disabled { | ||
opacity: 0; | ||
pointer-events: none; | ||
} | ||
} | ||
|
||
.image-gallery-slider-pagination { | ||
display: flex; | ||
gap: 0.6rem; | ||
position: absolute; | ||
inset-block-end: 0.8rem; | ||
inset-inline: 0; | ||
margin-inline: auto; | ||
width: fit-content; | ||
height: fit-content; | ||
z-index: 2; | ||
} | ||
|
||
.gallery-slider-pagination-bullet { | ||
width: 0.4rem; | ||
height: 0.4rem; | ||
border-radius: var(--rad-full); | ||
background-color: rgb(var(--clr-white) / 0.75); | ||
backdrop-filter: blur(0.4rem); | ||
outline: 1px solid rgb(var(--clr-black) / 0.15); | ||
transition: width 0.15s; | ||
|
||
&:not(.swiper-pagination-bullet-active) { | ||
cursor: pointer; | ||
|
||
&:hover { | ||
background-color: rgb(var(--clr-white)); | ||
} | ||
} | ||
|
||
&.swiper-pagination-bullet-active { | ||
width: 1.2rem; | ||
background-color: rgb(var(--clr-white)); | ||
outline: 0.2rem solid rgb(var(--clr-info) / 0.75); | ||
} | ||
} | ||
|
||
/* _imageGallery.scss */ |
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
Oops, something went wrong.