2024-01-30 14:39:01 +01:00
|
|
|
.snap-wrapper {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
2024-02-01 12:58:00 +01:00
|
|
|
justify-content: center;
|
2024-01-30 14:39:01 +01:00
|
|
|
gap: 10px;
|
2020-03-09 13:20:20 +01:00
|
|
|
|
2024-02-01 12:58:00 +01:00
|
|
|
/* Create equal columns in flexbox */
|
|
|
|
|
.snap-image {
|
2024-02-01 15:10:17 +01:00
|
|
|
cursor: pointer;
|
2024-02-01 12:58:00 +01:00
|
|
|
|
|
|
|
|
/* Column amount and width are configurable by style variables */
|
|
|
|
|
width: calc(100% / var(--columns) - 10px);
|
|
|
|
|
min-width: var(--min-width);
|
2019-10-20 22:27:27 +02:00
|
|
|
|
2024-02-01 12:58:00 +01:00
|
|
|
img {
|
|
|
|
|
aspect-ratio: 16/10;
|
|
|
|
|
width: 100%;
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
}
|
2024-01-30 14:39:01 +01:00
|
|
|
}
|
2020-03-09 13:20:20 +01:00
|
|
|
}
|
|
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
.snap-lightbox {
|
|
|
|
|
/** Default lightbox to hidden */
|
2020-03-09 13:20:20 +01:00
|
|
|
display: none;
|
2024-01-30 22:47:35 +01:00
|
|
|
|
|
|
|
|
/** Position and style */
|
2020-03-09 13:20:20 +01:00
|
|
|
position: fixed;
|
2024-01-30 22:47:35 +01:00
|
|
|
z-index: 999;
|
2024-01-30 12:18:28 +01:00
|
|
|
width: 100%;
|
2024-01-30 22:47:35 +01:00
|
|
|
height: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
top: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
background: rgba(0, 0, 0, 0.8);
|
|
|
|
|
|
|
|
|
|
/* keep lightbox in middle. TODO: hacky, and not realibly in middle */
|
|
|
|
|
&:before {
|
|
|
|
|
content: "";
|
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
width: 0;
|
|
|
|
|
/* adjust for white space between pseudo element and next sibling */
|
|
|
|
|
margin-right: -.25em;
|
|
|
|
|
/* stretch line height */
|
|
|
|
|
height: 100%;
|
|
|
|
|
}
|
2020-03-09 13:20:20 +01:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
// /* Click on the complete background closes the lightbox */
|
|
|
|
|
// /* Exception: arrow in gallery, they have higher z-index */
|
|
|
|
|
// a.snap-lightbox-close {
|
|
|
|
|
// position: fixed;
|
|
|
|
|
// z-index: 800;
|
|
|
|
|
// width: 100%;
|
|
|
|
|
// height: 100%;
|
|
|
|
|
// text-align: center;
|
|
|
|
|
// white-space: nowrap;
|
|
|
|
|
// top: 0;
|
|
|
|
|
// left: 0;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/* Container for image */
|
|
|
|
|
.snap-lightbox-inner {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
white-space: normal;
|
|
|
|
|
max-width: 90%;
|
|
|
|
|
max-height: 80%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
|
|
/* Number text (1/3 etc) */
|
|
|
|
|
.numbertext {
|
|
|
|
|
color: #f2f2f2;
|
|
|
|
|
background-color: #000;
|
|
|
|
|
font-size: 12px;
|
|
|
|
|
padding: 8px 12px;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 10%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
img {
|
|
|
|
|
max-height: 100%;
|
|
|
|
|
}
|
2020-03-09 13:20:20 +01:00
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
// TODO: Untested
|
|
|
|
|
p {
|
|
|
|
|
color: #fff;
|
|
|
|
|
z-index: 810;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
2020-03-09 13:20:20 +01:00
|
|
|
}
|
|
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
// /* Caption text */
|
|
|
|
|
// .caption-container {
|
|
|
|
|
// text-align: center;
|
|
|
|
|
// background-color: black;
|
|
|
|
|
// padding: 2px 16px;
|
|
|
|
|
// color: white;
|
|
|
|
|
// }
|
2024-01-30 14:39:01 +01:00
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
/* prev/next arrows & close button */
|
|
|
|
|
.snap-lightbox-prev,
|
|
|
|
|
.snap-lightbox-next {
|
|
|
|
|
position: fixed;
|
|
|
|
|
z-index: 800;
|
|
|
|
|
width: 5%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
top: 0;
|
2024-02-01 15:10:17 +01:00
|
|
|
cursor: pointer;
|
2024-01-30 14:39:01 +01:00
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
.snap-lightbox-arrow {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 50%;
|
|
|
|
|
z-index: 900;
|
|
|
|
|
border: solid #fff;
|
|
|
|
|
border-width: 0 7px 7px 0;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
padding: 1%;
|
2024-01-30 14:39:01 +01:00
|
|
|
}
|
|
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
&:hover>.snap-lightbox-arrow {
|
|
|
|
|
border-color: #999;
|
|
|
|
|
transition: all 0.25s ease;
|
|
|
|
|
}
|
2020-03-09 13:20:20 +01:00
|
|
|
}
|
|
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
.snap-lightbox-prev {
|
|
|
|
|
left: 0;
|
|
|
|
|
|
|
|
|
|
.snap-lightbox-arrow {
|
|
|
|
|
left: 2%;
|
|
|
|
|
transform: rotate(135deg);
|
|
|
|
|
-webkit-transform: rotate(135deg);
|
|
|
|
|
}
|
2024-01-30 12:18:28 +01:00
|
|
|
}
|
|
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
.snap-lightbox-next {
|
2024-01-30 12:18:28 +01:00
|
|
|
right: 0;
|
2020-03-09 13:20:20 +01:00
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
.snap-lightbox-arrow {
|
|
|
|
|
right: 2%;
|
|
|
|
|
transform: rotate(-45deg);
|
|
|
|
|
-webkit-transform: rotate(-45deg);
|
|
|
|
|
}
|
2020-03-09 13:20:20 +01:00
|
|
|
}
|
|
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
/* The Close Button */
|
|
|
|
|
.snap-close {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
2024-01-30 12:18:28 +01:00
|
|
|
position: absolute;
|
2024-01-30 22:47:35 +01:00
|
|
|
top: 15px;
|
|
|
|
|
right: 15px;
|
|
|
|
|
height: 50px;
|
|
|
|
|
width: 50px;
|
2024-01-30 12:18:28 +01:00
|
|
|
color: white;
|
2024-01-30 22:47:35 +01:00
|
|
|
font-size: 50px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
z-index: 900;
|
2020-03-09 13:20:20 +01:00
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
&:hover,
|
|
|
|
|
&:focus {
|
|
|
|
|
color: #999;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
2020-03-09 13:20:20 +01:00
|
|
|
}
|
|
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
@media screen and (max-width: 767px) {
|
|
|
|
|
.snap-lightbox-inner {
|
|
|
|
|
max-width: 80%;
|
|
|
|
|
}
|
2020-03-09 13:20:20 +01:00
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
.snap-lightbox-prev,
|
|
|
|
|
.snap-lightbox-next {
|
|
|
|
|
width: 10%;
|
|
|
|
|
}
|
2020-03-09 13:20:20 +01:00
|
|
|
|
2024-01-30 22:47:35 +01:00
|
|
|
.snap-lightbox-close-button {
|
|
|
|
|
width: 10%;
|
|
|
|
|
height: calc(10vw);
|
|
|
|
|
/* ~10% width */
|
|
|
|
|
}
|
2019-10-20 22:27:27 +02:00
|
|
|
}
|