Browse code

Initial commit

Benjamin Roth authored on16/03/2023 20:22:35
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,81 @@
1
+<?php
2
+if (TL_MODE == 'FE') {
3
+    $GLOBALS['TL_CSS'][] = 'files/base/layout/css/elements/custom-elements/ce_rsce_boxtitlesubtitle.min.css|static';
4
+}
5
+?>
6
+
7
+
8
+<div <?php echo $this->cssID; ?> class="content--element <?php echo $this->class; ?>">
9
+    <div class="ce--inner container">
10
+        <?php if ($this->headline || $this->subline || $this->topline) : ?>
11
+        <div class="ce--headline"
12
+             data-aos="<?php if ($this->animation_type) : ?><?php echo $this->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>">
13
+            <?php if ($this->topline) : ?>
14
+                <span class="ce--topline"><?php echo $this->topline; ?></span>
15
+            <?php endif; ?>
16
+            <?php if ($this->headline) : ?>
17
+            <<?php echo($this->hl); ?>>
18
+            <?php echo($this->headline); ?>
19
+        </<?php echo($this->hl); ?>>
20
+    <?php endif; ?>
21
+        <?php if ($this->subline) : ?>
22
+            <span class="ce--subline"><?php echo $this->subline; ?></span>
23
+        <?php endif; ?>
24
+    </div>
25
+    <?php endif; ?>
26
+    <div class="ce--boxtitlesubtitle ">
27
+        <div class="row justify-content-center">
28
+            <?php foreach ($this->box as $b) : ?>
29
+                <div class="col-12 col-md-4">
30
+                    <div class="boxtitlesubtitle">
31
+                        <?php if (!$b->images) : ?>
32
+                            <a class="bts--url" href="<?php echo $b->url; ?>"></a>
33
+                        <?php endif; ?>
34
+                        <div class="bts--image"
35
+                             data-aos="<?php if ($b->animation_type != "") : ?><?php echo $b->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>">
36
+                            <?php if ($b->images) : $rand = rand(1, 100); ?>
37
+                                <script>
38
+                                    $(function () {
39
+                                        $(".group_<?php echo $rand; ?>").colorbox({
40
+                                            rel: "group_<?php echo $rand; ?>",
41
+                                            current: "Bild {current} von {total}",
42
+                                            maxWidth: '95%',
43
+                                            maxHeight: '95%'
44
+                                        });
45
+                                    });
46
+                                </script>
47
+                                <a href="<?= Image::get(FilesModel::findByUuid($b->images[0])->path, null, null, null); ?>"
48
+                                   class="main--image group_<?php echo $rand; ?> bts-cboxElement cboxElement">
49
+                                    <img class="lazy"
50
+                                         data-src="<?= Image::get(FilesModel::findByUuid($b->image)->path, null, null, null); ?>">
51
+                                </a>
52
+                                <div class="invisible">
53
+                                    <?php foreach ($b->images as $i => $img) : ?>
54
+                                        <?php if ($i > 0) : ?>
55
+                                            <a href="<?= Image::get(FilesModel::findByUuid($img)->path, null, null, null); ?>"
56
+                                               class="group_<?php echo $rand; ?> bts-cboxElement cboxElement"></a>
57
+                                        <?php endif; ?>
58
+                                    <?php endforeach; ?>
59
+                                </div>
60
+                            <?php else : ?>
61
+                            <img class="lazy"
62
+                                 data-src="<?= Image::get(FilesModel::findByUuid($b->image)->path, null, null, null); ?>">
63
+                            <?php endif; ?>
64
+                        </div>
65
+                        <div class="bts--content">
66
+                            <div class="bts--headline"
67
+                                 data-aos="<?php if ($b->animation_type != "") : ?><?php echo $b->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>">
68
+                                <?php echo $b->title; ?>
69
+                            </div>
70
+                            <div class="bts--subline"
71
+                                 data-aos="<?php if ($b->animation_type != "") : ?><?php echo $b->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>">
72
+                                <?php echo $b->subtitle; ?>
73
+                            </div>
74
+                        </div>
75
+                    </div>
76
+                </div>
77
+            <?php endforeach; ?>
78
+        </div>
79
+    </div>
80
+</div>
81
+</div>
0 82
\ No newline at end of file