Browse code

Update remote

Benjamin Roth authored on20/03/2023 16:17:59
Showing1 changed files
... ...
@@ -32,10 +32,10 @@
32 32
                       const swiper_<?php echo $this->id; ?> = new Swiper('.swiper.linkboxes-slider_<?php echo $this->id; ?>', {
33 33
                         direction: 'horizontal',
34 34
                         loop: true,
35
-                        preloadImages: false,
36
-                        lazy: {
35
+                        preloadImages: true,
36
+                        /*lazy: {
37 37
                           loadPrevNext: true,
38
-                        },
38
+                        },*/
39 39
                         spaceBetween:30,
40 40
                         centeredSlides: false,
41 41
                         slidesPerView: 3,
Browse code

Update

Benjamin Roth authored on17/03/2023 09:52:56
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,79 @@
1
+<?php $GLOBALS['TL_CSS'][] = 'files/base/layout/css/elements/custom-elements/ce_rsce_linkboxen.min.css|static';?>
2
+<!-- indexer::stop -->
3
+<div class="<?= $this->class ?> ce_rsce_linkboxen block"<?= $this->cssID ?><?php if ($this->style): ?> style="<?= $this->style ?>"<?php endif; ?>>
4
+
5
+    <div class="ce--inner container">
6
+
7
+        <?php $this->block('headline'); ?>
8
+            <?php if ($this->headline): ?>
9
+                <div class="ce--headline animate__animated animate__fadeInUp">
10
+                    <<?= $this->hl ?>><?= $this->headline ?></<?= $this->hl ?>>
11
+                </div>
12
+            <?php endif; ?>
13
+        <?php $this->endblock(); ?>
14
+
15
+        <?php $this->block('content'); ?>
16
+
17
+            <?php if (empty($this->articles)): ?>
18
+                <p class="empty"><?= $this->empty ?></p>
19
+            <?php else: ?>
20
+                <div class="swiper pb-0 linkboxes-slider_<?= $this->id; ?>" data-aos="animate__fadeInUp">
21
+                    <div class="swiper-wrapper">
22
+                        <?= implode('', $this->articles) ?>
23
+                    </div>
24
+                </div>
25
+                <div class="linkboxes-slider_<?= $this->id; ?> swiper-button-prev"></div>
26
+                <div class="linkboxes-slider_<?= $this->id; ?> swiper-button-next"></div>
27
+
28
+                <script>
29
+                  window.addEventListener('load', function () {
30
+                    if ($('.swiper.linkboxes-slider_<?= $this->id;?>').length) {
31
+
32
+                      const swiper_<?php echo $this->id; ?> = new Swiper('.swiper.linkboxes-slider_<?php echo $this->id; ?>', {
33
+                        direction: 'horizontal',
34
+                        loop: true,
35
+                        preloadImages: false,
36
+                        lazy: {
37
+                          loadPrevNext: true,
38
+                        },
39
+                        spaceBetween:30,
40
+                        centeredSlides: false,
41
+                        slidesPerView: 3,
42
+                        speed: 1500,
43
+                        effect: 'slide',
44
+
45
+                        fadeEffect: {
46
+                          crossFade: true
47
+                        },
48
+
49
+                        navigation: {
50
+                          nextEl: '.linkboxes-slider_<?= $this->id;?>.swiper-button-next',
51
+                          prevEl: '.linkboxes-slider_<?= $this->id;?>.swiper-button-prev',
52
+                        },
53
+
54
+                        breakpoints: {
55
+                          320: {
56
+                            slidesPerView: 1,
57
+                          },
58
+                          480: {
59
+                            slidesPerView: 2,
60
+                          },
61
+                          768: {
62
+                            slidesPerView: 3,
63
+                          },
64
+                          992: {
65
+                            slidesPerView: 3,
66
+                          }
67
+                        }
68
+                      });
69
+                    }
70
+                  }, {passive: true})
71
+                </script>
72
+            <?php endif; ?>
73
+
74
+        <?php $this->endblock(); ?>
75
+
76
+    </div>
77
+
78
+</div>
79
+<!-- indexer::continue -->