2019-05-16 11:04:55 +08:00
|
|
|
@mixin arrow-control {
|
2019-12-06 09:58:08 +08:00
|
|
|
width: 10%;
|
2020-12-21 10:08:40 +08:00
|
|
|
min-width: var(--Carousel-arrowControl-width);
|
2019-12-06 09:58:08 +08:00
|
|
|
height: 100%;
|
|
|
|
cursor: pointer;
|
2021-10-09 13:23:23 +08:00
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
2019-12-06 09:58:08 +08:00
|
|
|
position: absolute;
|
2020-12-21 10:08:40 +08:00
|
|
|
transition-duration: var(--Carousel-transitionDuration);
|
2019-12-06 09:58:08 +08:00
|
|
|
svg {
|
2019-05-16 11:04:55 +08:00
|
|
|
position: absolute;
|
2019-12-06 09:58:08 +08:00
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
|
|
|
right: 50%;
|
|
|
|
transform: translate(-50%, -50%);
|
2020-12-21 10:08:40 +08:00
|
|
|
width: var(--Carousel-svg-width);
|
|
|
|
height: var(--Carousel-svg-height);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-05-16 16:31:20 +08:00
|
|
|
}
|
|
|
|
|
2019-05-17 12:46:57 +08:00
|
|
|
.#{$ns}Carousel {
|
2020-12-21 10:08:40 +08:00
|
|
|
min-width: var(--Carousel-minWidth);
|
|
|
|
height: var(--Carousel-height);
|
2019-12-06 09:58:08 +08:00
|
|
|
position: relative;
|
|
|
|
display: block;
|
2020-12-21 10:08:40 +08:00
|
|
|
background: var(--Carousel-bg);
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
|
|
&.#{$ns}Carousel--light {
|
|
|
|
.#{$ns}Carousel-dot {
|
2020-12-21 10:08:40 +08:00
|
|
|
background: var(--Carousel--light-control);
|
2019-05-16 11:04:55 +08:00
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
svg {
|
2020-12-21 10:08:40 +08:00
|
|
|
fill: var(--Carousel--light-control);
|
2019-05-17 12:46:57 +08:00
|
|
|
}
|
2019-05-16 11:04:55 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
.#{$ns}Carousel-item {
|
|
|
|
.title,
|
|
|
|
.description {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--Carousel--light-control);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-05-16 11:04:55 +08:00
|
|
|
}
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-05-16 11:04:55 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&.#{$ns}Carousel--dark {
|
|
|
|
.#{$ns}Carousel-dot {
|
2020-12-21 10:08:40 +08:00
|
|
|
background: var(--Carousel--dark-control);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
2019-05-16 11:04:55 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
svg {
|
2020-12-21 10:08:40 +08:00
|
|
|
fill: var(--Carousel--dark-control);
|
2019-05-16 11:04:55 +08:00
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
.#{$ns}Carousel-item {
|
|
|
|
.title,
|
|
|
|
.description {
|
2020-12-21 10:08:40 +08:00
|
|
|
color: var(--Carousel--dark-control);
|
2019-12-06 09:58:08 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&-container {
|
2021-08-19 15:06:29 +08:00
|
|
|
position: relative;
|
2019-12-06 09:58:08 +08:00
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
.#{$ns}Carousel-item {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
position: absolute;
|
2021-08-19 15:06:29 +08:00
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
transition-duration: var(--Carousel-transitionDuration);
|
|
|
|
transition-timing-function: ease-out;
|
|
|
|
transition-property: transform, opacity;
|
2019-12-06 09:58:08 +08:00
|
|
|
|
|
|
|
&.fade {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.fade.in {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide {
|
|
|
|
transform: translateX(100%);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide.in {
|
|
|
|
transform: translateX(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slide.out {
|
|
|
|
transform: translateX(-100%);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slideRight {
|
|
|
|
transform: translateX(-100%);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slideRight.in {
|
|
|
|
transform: translateX(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.slideRight.out {
|
|
|
|
transform: translateX(100%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
2019-05-16 11:04:55 +08:00
|
|
|
position: absolute;
|
2020-12-21 10:08:40 +08:00
|
|
|
bottom: var(--Carousel-imageTitle-bottom);
|
2019-12-06 09:58:08 +08:00
|
|
|
text-align: center;
|
2019-05-16 11:04:55 +08:00
|
|
|
width: 100%;
|
2019-12-06 09:58:08 +08:00
|
|
|
opacity: 0.8;
|
|
|
|
}
|
|
|
|
|
|
|
|
.description {
|
|
|
|
position: absolute;
|
2020-12-21 10:08:40 +08:00
|
|
|
bottom: var(--Carousel-imageDescription-bottom);
|
2019-05-16 11:04:55 +08:00
|
|
|
text-align: center;
|
2019-12-06 09:58:08 +08:00
|
|
|
width: 100%;
|
|
|
|
opacity: 0.8;
|
|
|
|
}
|
2019-05-16 11:04:55 +08:00
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
.image {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background-size: cover;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-19 15:06:29 +08:00
|
|
|
&-image {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-image .#{$ns}Image-origin {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&-dotsControl {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0px;
|
|
|
|
width: 100%;
|
|
|
|
z-index: 100;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
.#{$ns}Carousel-dot {
|
|
|
|
display: inline-block;
|
2020-12-21 10:08:40 +08:00
|
|
|
height: var(--Carousel-dot-width);
|
|
|
|
width: var(--Carousel-dot-height);
|
|
|
|
border-radius: var(--Carousel-dot-borderRadius);
|
|
|
|
margin: var(--Carousel-dot-margin);
|
|
|
|
transition-duration: var(--Carousel-transitionDuration);
|
2019-12-06 09:58:08 +08:00
|
|
|
opacity: 0.3;
|
|
|
|
|
|
|
|
&.is-active {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-05-16 11:04:55 +08:00
|
|
|
|
2021-10-09 13:23:23 +08:00
|
|
|
.#{$ns}Carousel-leftArrow {
|
|
|
|
@include arrow-control;
|
|
|
|
display: none;
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Carousel-rightArrow {
|
|
|
|
@include arrow-control;
|
|
|
|
display: none;
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
.#{$ns}Carousel-leftArrow {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
.#{$ns}Carousel-rightArrow {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-06 09:58:08 +08:00
|
|
|
&-arrowsControl {
|
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
2021-08-19 15:06:29 +08:00
|
|
|
height: 100%;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2019-12-06 09:58:08 +08:00
|
|
|
z-index: 100;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|