| 1 |
<?php |
| 2 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. |
| 3 |
defined('ABSPATH') || die('Restricted Access'); |
| 4 |
$community_content = $data['engage_community']; |
| 5 |
?> |
| 6 |
|
| 7 |
<div class="acym__content cell"> |
| 8 |
<div style="display: flex; justify-content: space-between;"> |
| 9 |
<div class="shrink acym__title acym__dashboard__title"><?php echo esc_html(acym_translation('ACYM_ENGAGE_COMMUNITY')); ?></div> |
| 10 |
<div style="user-select: none;"> |
| 11 |
<i id="prevBtn" class="acymicon-keyboard-arrow-left disabled"></i> |
| 12 |
<i id="nextBtn" class="acymicon-keyboard-arrow-right"></i> |
| 13 |
</div> |
| 14 |
</div> |
| 15 |
<span class="separator"></span> |
| 16 |
<div class="sliderCommunity"> |
| 17 |
<div class="slides-wrapper"> |
| 18 |
<?php |
| 19 |
$chunkedSlides = array_chunk($community_content, 3); |
| 20 |
foreach ($chunkedSlides as $group) { |
| 21 |
echo '<div class="slide-group">'; |
| 22 |
foreach ($group as $index => $content) { |
| 23 |
?> |
| 24 |
<div class="acym_vcenter slide gap-1"> |
| 25 |
<div> |
| 26 |
<i class="<?php echo esc_attr($content['icon']); ?> community-icons"></i> |
| 27 |
</div> |
| 28 |
<div> |
| 29 |
|
| 30 |
<h5><a href="<?php echo esc_url($content['link'] ? acym_completeLink($content['link']) : $content['link_doc']); ?>" target="_blank"> |
| 31 |
<?php echo esc_html( |
| 32 |
acym_translation( |
| 33 |
$content['title'] |
| 34 |
) |
| 35 |
); ?><i class="acymicon-external-link small-icon"></i></a></h5> |
| 36 |
<p><?php echo esc_html(acym_translation($content['text'])); ?></p> |
| 37 |
</div> |
| 38 |
</div> |
| 39 |
<?php |
| 40 |
if (($index + 1) % 3 !== 0) { |
| 41 |
echo '<span class="separator acym__dashboard__light__separator"></span>'; |
| 42 |
} |
| 43 |
} |
| 44 |
echo '</div>'; |
| 45 |
} |
| 46 |
?> |
| 47 |
</div> |
| 48 |
</div> |
| 49 |
</div> |
| 50 |
|