Simple carousel on eink.
authorRadek Czajka <rczajka@rczajka.pl>
Mon, 24 May 2021 09:13:53 +0000 (11:13 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Mon, 24 May 2021 09:13:53 +0000 (11:13 +0200)
src/social/templates/social/carousel.html
src/wolnelektury/static/js/base.js

index a76a435..4a1f88c 100644 (file)
@@ -1,6 +1,6 @@
 {% spaceless %}
 
-<div class="cycle-slideshow carousel carousel-{{ carousel.placement }}"
+<div class="carousel carousel-{{ carousel.placement }}"
      data-cycle-slides="section"
      data-cycle-pause-on-hover="true"
      >
index 8502d62..7d311fc 100644 (file)
             $("iframe", this).attr("src", $("iframe", this).attr('data-src'));
         });
 
-        $(".media-eink .carousel").cycle({fx: "none"});
+        $(".carousel").each(function() {
+            opts = {};
+            if ($('html').hasClass('media-eink')) {
+                opts.fx = 'none'
+            }
+            $(this).cycle(opts);
+        });
 
 
         (function() {