add animation, stop automatic slideshow when interacted with

This commit is contained in:
2024-02-01 23:52:53 +01:00
parent 132828389b
commit 8c1546ef7f
3 changed files with 22 additions and 2 deletions

View File

@@ -30,13 +30,28 @@ $gap: var(--gap);
}
.snap-slideshow {
// Hide all contained images except the first
.snap-image:not(:first-child) {
display: none;
}
}
// Animation
.snap-slideshow .snap-image,
.snap-lightbox .snap-lightbox-inner {
animation: 1s fade;
@keyframes fade {
from {
opacity: .4
}
to {
opacity: 1
}
}
}
.snap-lightbox {
/** Default lightbox to hidden */
display: none;
@@ -180,6 +195,7 @@ $gap: var(--gap);
// Position arrows for left/right
.snap-prev {
left: 0;
.snap-lightbox & span {
left: 0.5%;
}
@@ -187,6 +203,7 @@ $gap: var(--gap);
.snap-next {
right: 0;
.snap-lightbox & span {
right: 0.5%;
}