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,94 @@
1
+<?php
2
+if (TL_MODE == 'FE') {
3
+    $GLOBALS['TL_CSS'][] = 'files/base/layout/css/elements/custom-elements/ce_rsce_numberboxes.min.css|static';
4
+}
5
+
6
+
7
+if (!isset($this->size_bg)) {
8
+    $this->{"size_bg"} = "";
9
+}
10
+?>
11
+
12
+
13
+<div <?php echo $this->cssID; ?>
14
+        class="content--element <?php echo $this->class; ?> <?php if ($this->bg_image): ?>lazy<?php endif; ?>"
15
+        <?php if ($this->bg_image): ?>data-bg="<?= Image::get(FilesModel::findByUuid($this->bg_image)->path, $this->size_bg[0], $this->size_bg[1], $this->size_bg[2]); ?>" style="background-position: center center; background-repeat: no-repeat; background-size: cover;"<?php endif; ?>
16
+>
17
+    <div class="ce--inner container">
18
+        <?php if ($this->headline || $this->subline || $this->topline) : ?>
19
+        <div class="ce--headline"
20
+             data-aos="<?php if ($this->animation_type) : ?><?php echo $this->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>">
21
+            <?php if ($this->topline) : ?>
22
+                <span class="ce--topline"><?php echo $this->topline; ?></span>
23
+            <?php endif; ?>
24
+            <?php if ($this->headline) : ?>
25
+            <<?php echo($this->hl); ?>>
26
+            <?php echo($this->headline); ?>
27
+        </<?php echo($this->hl); ?>>
28
+    <?php endif; ?>
29
+        <?php if ($this->subline) : ?>
30
+            <span class="ce--subline"
31
+                  data-aos="<?php if ($this->animation_type) : ?><?php echo $this->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>"><?php echo $this->subline; ?></span>
32
+        <?php endif; ?>
33
+    </div>
34
+    <?php endif; ?>
35
+    <div class="ce--number-boxes">
36
+        <div class="row g-3 gy-md-5 align-items-center">
37
+            <?php foreach ($this->boxes as $box) : ?>
38
+            <div class="col-12 col-md-6 col-lg-3">
39
+
40
+                <?php
41
+                if (!isset($box->size)) {
42
+                    $box->{"size"} = "";
43
+                }
44
+                ?>
45
+
46
+                <div class="number-box--wrapper lazy <?php if ($box->image): ?>with-image<?php endif; ?>"
47
+                     data-aos="<?php if ($box->animation_type) : ?><?php echo $box->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>"
48
+                     data-bg="<?= Image::get(FilesModel::findByUuid($box->image)->path, $box->size[0], $box->size[1], $box->size[2]); ?>">
49
+                    <?php if ($box->headline) : ?>
50
+                    <div class="number-box--title">
51
+                        <?php if (!$box->onlystyle) : ?>
52
+                        <<?php echo $box->headline_type; ?>>
53
+                        <?php echo $box->headline; ?>
54
+                    </<?php echo $box->headline_type; ?>>
55
+                <?php else : ?>
56
+                    <span class="<?php echo $box->headline_type; ?>"><?php echo $box->headline; ?></span>
57
+                <?php endif; ?>
58
+                </div>
59
+            <?php endif; ?>
60
+                <div class="number-box--content">
61
+                    <div class=" <?php if (($box->text_left_1 || $box->text_left_2) && ($box->text_right_1 || $box->text_right_2)): ?>row align-items-center<?php endif;?>">
62
+                        <?php if ($box->text_left_1 || $box->text_left_2): ?>
63
+                        <div class="<?php if ($box->text_right_1 != "" || $box->text_right_2 != ""): ?>col-6<?php endif; ?> left--col">
64
+                            <div class="left-col--inner">
65
+                                <?php if ($box->text_left_1 != ""): ?>
66
+                                    <span class="count"><?php echo $box->text_left_1; ?></span>
67
+                                <?php endif; ?>
68
+                                <?php if ($box->text_left_2 != ""): ?>
69
+                                    <span><?php echo $box->text_left_2; ?></span>
70
+                                <?php endif; ?>
71
+                            </div>
72
+                        </div>
73
+                            <?php endif; ?>
74
+                        <?php if ($box->text_right_1 || $box->text_right_2): ?>
75
+                            <div class="<?php if ($box->text_left_1 != "" || $box->text_left_2 != ""): ?>col-6<?php endif; ?> right--col">
76
+                                <div class="right-col--inner <?php if ($box->text_left_1 != "" || $box->text_left_2 != ""): ?>with-left-col<?php endif; ?>">
77
+                                    <?php if ($box->text_right_1 != ""): ?>
78
+                                        <?php echo $box->text_right_1; ?>
79
+                                    <?php endif; ?>
80
+                                    <?php if ($box->text_right_2 != ""): ?>
81
+                                        <?php echo $box->text_right_2; ?>
82
+                                    <?php endif; ?>
83
+                                </div>
84
+                            </div>
85
+                        <?php endif; ?>
86
+                    </div>
87
+                </div>
88
+            </div>
89
+        </div>
90
+        <?php endforeach; ?>
91
+    </div>
92
+</div>
93
+</div>
94
+</div>
0 95
\ No newline at end of file