Merge remote-tracking branch 'origin/main'

# Conflicts:
#	app/static/structure.css
This commit is contained in:
rimu 2024-07-05 16:14:41 +08:00
commit 7a876ed372
3 changed files with 12 additions and 36 deletions

View file

@ -86,6 +86,9 @@ function setupLightboxGallery() {
function setupLightboxTeaser() {
function popStateListener(event) {
baguetteBox.hide();
}
baguetteBox.run('.post_teaser', {
fullScreen: false,
noScrollbars: true,
@ -93,18 +96,7 @@ function setupLightboxTeaser() {
preload: 3,
ignoreClass: 'preview_image',
afterShow: function() {
var backButtonPrevented = false;
history.pushState(null, document.title, location.href);
function popStateListener(event) {
if (backButtonPrevented === false){
history.pushState(null, document.title, location.href);
baguetteBox.hide();
backButtonPrevented = true;
} else {
window.removeEventListener('popstate', popStateListener);
history.back();
}
}
window.history.pushState('#lightbox', document.title, document.location+'#lightbox');
window.addEventListener('popstate', popStateListener);
function baguetteBoxClickImg(event) {
@ -122,6 +114,12 @@ function setupLightboxTeaser() {
el.addEventListener('click', baguetteBoxClickImg);
}
},
afterHide: function() {
if (window.history.state === '#lightbox') {
window.history.back();
window.removeEventListener('popstate', popStateListener);
}
},
});
}

View file

@ -1428,17 +1428,7 @@ h1 .warning_badge {
}
#baguetteBox-overlay {
overflow: scroll !important;
}
#baguetteBox-overlay .full-image {
height: auto !important;
}
#baguetteBox-overlay .full-image figure {
display: inline-block !important;
}
#baguetteBox-slider {
height: auto !important;
overflow: scroll;
}
/*# sourceMappingURL=structure.css.map */

View file

@ -1106,17 +1106,5 @@ h1 .warning_badge {
}
#baguetteBox-overlay {
overflow: scroll !important;
.full-image {
height: auto !important;
//min-height: 100%;
figure {
display: inline-block !important;
}
}
}
#baguetteBox-slider {
height: auto !important;
//min-height: 100%;
overflow: scroll;
}