| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,128 @@ |
| 1 |
+<?php |
|
| 2 |
+if (TL_MODE == 'FE') {
|
|
| 3 |
+ $GLOBALS['TL_CSS'][] = 'files/base/layout/css/elements/custom-elements/ce_rsce_switchingcards.min.css|static'; |
|
| 4 |
+ $GLOBALS['TL_JAVASCRIPT'][] = 'files/base/layout/js/_elements/ce_rsce_switchingcards.js|static'; |
|
| 5 |
+} |
|
| 6 |
+?> |
|
| 7 |
+ |
|
| 8 |
+ |
|
| 9 |
+ <div <?php echo $this->cssID; ?> class="content--element <?php echo $this->class; ?>"> |
|
| 10 |
+ <div class="ce--inner container"> |
|
| 11 |
+ <?php if ($this->headline || $this->subline || $this->topline) : ?> |
|
| 12 |
+ <div class="ce--headline" |
|
| 13 |
+ data-aos="<?php if ($this->animation_type) : ?><?php echo $this->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>"> |
|
| 14 |
+ <?php if ($this->topline) : ?> |
|
| 15 |
+ <span class="ce--topline"><?php echo $this->topline; ?></span> |
|
| 16 |
+ <?php endif; ?> |
|
| 17 |
+ <?php if ($this->headline) : ?> |
|
| 18 |
+ <<?php echo($this->hl); ?>> |
|
| 19 |
+ <?php echo($this->headline); ?> |
|
| 20 |
+ </<?php echo($this->hl); ?>> |
|
| 21 |
+ <?php endif; ?> |
|
| 22 |
+ <?php if ($this->subline) : ?> |
|
| 23 |
+ <span class="ce--subline" |
|
| 24 |
+ ><?php echo $this->subline; ?></span> |
|
| 25 |
+ <?php endif; ?> |
|
| 26 |
+ </div> |
|
| 27 |
+ <?php endif; ?> |
|
| 28 |
+ <?php if ($this->rows) : ?> |
|
| 29 |
+ <div class="row justify-content-center"> |
|
| 30 |
+ <?php foreach ($this->rows as $i => $row) : ?> |
|
| 31 |
+ <div class="<?php echo $row->column_width; ?>"> |
|
| 32 |
+ <div class="flipping-card--wrapper" |
|
| 33 |
+ data-aos="<?php if ($row->animation_type) : ?><?php echo $row->animation_type; ?><?php else : ?>animate__fadeInUp<?php endif; ?>"> |
|
| 34 |
+ |
|
| 35 |
+ <?php if ($row->back_link): ?> |
|
| 36 |
+ <a href="<?= $row->back_link; ?>"></a> |
|
| 37 |
+ <?php endif; ?> |
|
| 38 |
+ |
|
| 39 |
+ <div class="flipping-card--inner"> |
|
| 40 |
+ |
|
| 41 |
+ <div style=" |
|
| 42 |
+ <?php if ($row->front_background): ?>background-color: <?php echo $row->front_background; ?>;<?php endif; ?> <?php if ($row->front_textcolor): ?>color: <?php echo $row->front_textcolor; ?><?php endif; ?> |
|
| 43 |
+ <?php if ($row->image_front && $row->front_as_bg): ?>background: url(<?= Image::get(FilesModel::findByUuid($row->image_front)->path, null, null, null); ?>) center center no-repeat; background-size: cover;<?php endif; ?> |
|
| 44 |
+ " |
|
| 45 |
+ class="flipping-card--front <?php echo $row->front_textalign; ?>"> |
|
| 46 |
+ <div class="front--inner" |
|
| 47 |
+ style="<?php if ($row->front_background): ?>background-color: <?php echo $row->front_background; ?>;<?php endif; ?> <?php if ($row->front_textcolor): ?>color: <?php echo $row->front_textcolor; ?><?php endif; ?>" |
|
| 48 |
+ |
|
| 49 |
+ > |
|
| 50 |
+ <?php if ($row->image_front && !$row->front_as_bg): ?> |
|
| 51 |
+ <div class="fc--image"> |
|
| 52 |
+ <img src="<?= Image::get(FilesModel::findByUuid($row->image_front)->path, null, null, null); ?>"> |
|
| 53 |
+ </div> |
|
| 54 |
+ <?php endif; ?> |
|
| 55 |
+ <?php if ($row->front_headline): ?> |
|
| 56 |
+ <div class="fc--headline"> |
|
| 57 |
+ <span><?php echo $row->front_headline; ?></span> |
|
| 58 |
+ </div> |
|
| 59 |
+ <?php endif; ?> |
|
| 60 |
+ <?php if ($row->front_content_headline): ?> |
|
| 61 |
+ <div class="fc--content-headline"> |
|
| 62 |
+ <span><?php echo $row->front_content_headline; ?></span> |
|
| 63 |
+ </div> |
|
| 64 |
+ <?php endif; ?> |
|
| 65 |
+ <?php if ($row->front_content_text): ?> |
|
| 66 |
+ <div class="fc--content-text"> |
|
| 67 |
+ <span><?php echo $row->front_content_text; ?></span> |
|
| 68 |
+ </div> |
|
| 69 |
+ <?php endif; ?> |
|
| 70 |
+ |
|
| 71 |
+ |
|
| 72 |
+ </div> |
|
| 73 |
+ </div> |
|
| 74 |
+ |
|
| 75 |
+ <div style=" <?php if ($row->front_background): ?>border-color: <?php echo $row->front_background; ?>;<?php endif; ?> |
|
| 76 |
+ <?php if ($row->back_background): ?>background-color: <?php echo $row->back_background; ?>;<?php endif; ?> |
|
| 77 |
+ <?php if ($row->back_textcolor): ?>color: <?php echo $row->back_textcolor; ?><?php endif; ?>" |
|
| 78 |
+ class="flipping-card--back"> |
|
| 79 |
+ <div class="back--inner"> |
|
| 80 |
+ <?php if ($row->image_back): ?> |
|
| 81 |
+ <div class="fc--image"> |
|
| 82 |
+ <img src="<?= Image::get(FilesModel::findByUuid($row->image_back)->path, null, null, null); ?>"> |
|
| 83 |
+ </div> |
|
| 84 |
+ <?php endif; ?> |
|
| 85 |
+ <?php if ($row->back_headline): ?> |
|
| 86 |
+ <div class="fc--headline"> |
|
| 87 |
+ <?php echo $row->back_headline; ?> |
|
| 88 |
+ </div> |
|
| 89 |
+ <?php endif; ?> |
|
| 90 |
+ <?php if ($row->back_content_headline): ?> |
|
| 91 |
+ <div class="fc--content-headline"> |
|
| 92 |
+ <span><?php echo $row->back_content_headline; ?></span> |
|
| 93 |
+ </div> |
|
| 94 |
+ <?php endif; ?> |
|
| 95 |
+ <?php if ($row->back_content_text): ?> |
|
| 96 |
+ <div class="fc--content-text"> |
|
| 97 |
+ <?php echo $row->back_content_text; ?> |
|
| 98 |
+ </div> |
|
| 99 |
+ <?php endif; ?> |
|
| 100 |
+ |
|
| 101 |
+ <?php if ($row->link_url): ?> |
|
| 102 |
+ <div class="fc--content-button mt-4"> |
|
| 103 |
+ <a class="d-inline-block btn <?php if ($row->link_size) : ?><?php echo $row->link_size; ?><?php endif; ?> <?php echo $row->link_type; ?>" |
|
| 104 |
+ href="<?php echo $row->link_url; ?><?php if ($row->link_betreff) : ?>?subject=<?php echo $row->link_betreff; ?><?php endif; ?>"><?php echo $row->link_text; ?> |
|
| 105 |
+ </a> |
|
| 106 |
+ </div> |
|
| 107 |
+ <?php endif; ?> |
|
| 108 |
+ </div> |
|
| 109 |
+ </div> |
|
| 110 |
+ </div> |
|
| 111 |
+ </div> |
|
| 112 |
+ </div> |
|
| 113 |
+ <?php endforeach ?> |
|
| 114 |
+ </div> |
|
| 115 |
+ <?php endif; ?> |
|
| 116 |
+ </div> |
|
| 117 |
+ </div> |
|
| 118 |
+ |
|
| 119 |
+<?php if (TL_MODE == 'FE'): ?> |
|
| 120 |
+ <script> |
|
| 121 |
+ if ($('.flipping-card--wrapper').length) {
|
|
| 122 |
+ $('body').on('click', '.flipping-card--wrapper', function (e) {
|
|
| 123 |
+ $('.flipping-card--wrapper.active').removeClass("active");
|
|
| 124 |
+ $(this).addClass("active");
|
|
| 125 |
+ }); |
|
| 126 |
+ } |
|
| 127 |
+ </script> |
|
| 128 |
+<?php endif; ?> |
|
| 0 | 129 |
\ No newline at end of file |