Add zoom to lightbox

This commit is contained in:
2019-10-28 19:06:22 +01:00
parent 61084c3db9
commit 2af07cc656
6 changed files with 81 additions and 32 deletions

View File

@@ -25,32 +25,46 @@
border-radius:0;
background-color: rgba(255, 255, 255, 0.5);
.lb-image {
image-orientation: from-image;
border: none;
}
.lb-container {
overflow: hidden;
.lb-nav a.lb-prev, .lb-nav a.lb-next {
color: white;
text-decoration: none;
&:before {
position: absolute;
top: calc(50% - 1em);
.lb-image {
image-orientation: from-image;
border: none;
--translate-x: 0;
--translate-y: 0;
--scale: 1;
transform:
translateX(var(--translate-x, 0))
translateY(var(--translate-y, 0))
scale(var(--scale, 1));
}
}
.lb-nav a.lb-prev {
@include lightbox-icon(prev);
&:before {
left: 2em;
}
}
.lb-nav a.lb-next {
@include lightbox-icon(next);
&:before {
right: 2em;
.lb-nav {
a.lb-prev, a.lb-next {
color: white;
text-decoration: none;
&:before {
position: absolute;
top: calc(50% - 1em);
}
}
a.lb-prev {
@include lightbox-icon(prev);
&:before {
left: 2em;
}
}
a.lb-next {
@include lightbox-icon(next);
&:before {
right: 2em;
}
}
}
}
}
@@ -71,13 +85,14 @@
.lb-details {
float: none;
.lb-caption-taken, .lb-caption-posted {
.lb-caption-line {
cursor: default;
display: block;
margin-top: 1em;
}
.lb-caption-taken {
margin-top: 1em;
.lb-caption-line:first-child {
margin-top: 0;
}
.lb-number {