mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
bbox: tweak end-of-gallery animation
This commit is contained in:
parent
4e7455268a
commit
8b4cf022f2
|
@ -699,18 +699,12 @@ window.baguetteBox = (function () {
|
|||
showOverlay(index);
|
||||
return true;
|
||||
}
|
||||
if (index < 0) {
|
||||
if (options.animation)
|
||||
bounceAnimation('left');
|
||||
|
||||
return false;
|
||||
}
|
||||
if (index >= imagesElements.length) {
|
||||
if (options.animation)
|
||||
bounceAnimation('right');
|
||||
if (index < 0)
|
||||
return bounceAnimation('left');
|
||||
|
||||
return false;
|
||||
}
|
||||
if (index >= imagesElements.length)
|
||||
return bounceAnimation('right');
|
||||
|
||||
var v = vid();
|
||||
if (v) {
|
||||
|
@ -893,10 +887,11 @@ window.baguetteBox = (function () {
|
|||
}
|
||||
|
||||
function bounceAnimation(direction) {
|
||||
slider.className = 'bounce-from-' + direction;
|
||||
slider.className = options.animation == 'slideIn' ? 'bounce-from-' + direction : 'eog';
|
||||
setTimeout(function () {
|
||||
slider.className = '';
|
||||
}, 400);
|
||||
}, 300);
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateOffset() {
|
||||
|
|
|
@ -1909,10 +1909,13 @@ html.y #bbox-overlay figcaption a {
|
|||
transition: left .2s ease, transform .2s ease;
|
||||
}
|
||||
.bounce-from-right {
|
||||
animation: bounceFromRight .4s ease-out;
|
||||
animation: bounceFromRight .3s ease-out;
|
||||
}
|
||||
.bounce-from-left {
|
||||
animation: bounceFromLeft .4s ease-out;
|
||||
animation: bounceFromLeft .3s ease-out;
|
||||
}
|
||||
.eog {
|
||||
animation: eog .2s;
|
||||
}
|
||||
@keyframes bounceFromRight {
|
||||
0% {margin-left: 0}
|
||||
|
@ -1924,6 +1927,9 @@ html.y #bbox-overlay figcaption a {
|
|||
50% {margin-left: 30px}
|
||||
100% {margin-left: 0}
|
||||
}
|
||||
@keyframes eog {
|
||||
0% {filter: brightness(1.5)}
|
||||
}
|
||||
#bbox-next,
|
||||
#bbox-prev {
|
||||
top: 50%;
|
||||
|
|
Loading…
Reference in a new issue