File: /www/wwwroot/www.sceybwg.com/wp-content/themes/Modular/template/module-page/theme-partners-2.php
<?php
/**
* Template: 合作伙伴-2
* @Author: 大胡子
* @Email: dahuzi@xintheme.com
* @Link: www.xintheme.com
* @Date: 2023-08-01 07:27:28
* @Last Modified by: dahuzi
* @Last Modified time: 2024-11-08 14:44:20
*/
if(is_array($module_content)){?>
<div class="section">
<div class="container">
<?php
if( !empty($module_setting['title_display']) ){?>
<div class="section-title <?php echo $wow_style;?>">
<?php
if( !empty($module_title) ){
echo '<strong>'.$module_title.'</strong>';
}
if( !empty($module_desc) ){
echo '<p>'.$module_desc.'</p>';
}
?>
</div>
<?php }?>
<div class="partners-2-module<?php if( !empty($module_setting['mask_image']) ){ echo ' mask-image'; }?> <?php echo $wow_style;?>">
<?php
foreach ($module_content as $value) {
if(is_array($value['item_partners'])){
//鼠标悬停暂停自动播放
$pauseonmouseenter = $value['item_autoplay_pauseonmouseenter'] ? 'false' : 'true';
//允许触摸滑动
$allowtouchmove = $value['item_allowtouchmove'] ? 'true' : 'false';
//交互时暂停自动播放
$disableoninteraction = $value['item_autoplay_disableoninteraction'] ? 'true' : 'false';
//切换速度
$speed = $value['item_speed'] ? $value['item_speed'] : '10000';
//显示数量
$number = $value['item_number'] ? $value['item_number'] : '3';
//滚动方向
$direction = $value['item_reversedirection'] ? ' autoplay-reverseDirection: true;' : '';
echo '<div class="swiper" data-uc-swiper="items: 2; gap: 16; center: true; center-bounds: true; autoplay: 0; loop: true; speed: '.$speed.'; autoplay-delay: -1; allowTouchMove: '.$allowtouchmove.'; autoplay-pauseOnMouseEnter: '.$pauseonmouseenter.'; autoplay-disableOnInteraction: '.$disableoninteraction.';'.$direction.'" data-uc-swiper-l="items: '.$number.'; gap: 30;">';
?>
<div class="swiper-wrapper">
<?php
foreach ($value['item_partners'] as $item) {?>
<div class="swiper-slide">
<div class="partners-item partners-style-<?= esc_attr($value['item_style']);?>">
<?php if (!empty($item['partners_img']) && $value['item_style'] != 'text') : ?>
<div class="partners-img">
<img loading="lazy" src="<?= esc_url($item['partners_img']); ?>" alt="<?= !empty($item['partners_text']) ? esc_attr($item['partners_text']) : ''; ?>" />
</div>
<?php endif; ?>
<?php
if( !empty($item['partners_text']) && $value['item_style'] != 'img' ){
echo '<h6>'.$item['partners_text'].'</h6>';
}
?>
</div>
</div>
<?php }?>
</div>
</div>
<?php
}
}?>
</div>
</div>
</div>
<?php }?>
<?php
//echo wpjam_print_r( $module_setting );
//echo wpjam_print_r( $module_content );
//echo wpjam_print_r( $module_style );