1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,450 @@ |
1 |
+<?php |
|
2 |
+if (TL_MODE == 'FE') { |
|
3 |
+ $GLOBALS['TL_CSS'][] = 'files/base/layout/css/elements/custom-elements/ce_rsce_linkboxen.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) : ?> <<?php echo($this->hl); ?>> |
|
17 |
+ <?php echo($this->headline); ?> |
|
18 |
+ </<?php echo($this->hl); ?>> |
|
19 |
+ <?php endif; ?> |
|
20 |
+ <?php if ($this->subline) : ?> |
|
21 |
+ <span class="ce--subline"><?php echo $this->subline; ?></span> |
|
22 |
+ <?php endif; ?> |
|
23 |
+ </div> |
|
24 |
+ <?php endif; ?> |
|
25 |
+ <?php if ($this->boxes) : ?> |
|
26 |
+ <div class=" |
|
27 |
+ |
|
28 |
+ <?php if ($this->is_slider): ?> |
|
29 |
+ swiper pb-0 linkboxes-slider_<?= $this->id; ?> |
|
30 |
+ <?php else: ?> |
|
31 |
+ row <?= $this->row_align; ?> justify-content-center <?php if ($this->same_height): ?>same-height<?php endif; ?> |
|
32 |
+ <?php endif; ?> |
|
33 |
+" |
|
34 |
+ <?php if ($this->is_slider): ?>data-aos="<?php if ($this->animation_type) : ?><?php echo $this->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>"<?php endif; ?> |
|
35 |
+ > |
|
36 |
+ <?php if ($this->is_slider): ?> |
|
37 |
+ <div class="swiper-wrapper"> |
|
38 |
+ <?php endif; ?> |
|
39 |
+ <?php foreach ($this->boxes as $i => $box) : ?> |
|
40 |
+ |
|
41 |
+ <?php |
|
42 |
+ if (!isset($box->size)) { |
|
43 |
+ $box->{"size"} = ""; |
|
44 |
+ } |
|
45 |
+ ?> |
|
46 |
+ |
|
47 |
+ |
|
48 |
+ <div class=" |
|
49 |
+ |
|
50 |
+ <?php if ($this->is_slider): ?> |
|
51 |
+ swiper-slide |
|
52 |
+ <?php else: ?> |
|
53 |
+ <?php if ($box->column_width) : ?><?php echo $box->column_width; ?><?php else : ?>col-12 col-md-6 col-lg-4<?php endif; ?> |
|
54 |
+ <?php endif; ?> |
|
55 |
+ "> |
|
56 |
+ |
|
57 |
+ <div id="linkBox_<?php echo $this->id; ?>_<?php echo $i; ?>" |
|
58 |
+ class="link--box <?php if ($box->linkoverlay || $box->expand_longtext) : ?>with-link<?php endif; ?> <?php echo $box->box_style; ?> " |
|
59 |
+ <?php if (!$this->is_slider): ?>data-aos="<?php if ($box->animation_type) : ?><?php echo $box->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>"<?php endif; ?>> |
|
60 |
+ |
|
61 |
+ <?php if (($box->linkoverlay && ($box->alternate_background_hover || $box->alternate_textcolor_hover)) || $box->alternate_hoverbackground || $box->alternate_hovertext) : ?> |
|
62 |
+ <style> |
|
63 |
+ <?php if ($box->alternate_background_hover) : ?> |
|
64 |
+ |
|
65 |
+ <?php |
|
66 |
+ $backgroundColor = $box->alternate_background_hover; |
|
67 |
+ $backgroundColor = str_replace(")", ")",$backgroundColor); |
|
68 |
+ $backgroundColor = str_replace("(", "(",$backgroundColor); |
|
69 |
+ $backgroundColor = str_replace("(;", "(",$backgroundColor); |
|
70 |
+ $backgroundColor = str_replace("#", "#",$backgroundColor); |
|
71 |
+ $backgroundColor = str_replace(");", ")",$backgroundColor); |
|
72 |
+ ?> |
|
73 |
+ |
|
74 |
+ |
|
75 |
+ #linkBox_<?php echo $this->id; ?>_<?php echo $i; ?>:hover .box-lower--wrapper { |
|
76 |
+ background-color: <?= $backgroundColor?> !important; |
|
77 |
+ } |
|
78 |
+ |
|
79 |
+ <?php endif;?> |
|
80 |
+ |
|
81 |
+ <?php if ($box->alternate_textcolor_hover) : ?> |
|
82 |
+ <?php |
|
83 |
+ $textColor = $box->alternate_textcolor_hover; |
|
84 |
+ $textColor = str_replace(")", ")",$textColor); |
|
85 |
+ $textColor = str_replace("(", "(",$textColor); |
|
86 |
+ $textColor = str_replace("(;", "(",$textColor); |
|
87 |
+ $textColor = str_replace("#", "#",$textColor); |
|
88 |
+ $textColor = str_replace(");", ")",$textColor); |
|
89 |
+ ?> |
|
90 |
+ |
|
91 |
+ |
|
92 |
+ #linkBox_<?php echo $this->id; ?>_<?php echo $i; ?>:hover .box-lower--wrapper, |
|
93 |
+ #linkBox_<?php echo $this->id; ?>_<?php echo $i; ?>:hover .box-lower--wrapper .box--lower:not(.as-box) > .headline--wrapper > .box--headline, |
|
94 |
+ #linkBox_<?php echo $this->id; ?>_<?php echo $i; ?>:hover .box-lower--wrapper .box--lower:not(.as-box) > .headline--wrapper > .box--subline { |
|
95 |
+ color: <?= $textColor;?> !important; |
|
96 |
+ } |
|
97 |
+ |
|
98 |
+ <?php endif;?> |
|
99 |
+ |
|
100 |
+ |
|
101 |
+ <?php if ($box->alternate_hoverbackground) : ?> |
|
102 |
+ |
|
103 |
+ <?php |
|
104 |
+ $backgroundColor = $box->alternate_hoverbackground; |
|
105 |
+ $backgroundColor = str_replace(")", ")",$backgroundColor); |
|
106 |
+ $backgroundColor = str_replace("(", "(",$backgroundColor); |
|
107 |
+ $backgroundColor = str_replace("(;", "(",$backgroundColor); |
|
108 |
+ $backgroundColor = str_replace("#", "#",$backgroundColor); |
|
109 |
+ $backgroundColor = str_replace(");", ")",$backgroundColor); |
|
110 |
+ ?> |
|
111 |
+ |
|
112 |
+ |
|
113 |
+ #linkBox_<?php echo $this->id; ?>_<?php echo $i; ?>:hover .box--upper .hover-text { |
|
114 |
+ background-color: <?= $backgroundColor?> !important; |
|
115 |
+ } |
|
116 |
+ |
|
117 |
+ <?php endif;?> |
|
118 |
+ |
|
119 |
+ <?php if ($box->alternate_hovertext) : ?> |
|
120 |
+ <?php |
|
121 |
+ $textColor = $box->alternate_hovertext; |
|
122 |
+ $textColor = str_replace(")", ")",$textColor); |
|
123 |
+ $textColor = str_replace("(", "(",$textColor); |
|
124 |
+ $textColor = str_replace("(;", "(",$textColor); |
|
125 |
+ $textColor = str_replace("#", "#",$textColor); |
|
126 |
+ $textColor = str_replace(");", ")",$textColor); |
|
127 |
+ ?> |
|
128 |
+ |
|
129 |
+ |
|
130 |
+ #linkBox_<?php echo $this->id; ?>_<?php echo $i; ?>:hover .box--upper .hover-text { |
|
131 |
+ color: <?= $textColor;?> !important; |
|
132 |
+ } |
|
133 |
+ |
|
134 |
+ <?php endif;?> |
|
135 |
+ |
|
136 |
+ </style> |
|
137 |
+ <?php endif; ?> |
|
138 |
+ |
|
139 |
+ |
|
140 |
+ <?php if ($box->linkoverlay && ($box->buttons[0]->link_url)) : ?> |
|
141 |
+ <a <?php if ($box->buttons[0]->new_tab): ?>target="_blank"<?php endif; ?> |
|
142 |
+ href="<?php echo $box->buttons[0]->link_url; ?>"></a> |
|
143 |
+ <?php elseif ($box->linkoverlay && ($box->modal_longtext || $box->modal_image)) : ?> |
|
144 |
+ <span data-bs-toggle="modal" |
|
145 |
+ data-bs-target="#linkBoxModal_<?php echo $this->id; ?>_<?php echo $i; ?>"></span> |
|
146 |
+ <?php endif; ?> |
|
147 |
+ <?php if ($box->image) : ?><?php |
|
148 |
+ $filename = FilesModel::findByUuid($box->image)->path; |
|
149 |
+ $ext = pathinfo($filename, PATHINFO_EXTENSION); |
|
150 |
+ ?> |
|
151 |
+ <div class="box--upper"> |
|
152 |
+ <?php if ($ext != "mp4" && !$box->not_as_bg) : ?> |
|
153 |
+ <div class="image--holder <?php if (!$this->is_slider): ?>lazy<?php endif; ?> <?php if (!$box->longtext && !$box->text && !$box->expand_image && !$box->expand_image && !$box->modal_longtext && !$box->modal_image) : ?>rounded<?php endif; ?>" |
|
154 |
+ style=" |
|
155 |
+ <?php if ($this->is_slider): ?> |
|
156 |
+ background-image:url(<?= Image::get(FilesModel::findByUuid($box->image)->path, $this->size[0], $this->size[1], $this->size[2]); ?>); |
|
157 |
+ <?php endif; ?> |
|
158 |
+ background-size: cover; background-repeat: no-repeat; background-position: center center; <?php if ($this->imagearea_height): ?>height: <?= $this->imagearea_height; ?><?php endif; ?>" |
|
159 |
+ <?php if (!$this->is_slider): ?> |
|
160 |
+ data-bg="<?= Image::get(FilesModel::findByUuid($box->image)->path, $box->size[0], $box->size[1], $box->size[2]); ?>" |
|
161 |
+ <?php endif; ?> |
|
162 |
+ ></div> |
|
163 |
+ <?php endif; ?> |
|
164 |
+ <?php if ($ext != "mp4" && $box->not_as_bg) : ?> |
|
165 |
+ <div style="height: auto; text-align: center;" |
|
166 |
+ class="image--holder <?php if (!$box->longtext && !$box->text && !$box->expand_image && !$box->expand_image && !$box->modal_longtext && !$box->modal_image) : ?>rounded<?php endif; ?>"> |
|
167 |
+ <img class="<?php if ($this->is_slider): ?>swiper-<?php endif; ?>lazy" |
|
168 |
+ data-src="<?= Image::get(FilesModel::findByUuid($box->image)->path, $box->size[0], $box->size[1], $box->size[2]); ?>"> |
|
169 |
+ </div> |
|
170 |
+ <?php endif; ?> |
|
171 |
+ <?php if ($ext == "mp4") : ?> |
|
172 |
+ <div class="image--holder is--video <?php if (!$box->longtext && !$box->text && !$box->expand_image && !$box->expand_image && !$box->modal_longtext && !$box->modal_image) : ?>rounded<?php endif; ?>"> |
|
173 |
+ <video autoplay muted controls playsinline> |
|
174 |
+ <source type="video/mp4" src="{{file::<?= $box->image ?>}}"> |
|
175 |
+ </video> |
|
176 |
+ </div> |
|
177 |
+ <?php endif; ?> |
|
178 |
+ |
|
179 |
+ |
|
180 |
+ <?php if ($box->image_headline_background): ?> |
|
181 |
+ <span style="background-color: <?= $box->image_headline_background; ?>" |
|
182 |
+ class="design-element"></span> |
|
183 |
+ <?php endif; ?> |
|
184 |
+ |
|
185 |
+ <?php if ($box->image_headline): ?> |
|
186 |
+ <div class="box-upper--image-text"> |
|
187 |
+ <span><?= $box->image_headline; ?></span> |
|
188 |
+ </div> |
|
189 |
+ <?php endif; ?> |
|
190 |
+ |
|
191 |
+ |
|
192 |
+ <?php if ($box->imagetext) : ?> |
|
193 |
+ <div class="hover-text"> |
|
194 |
+ <div class="hover-text--inner"> |
|
195 |
+ <?= $box->imagetext; ?> |
|
196 |
+ </div> |
|
197 |
+ </div> |
|
198 |
+ <?php endif; ?> |
|
199 |
+ </div> |
|
200 |
+ <?php endif; ?> |
|
201 |
+ <?php if ($box->longtext || $box->text || $box->expand_image || $box->expand_image || $box->modal_longtext || $box->modal_image) : ?> |
|
202 |
+ <div class="box-lower--wrapper <?php echo $box->textalign; ?>" |
|
203 |
+ style="<?php if ($box->alternate_textcolor) : ?>color:<?php echo $box->alternate_textcolor; ?>;<?php endif; ?><?php if ($box->alternate_background) : ?>background-color:<?php echo $box->alternate_background; ?><?php endif; ?>"> |
|
204 |
+ <?php if ($box->text || $box->subline) : ?> |
|
205 |
+ <div class="box--lower |
|
206 |
+ |
|
207 |
+ <?php if ($box->alternate_background == "transparent") : ?>px-0<?php endif; ?> |
|
208 |
+ <?php if ($box->as_box) : ?>as-box<?php endif; ?> <?php if ($box->linkoverlay && !$box->hide_arrow) : ?>with-url<?php endif; ?>" |
|
209 |
+ style=" |
|
210 |
+ <?php if ($box->shadowbox_background && $box->as_box) : ?>background-color:<?php echo $box->shadowbox_background; ?><?php endif; ?> |
|
211 |
+ "> |
|
212 |
+ <div class="headline--wrapper"> |
|
213 |
+ |
|
214 |
+ <?php if ($box->topline) : ?> |
|
215 |
+ <span class="ce--topline"><?php echo $box->topline; ?></span> |
|
216 |
+ <?php endif; ?> |
|
217 |
+ |
|
218 |
+ <?php if ($box->text) : ?> |
|
219 |
+ <span class="box--headline" |
|
220 |
+ style="<?php if ($box->alternate_textcolor) : ?>color:<?php echo $box->alternate_textcolor; ?>;<?php endif; ?>"> |
|
221 |
+ <?php echo $box->text; ?> |
|
222 |
+ </span> |
|
223 |
+ <?php endif; ?> |
|
224 |
+ <?php if ($box->subline) : ?> |
|
225 |
+ <span class="ce--subline box--subline" |
|
226 |
+ style="<?php if ($box->alternate_textcolor) : ?>color:<?php echo $box->alternate_textcolor; ?>;<?php endif; ?>"> |
|
227 |
+ <?php echo $box->subline; ?> |
|
228 |
+ </span> |
|
229 |
+ <?php endif; ?> |
|
230 |
+ </div> |
|
231 |
+ </div> |
|
232 |
+ <?php endif; ?> |
|
233 |
+ <?php if ($box->add_items || $box->longtext) : ?> |
|
234 |
+ <div class="box-lower--expand <?php if ($box->is_map == "code") : ?>is-map p-0<?php endif; ?> <?php if ($box->expand_longtext && $box->expand_longtext != "show_all") : ?>expandable<?php endif; ?> <?php if ($box->expand_longtext == "hide_preview") : ?>hide-preview<?php endif; ?>"> |
|
235 |
+ <?php if ($box->expand_image) : ?> |
|
236 |
+ <div class="box--expand-image text-center"> |
|
237 |
+ |
|
238 |
+ <?php |
|
239 |
+ if (!isset($box->size_expand_image)) { |
|
240 |
+ $box->{"size_expand_image"} = ""; |
|
241 |
+ } |
|
242 |
+ ?> |
|
243 |
+ |
|
244 |
+ <img class="<?php if ($this->is_slider): ?>swiper-<?php endif; ?>lazy" |
|
245 |
+ data-src="<?= Image::get(FilesModel::findByUuid($box->expand_image)->path, $box->size_expand_image[0], $box->size_expand_image[1], $box->size_expand_image[2]); ?>"> |
|
246 |
+ </div> |
|
247 |
+ <?php endif; ?> |
|
248 |
+ <?php if ($box->longtext) : ?> |
|
249 |
+ <div class="box--longtext <?php if ($box->alternate_background == "transparent") : ?>px-0<?php endif; ?>"> |
|
250 |
+ <?php echo $box->longtext; ?> |
|
251 |
+ </div> |
|
252 |
+ <?php endif; ?> |
|
253 |
+ |
|
254 |
+ <?php if ($box->link_text) : ?> |
|
255 |
+ <div class="button--wrapper <?php if ($box->alternate_background == "transparent") : ?>px-0<?php endif; ?>"> |
|
256 |
+ <a class="d-inline-block btn <?php if ($box->link_size) : ?><?php echo $box->link_size; ?><?php endif; ?> <?php echo $box->link_type; ?>" |
|
257 |
+ href="<?php echo $box->link; ?><?php if ($box->link_betreff) : ?>?subject=<?php echo $box->link_betreff; ?><?php endif; ?>"><?php echo $box->link_text; ?> |
|
258 |
+ </a> |
|
259 |
+ </div> |
|
260 |
+ <?php endif; ?> |
|
261 |
+ |
|
262 |
+ <?php if ($box->add_items == "buttons" && !$box->linkoverlay) : ?> |
|
263 |
+ <div class="button--wrapper <?php if ($box->alternate_background == "transparent") : ?>px-0<?php endif; ?>"> |
|
264 |
+ <?php foreach ($box->buttons as $button) : ?> |
|
265 |
+ <a <?php if ($button->new_tab): ?>target="_blank"<?php endif; ?> |
|
266 |
+ data-aos="<?php if ($button->animation_type) : ?><?php echo $button->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>" |
|
267 |
+ class="d-inline-block btn <?php if ($button->link_size) : ?><?php echo $button->link_size; ?><?php endif; ?> <?php echo $button->link_type; ?>" |
|
268 |
+ href="<?php echo $button->link_url; ?><?php if ($button->link_betreff) : ?>?subject=<?php echo $button->link_betreff; ?><?php endif; ?>"><?php echo $button->link_text; ?></a> |
|
269 |
+ <?php endforeach ?> |
|
270 |
+ </div> |
|
271 |
+ <?php endif; ?> |
|
272 |
+ |
|
273 |
+ <?php if ($box->add_items == "modal" && !$box->linkoverlay) : ?> |
|
274 |
+ <div class="button--wrapper <?php if ($box->alternate_background == "transparent") : ?>px-0<?php endif; ?>"> |
|
275 |
+ <span class="d-inline-block btn <?php if ($box->modal_button_size) : ?><?php echo $box->modal_button_size; ?><?php endif; ?> <?php echo $box->modal_button_type; ?>" |
|
276 |
+ data-aos="<?php if ($box->modal_button_animation) : ?><?php echo $box->modal_button_animation; ?><?php else : ?>animate__fadeInUp<?php endif; ?>" |
|
277 |
+ data-bs-toggle="modal" |
|
278 |
+ data-bs-target="#linkBoxModal_<?php echo $this->id; ?>_<?php echo $i; ?>"><?php echo $box->modal_button_text; ?></span> |
|
279 |
+ </div> |
|
280 |
+ <?php endif; ?> |
|
281 |
+ </div> |
|
282 |
+ <?php endif; ?> |
|
283 |
+ </div> |
|
284 |
+ <?php endif; ?> |
|
285 |
+ </div> |
|
286 |
+ |
|
287 |
+ </div> |
|
288 |
+ <?php endforeach ?> |
|
289 |
+ <?php if ($this->is_slider): ?> |
|
290 |
+ </div> |
|
291 |
+ <?php endif; ?> |
|
292 |
+ </div> |
|
293 |
+ |
|
294 |
+ |
|
295 |
+ <?php if ($this->is_slider): ?> |
|
296 |
+ <?php if (count($this->boxes) > 1) : ?> |
|
297 |
+ <?php if ($this->show_pagination): ?> |
|
298 |
+ <div class="linkboxes-slider_<?= $this->id; ?> swiper-pagination"></div> |
|
299 |
+ <?php endif; ?> |
|
300 |
+ <?php if ($this->show_arrows): ?> |
|
301 |
+ <div class="linkboxes-slider_<?= $this->id; ?> swiper-button-prev"></div> |
|
302 |
+ <div class="linkboxes-slider_<?= $this->id; ?> swiper-button-next"></div> |
|
303 |
+ <?php endif; ?> |
|
304 |
+ <?php endif; ?> |
|
305 |
+ <?php endif; ?> |
|
306 |
+ <?php endif; ?> |
|
307 |
+ </div></div> |
|
308 |
+<?php if ($this->boxes) : ?><?php foreach ($this->boxes as $i => $box) : ?><?php if ($box->add_items == 'modal') : ?> |
|
309 |
+ <div class="linkboxModal modal details-modal <?php echo $box->modal_size; ?> modal-dialog-centered" |
|
310 |
+ style="display: none;" |
|
311 |
+ id="linkBoxModal_<?php echo $this->id; ?>_<?php echo $i; ?>" tabindex="-1" |
|
312 |
+ aria-hidden="true" |
|
313 |
+ > |
|
314 |
+ <div class="modal-dialog"> |
|
315 |
+ <div class="modal-content" |
|
316 |
+ data-aos="<?php if ($box->modal_animation_type) : ?><?php echo $box->modal_animation_type; ?><?php else : ?>animate__fadeIn<?php endif; ?>" |
|
317 |
+ <?php if ($box->modal_backgroundcolor): ?>style="background-color: <?php echo $box->modal_backgroundcolor; ?>"<?php endif; ?>> |
|
318 |
+ <div class="modal-body"> |
|
319 |
+ |
|
320 |
+ <div class="container container"> |
|
321 |
+ <button type="button" class="btn--close" data-bs-dismiss="modal" aria-label="Schließen"> |
|
322 |
+ <i class="fal fa-times"></i> |
|
323 |
+ </button> |
|
324 |
+ |
|
325 |
+ <div class="row gx-3 align-items-center <?php if ($box->modal_row_reverse): ?>flex-row-reverse<?php endif; ?>"> |
|
326 |
+ <?php if ($box->modal_image) : ?> |
|
327 |
+ |
|
328 |
+ <?php |
|
329 |
+ if (!isset($box->size_modal)) { |
|
330 |
+ $box->{"size_modal"} = ""; |
|
331 |
+ } |
|
332 |
+ ?> |
|
333 |
+ |
|
334 |
+ |
|
335 |
+ <div class="col-12 mb-1 mb-md-0 <?php if ($box->modal_longtext) : ?>col-md-6<?php endif; ?>"> |
|
336 |
+ |
|
337 |
+ <div class="image--wrapper"> |
|
338 |
+ |
|
339 |
+ <img class="lazy" |
|
340 |
+ data-src="<?= Image::get(FilesModel::findByUuid($box->modal_image)->path, $box->size_modal[0], $box->size_modal[1], $box->size_modal[2]); ?>"> |
|
341 |
+ |
|
342 |
+ <?php if ($box->modal_logo) : ?> |
|
343 |
+ <img class="lazy logo" |
|
344 |
+ data-src="<?= Image::get(FilesModel::findByUuid($box->modal_logo)->path, null, null, null); ?>"> |
|
345 |
+ |
|
346 |
+ <?php endif; ?> |
|
347 |
+ </div> |
|
348 |
+ |
|
349 |
+ </div> |
|
350 |
+ <?php endif; ?> |
|
351 |
+ <?php if ($box->modal_longtext) : ?> |
|
352 |
+ <div class="col-12 <?php if ($box->modal_image) : ?>col-md-6<?php endif; ?>"> |
|
353 |
+ <?php echo $box->modal_longtext; ?> |
|
354 |
+ </div> |
|
355 |
+ <?php endif; ?> |
|
356 |
+ </div> |
|
357 |
+ </div> |
|
358 |
+ |
|
359 |
+ |
|
360 |
+ </div> |
|
361 |
+ </div> |
|
362 |
+ </div> |
|
363 |
+ </div> |
|
364 |
+<?php endif; ?> |
|
365 |
+ |
|
366 |
+<?php endforeach ?> |
|
367 |
+ |
|
368 |
+<?php endif; ?> |
|
369 |
+ |
|
370 |
+<?php if ($this->is_slider && TL_MODE == 'FE'): ?> |
|
371 |
+ <script> |
|
372 |
+ window.addEventListener('load', function () { |
|
373 |
+ if ($('.swiper.linkboxes-slider_<?= $this->id;?>').length) { |
|
374 |
+ |
|
375 |
+ const swiper_<?php echo $this->id; ?> = new Swiper('.swiper.linkboxes-slider_<?php echo $this->id; ?>', { |
|
376 |
+ direction: 'horizontal', |
|
377 |
+ |
|
378 |
+ |
|
379 |
+ loop: <?php if ($this->loop) : ?>true<?php else:?>false<?php endif;?>, |
|
380 |
+ |
|
381 |
+ |
|
382 |
+ preloadImages: false, |
|
383 |
+ lazy: { |
|
384 |
+ loadPrevNext: true, |
|
385 |
+ }, |
|
386 |
+ |
|
387 |
+ spaceBetween: <?php if ($this->space_between) : ?><?= $this->space_between; ?><?php else:?>30<?php endif;?>, |
|
388 |
+ centeredSlides: <?php if ($this->centered_slides) : ?>true<?php else:?>false<?php endif;?>, |
|
389 |
+ slidesPerView: <?php if ($this->slides_per_view) : ?><?= $this->slides_per_view; ?><?php else:?> |
|
390 |
+ 'auto'<?php endif;?>, |
|
391 |
+ |
|
392 |
+ speed: <?php if ($this->transition_time) : ?><?= $this->transition_time; ?><?php else:?>1500<?php endif;?>, |
|
393 |
+ effect: <?php if ($this->slide_effect) : ?>'<?= $this->slide_effect; ?>'<?php else:?> |
|
394 |
+ 'slide'<?php endif;?>, |
|
395 |
+ |
|
396 |
+ <?php if ($this->autoplay) : ?> |
|
397 |
+ autoplay: { |
|
398 |
+ delay: <?php if ($this->autoplay_time) : ?><?= $this->autoplay_time; ?><?php else:?>3000<?php endif;?>, |
|
399 |
+ }, |
|
400 |
+ <?php endif; ?> |
|
401 |
+ |
|
402 |
+ |
|
403 |
+ <?php if ($this->slide_effect == "coverflow") : ?> |
|
404 |
+ coverflowEffect: { |
|
405 |
+ rotate: 50, // Slide rotate in degrees |
|
406 |
+ stretch: 0, // Stretch space between slides (in px) |
|
407 |
+ depth: 100, // Depth offset in px (slides translate in Z axis) |
|
408 |
+ modifier: 1, // Effect multipler |
|
409 |
+ slideShadows: true, // Enables slides shadows |
|
410 |
+ }, |
|
411 |
+ <?php endif;?> |
|
412 |
+ |
|
413 |
+ <?php if ($this->slide_effect == "fade") : ?> |
|
414 |
+ fadeEffect: { |
|
415 |
+ crossFade: true |
|
416 |
+ }, |
|
417 |
+ <?php endif;?> |
|
418 |
+ |
|
419 |
+ <?php if (count($this->boxes) > 1) : ?> |
|
420 |
+ navigation: { |
|
421 |
+ nextEl: '.linkboxes-slider_<?= $this->id;?>.swiper-button-next', |
|
422 |
+ prevEl: '.linkboxes-slider_<?= $this->id;?>.swiper-button-prev', |
|
423 |
+ }, |
|
424 |
+ |
|
425 |
+ pagination: { |
|
426 |
+ el: '.linkboxes-slider_<?php echo $this->id; ?>.swiper-pagination', |
|
427 |
+ clickable: true, |
|
428 |
+ }, |
|
429 |
+ <?php endif; ?> |
|
430 |
+ <?php if ($this->slides_per_view) : ?> |
|
431 |
+ breakpoints: { |
|
432 |
+ 320: { |
|
433 |
+ slidesPerView: 1, |
|
434 |
+ }, |
|
435 |
+ 480: { |
|
436 |
+ slidesPerView: 2, |
|
437 |
+ }, |
|
438 |
+ 768: { |
|
439 |
+ slidesPerView: <?= $this->slides_per_view / 2; ?>, |
|
440 |
+ }, |
|
441 |
+ 992: { |
|
442 |
+ slidesPerView: <?= $this->slides_per_view; ?>, |
|
443 |
+ } |
|
444 |
+ } |
|
445 |
+ <?php endif;?> |
|
446 |
+ }); |
|
447 |
+ } |
|
448 |
+ }, {passive: true}) |
|
449 |
+ </script> |
|
450 |
+<?php endif; ?> |
|
0 | 451 |
\ No newline at end of file |