Browse code

Refactor and rewrite as contao bundle

Benjamin Roth authored on04/11/2022 22:32:32
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,41 @@
1
+<?php $this->block('content'); ?>
2
+
3
+<div class="<?= $this->class ?> swiper-holder block"<?= $this->cssID ?><?php if ($this->style): ?> style="<?= $this->style ?>"<?php endif; ?>>
4
+
5
+  <?php if ($this->headline): ?>
6
+  <<?= $this->hl ?>><?= $this->headline ?></<?= $this->hl ?>>
7
+  <?php endif; ?>
8
+
9
+<?php if ($this->eSM_slider_arrows && $this->eSM_slider_arrows == 'outside'): ?>
10
+  <div class="swiper-button-next"></div>
11
+  <div class="swiper-button-prev"></div>
12
+<?php endif; ?>
13
+
14
+  <div class="swiper-container slide-container_<?= $this->id ?>">
15
+    <?php if ($this->eSM_addImage && ($this->src || count($this->videoFiles))): ?>
16
+      <div class="swiper-background"<?php if ($this->src): ?>style="<?= $this->backgroundStyle ?>"<?php endif; ?>>
17
+        <?php if ($this->videoFiles): ?>
18
+          <video class="no-mejs" autoplay loop muted>
19
+            <?php foreach ($this->videoFiles as $video): ?>
20
+              <source src="<?php echo TL_FILES_URL . $video->path ?>" type="video/<?php echo $video->extension ?>">
21
+            <?php endforeach ?>
22
+          </video>
23
+        <?php endif; ?>
24
+      </div>
25
+      <?php if ($this->src && $this->minHeight): ?>
26
+        <style>.slide-container_<?= $this->id ?>:before { content: ""; display: block; padding-top: <?= $this->minHeight ?>; float: left; }</style>
27
+      <?php endif; ?>
28
+    <?php endif; ?>
29
+
30
+    <?php if ($this->eSM_slider_arrows && $this->eSM_slider_arrows != 'outside'): ?>
31
+      <div class="swiper-button-next"></div>
32
+      <div class="swiper-button-prev"></div>
33
+    <?php endif; ?>
34
+
35
+    <?php if ($this->eSM_slider_pagination): ?>
36
+     <div class="swiper-pagination"></div>
37
+    <?php endif; ?>
38
+
39
+    <div class="swiper-wrapper" data-config="<?= $this->config ?>"<?php if ($this->breakpoints): ?> data-breakpoints='<?= $this->breakpoints ?>'<?php endif; ?>>
40
+
41
+<?php $this->endblock(); ?>