From cda9a93066136e25431c8712350b9127725ae3fe Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Mon, 11 Jan 2021 12:41:49 +0100 Subject: [PATCH] wait #4180 @0.75 --- js/libs/fluidbook/fluidbook.links.js | 8 ++-- .../slideshow/fluidbook.slideshow.dummy.js | 14 ++---- style/slideshow/dummy.less | 48 ++++++++++++++++++- 3 files changed, 56 insertions(+), 14 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.links.js b/js/libs/fluidbook/fluidbook.links.js index f1517f2c..e61140b4 100644 --- a/js/libs/fluidbook/fluidbook.links.js +++ b/js/libs/fluidbook/fluidbook.links.js @@ -836,12 +836,12 @@ FluidbookLinks.prototype = { initInlineSlideshows: function () { var $this = this; - if (this.fluidbook.slideshow) { - this.fluidbook.slideshow.clear(); - } if (this.fluidbook.slideshow !== undefined) { - $("#links .fb-slideshow").each(function () { + if (this.fluidbook.slideshow) { + this.fluidbook.slideshow.clear(); + } + $("#links .fb-slideshow, #currentDoublePage .fb-slideshow").each(function () { $this.fluidbook.slideshow.initInlineSlideshow(this); }); this.fluidbook.slideshow.resizeInline(); diff --git a/js/libs/fluidbook/slideshow/fluidbook.slideshow.dummy.js b/js/libs/fluidbook/slideshow/fluidbook.slideshow.dummy.js index 11eff42e..9c279496 100644 --- a/js/libs/fluidbook/slideshow/fluidbook.slideshow.dummy.js +++ b/js/libs/fluidbook/slideshow/fluidbook.slideshow.dummy.js @@ -14,22 +14,18 @@ FluidbookDummySlideshow.prototype = { if ($(s).data('init') === true) { return; } + var holder=$(s).find('.splide__list') var $this = this; s.data('init', true); - var dir = 'data/links/' + $(s).data('dir') + '/'; - $.each($(s).data('images'), function (k, i) { - var h = '
'; - s.append(h); - }); // Move first to end - s.append(s.find('.slide:eq(0)')); + holder.append(holder.find('.fb-slideshow-slide:eq(0)')); this.intervals.push(setInterval(function () { - var current = s.find('.slide.show').eq(0); - var next = $(current).nextAll('.slide:not(.show):eq(0)'); + var current = holder.find('.fb-slideshow-slide.show').eq(0); + var next = $(current).nextAll('.fb-slideshow-slide:not(.show):eq(0)'); if ($(next).length === 0) { - next = s.find('.slide:eq(0)'); + next = holder.find('.fb-slideshow-slide:eq(0)'); } $(next).css({display: 'block', zIndex: 2}); diff --git a/style/slideshow/dummy.less b/style/slideshow/dummy.less index a90c2617..0525e138 100644 --- a/style/slideshow/dummy.less +++ b/style/slideshow/dummy.less @@ -1,11 +1,57 @@ @import "../variables"; -.inlineslideshow { +.fb-slideshow-wrapper.dummy { width: 100%; height: 100%; max-width: 100%; max-height: 100%; overflow: hidden; + pointer-events: none; + padding-bottom: 0; + + .fb-slideshow { + padding: 0; + display: block; + + &.splide { + visibility: visible; + } + + img { + width: 100%; + object-fit: cover; + } + } + + .fb-slideshow-slide.splide__slide { + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; + z-index: 0; + + &.show { + transition: opacity @inlineslideshow-transition-time; + z-index: 1; + opacity: 1; + } + } + + .splide__track, .splide__list, .fb-slideshow { + width: 100%; + height: 100%; + } + + .splide__list { + margin: 0 !important; + } + + .fb-slideshow-thumbnails { + display: none; + } .slide { display: none; -- 2.39.5