2021-09-14 15:15:39 +08:00
|
|
|
@use 'sass:math';
|
|
|
|
|
2019-12-24 14:30:31 +08:00
|
|
|
.#{$ns}Images {
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
2020-12-21 10:08:40 +08:00
|
|
|
margin: calc(var(--gap-xs) * -1);
|
2019-12-24 14:30:31 +08:00
|
|
|
|
|
|
|
&-item {
|
|
|
|
display: flex;
|
2020-12-21 10:08:40 +08:00
|
|
|
margin: var(--gap-xs);
|
2019-12-24 14:30:31 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}Image {
|
2020-12-21 10:08:40 +08:00
|
|
|
border: var(--borderWidth) solid var(--borderColor);
|
2021-08-19 15:06:29 +08:00
|
|
|
|
|
|
|
&--thumb {
|
|
|
|
display: inline-block;
|
|
|
|
padding: var(--gap-xs);
|
|
|
|
}
|
2019-12-24 14:30:31 +08:00
|
|
|
|
2021-05-14 17:23:56 +08:00
|
|
|
&-thumbWrap {
|
|
|
|
position: relative;
|
2021-11-04 18:06:12 +08:00
|
|
|
height: 100%;
|
2021-05-14 17:23:56 +08:00
|
|
|
}
|
|
|
|
|
2021-08-19 15:06:29 +08:00
|
|
|
&-image {
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
&--original &-image {
|
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
|
|
|
width: auto;
|
|
|
|
margin: auto;
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:30:31 +08:00
|
|
|
&-thumb {
|
2021-08-12 17:35:13 +08:00
|
|
|
width: px2rem(110px);
|
|
|
|
height: px2rem(110px);
|
2019-12-24 14:30:31 +08:00
|
|
|
position: relative;
|
2021-05-14 17:19:33 +08:00
|
|
|
overflow: hidden;
|
2019-12-24 14:30:31 +08:00
|
|
|
|
|
|
|
> img {
|
|
|
|
position: absolute;
|
|
|
|
left: 50%;
|
|
|
|
top: 50%;
|
2020-03-06 14:37:26 +08:00
|
|
|
max-height: 100%;
|
2019-12-24 14:30:31 +08:00
|
|
|
width: auto;
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-26 17:51:14 +08:00
|
|
|
&-info {
|
2021-08-19 15:06:29 +08:00
|
|
|
padding: 5px 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&--thumb &-info {
|
2021-08-12 17:35:13 +08:00
|
|
|
width: px2rem(110px);
|
2021-08-19 15:06:29 +08:00
|
|
|
padding: 0;
|
2021-03-26 17:51:14 +08:00
|
|
|
}
|
|
|
|
|
2019-12-24 17:30:11 +08:00
|
|
|
&-thumb--4-3 {
|
2021-09-14 15:15:39 +08:00
|
|
|
height: px2rem(math.div(110px * 3, 4));
|
2019-12-24 17:30:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-thumb--16-9 {
|
2021-09-14 15:15:39 +08:00
|
|
|
height: px2rem(math.div(110px * 9, 16));
|
2019-12-24 17:30:11 +08:00
|
|
|
}
|
|
|
|
|
2021-03-18 12:00:26 +08:00
|
|
|
&-thumb--fixed-size {
|
2021-08-12 17:35:13 +08:00
|
|
|
min-width: px2rem(110px);
|
|
|
|
min-height: px2rem(110px);
|
2021-03-18 12:00:26 +08:00
|
|
|
width: 100%;
|
|
|
|
padding: 0;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-thumb--fixed-size &-thumb {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
> img {
|
|
|
|
width: auto;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-12-24 14:30:31 +08:00
|
|
|
&-thumb--w-full > img {
|
|
|
|
width: 100%;
|
|
|
|
height: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
@supports (object-fit: contain) {
|
|
|
|
&-thumb--contain > img {
|
|
|
|
position: static;
|
2019-12-24 20:11:26 +08:00
|
|
|
width: 100% !important;
|
|
|
|
height: 100% !important;
|
2019-12-24 14:30:31 +08:00
|
|
|
transform: translate(0, 0);
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
2021-08-19 15:06:29 +08:00
|
|
|
|
|
|
|
&-origin--contain > img {
|
|
|
|
width: 100% !important;
|
|
|
|
height: 100% !important;
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
2019-12-24 14:30:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
@supports (object-fit: cover) {
|
|
|
|
&-thumb--cover > img {
|
|
|
|
position: static;
|
2019-12-24 20:11:26 +08:00
|
|
|
width: 100% !important;
|
|
|
|
height: 100% !important;
|
2019-12-24 14:30:31 +08:00
|
|
|
transform: translate(0, 0);
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
object-fit: cover;
|
|
|
|
}
|
2021-08-19 15:06:29 +08:00
|
|
|
|
|
|
|
&-origin--cover > img {
|
|
|
|
width: 100% !important;
|
|
|
|
height: 100% !important;
|
|
|
|
object-fit: cover;
|
|
|
|
}
|
2019-12-24 14:30:31 +08:00
|
|
|
}
|
2020-01-06 19:32:12 +08:00
|
|
|
|
|
|
|
&-caption {
|
2020-12-21 10:08:40 +08:00
|
|
|
font-size: var(--fontSizeSm);
|
2021-03-26 17:51:14 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&-title {
|
2021-08-19 15:06:29 +08:00
|
|
|
font-size: var(--fontSizeBase);
|
|
|
|
color: var(--text--loud-color);
|
2020-01-06 19:32:12 +08:00
|
|
|
}
|
2020-01-06 22:54:24 +08:00
|
|
|
|
|
|
|
&-overlay {
|
2021-11-03 16:31:49 +08:00
|
|
|
background: rgba(8, 14, 26, 0.5);
|
2020-01-06 22:54:24 +08:00
|
|
|
position: absolute;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
display: none;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
align-content: center;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
color: #fff;
|
|
|
|
|
|
|
|
> div {
|
|
|
|
width: 100%;
|
|
|
|
text-align: center;
|
|
|
|
margin-bottom: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
> a {
|
|
|
|
cursor: pointer;
|
|
|
|
color: #fff;
|
|
|
|
display: inline-block;
|
|
|
|
padding: 0 5px;
|
|
|
|
line-height: 1;
|
|
|
|
font-size: px2rem(16px);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-29 15:11:02 +08:00
|
|
|
&-origin:hover &-overlay,
|
2021-05-14 17:23:56 +08:00
|
|
|
&-thumbWrap:hover &-overlay {
|
2020-01-06 22:54:24 +08:00
|
|
|
display: flex;
|
|
|
|
}
|
2019-12-24 14:30:31 +08:00
|
|
|
}
|
|
|
|
|
2021-08-19 15:06:29 +08:00
|
|
|
.#{$ns}ImageField--thumb {
|
2019-12-24 14:30:31 +08:00
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
2020-10-14 15:57:36 +08:00
|
|
|
@include clearfix();
|
2020-12-21 10:08:40 +08:00
|
|
|
// margin-bottom: var(--gap-md);
|
2020-10-14 15:57:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.#{$ns}ImagesField {
|
|
|
|
position: relative;
|
|
|
|
@include clearfix();
|
2019-12-24 14:30:31 +08:00
|
|
|
}
|