]> _ Git - fluidbook-html5.git/commitdiff
wait #4180 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 11 Jan 2021 11:41:49 +0000 (12:41 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 11 Jan 2021 11:41:49 +0000 (12:41 +0100)
js/libs/fluidbook/fluidbook.links.js
js/libs/fluidbook/slideshow/fluidbook.slideshow.dummy.js
style/slideshow/dummy.less

index f1517f2c9bd3ebceb8862366a5a1da1b742fc43d..e61140b462854a4a0129a43734dfbd2173cbe24c 100644 (file)
@@ -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();
index 11eff42e6a435f3168f36554593ecc61e988c8f7..9c279496f3678b3618ce1b70b7508129a8aef7aa 100644 (file)
@@ -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 = '<div class="slide" style="background-image: url(\'' + dir + i + '\');"></div>';
-            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});
index a90c26171450548a9bda38cfa32f548b30aee57f..0525e13857324b206fdaba95a2b7ffd22b3ca69f 100644 (file)
@@ -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;