| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) { |
| 3 |
exit; // Exit if accessed directly. |
| 4 |
} |
| 5 |
|
| 6 |
// Set a global variable to indicate the current template |
| 7 |
global $ova_elems_template; |
| 8 |
$ova_elems_template = 'template1'; |
| 9 |
|
| 10 |
|
| 11 |
wp_enqueue_style('ova-elems-style1', OVA_ELEMS_URL . 'assets/css/style1.css', array(), OVA_ELEMS_VER); |
| 12 |
wp_enqueue_script('ova-elems-template-1-frontend-scripts', OVA_ELEMS_URL . 'assets/js/template-1-scripts.js', ['swiper-js'], OVA_ELEMS_VER, true); |
| 13 |
|
| 14 |
// Prepare dynamic settings for the slider |
| 15 |
$dynamic_settings = [ |
| 16 |
'autoplay' => (!empty($static_settings['autoplay']) && $static_settings['autoplay'] == '1') ? ($static_settings['autoplay_delay'] ?? 1000) : false, // Autoplay delay |
| 17 |
'effect' => $static_settings['effect'] ?? 'fade', |
| 18 |
'crossFade' => !empty($static_settings['fade_crossfade']), |
| 19 |
'lazyLoad' => !empty($static_settings['lazy_load']) && $static_settings['lazy_load'] == '1' ? true : false, |
| 20 |
'autoplay_delay' => isset($static_settings['autoplay_delay']) ? absint($static_settings['autoplay_delay']) : 1000, |
| 21 |
]; |
| 22 |
wp_localize_script('ova-elems-template-1-frontend-scripts', 'template1SliderConfig', $dynamic_settings); |
| 23 |
|
| 24 |
?> |
| 25 |
<section class="oe-coperate-slider" id="oe_coperate_slider"> |
| 26 |
<div class="inner-wrap"> |
| 27 |
<div class="slide-counter-wrap"> |
| 28 |
<div class="counter-wrap"> |
| 29 |
<?php foreach ($slides as $index => $slide): ?> |
| 30 |
<div class="count <?php echo $index === 0 ? 'active' : ''; ?>"><?php echo esc_html($index + 1); ?></div> |
| 31 |
<?php endforeach; ?> |
| 32 |
</div> |
| 33 |
<div class="social-media-wrap"> |
| 34 |
<div class="follow-title ov_social_text_font_size"><?php echo esc_html($static_settings['ov_template_review_text'] ?? ''); ?></div> |
| 35 |
<div class="oe-icons-container "> |
| 36 |
<div class="icons"><a href="<?php echo esc_url($static_settings['facebook_url'] ?? '#'); ?>" target="_blank"><i class="fa-brands fa-facebook-f ov-social-icon"></i></a></div> |
| 37 |
<div class="icons"><a href="<?php echo esc_url($static_settings['instagram_url'] ?? '#'); ?>" target="_blank"><i class="fa-brands fa-instagram ov-social-icon"></i></a></div> |
| 38 |
<div class="icons"><a href="<?php echo esc_url($static_settings['youtube_url'] ?? '#'); ?>" target="_blank"><i class="fa-brands fa-youtube ov-social-icon"></i></a></div> |
| 39 |
<div class="icons"><a href="<?php echo esc_url($static_settings['basketball_url'] ?? '#'); ?>" target="_blank"><i class="fa-solid fa-basketball ov-social-icon"></i></a></div> |
| 40 |
<div class="icons"><a href="<?php echo esc_url($static_settings['twitter_url'] ?? '#'); ?>" target="_blank"><i class="fa-brands fa-twitter ov-social-icon"></i></a></div> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
<div class="swiper oe-slider-outer"> |
| 45 |
<div class="swiper-wrapper"> |
| 46 |
<?php foreach ($slides as $index => $slide): ?> |
| 47 |
<div class="swiper-slide"> |
| 48 |
<div class="slider-main-image slider-main-image-<?php echo esc_attr($post->ID); ?>-<?php echo esc_attr($index); ?>"> |
| 49 |
<?php if (!empty($slide['image_id'])): ?> |
| 50 |
<img src="<?php echo esc_url(wp_get_attachment_url($slide['image_id'])); ?>" alt="<?php echo esc_attr($slide['title']); ?>" class="swiper-lazy"> |
| 51 |
<?php endif; ?> |
| 52 |
</div> |
| 53 |
<div class="oe-slider-content"> |
| 54 |
<?php if (!empty($slide['title'])): ?> |
| 55 |
<h1 class="title title-<?php echo esc_attr($post_id); ?>"><?php echo esc_html($slide['title']); ?></h1> |
| 56 |
<?php endif; ?> |
| 57 |
<?php if (!empty($slide['description'])): ?> |
| 58 |
<p class="description description-<?php echo esc_attr($post_id); ?>"><?php echo esc_html($slide['description']); ?></p> |
| 59 |
<?php endif; ?> |
| 60 |
<?php if (!empty($slide['button_text']) && !empty($slide['button_url'])): ?> |
| 61 |
<a class="slider-btn ov-btn-<?php echo esc_attr($post_id); ?> slider-btn-<?php echo esc_attr($post_id); ?>" href="<?php echo esc_url($slide['button_url']); ?>" class="theme-btn"><?php echo esc_html($slide['button_text']); ?></a> |
| 62 |
<?php endif; ?> |
| 63 |
</div> |
| 64 |
</div> |
| 65 |
<?php endforeach; ?> |
| 66 |
</div> |
| 67 |
|
| 68 |
|
| 69 |
<div class="oe-slider-businessInfo"> |
| 70 |
<div class="oe-slider-businessInfo-inner"> |
| 71 |
<?php if (!empty($static_settings['mini_titles']) && !empty($static_settings['mini_images_1'])): ?> |
| 72 |
<?php foreach ($static_settings['mini_titles'] as $index => $title): ?> |
| 73 |
<div class="information-card"> |
| 74 |
<div class="icon"> |
| 75 |
<?php if (!empty($static_settings['mini_images_1'][$index])): ?> |
| 76 |
<img src="<?php echo esc_url(wp_get_attachment_url($static_settings['mini_images_1'][$index])); ?>" alt="<?php echo esc_attr($title); ?>"> |
| 77 |
<?php endif; ?> |
| 78 |
</div> |
| 79 |
<div class="info-inner"> |
| 80 |
<h3 class="heading ov-mini-title"><?php echo esc_html($title); ?></h3> |
| 81 |
<p class="description ov-mini-description"><?php echo esc_html($static_settings['mini_descriptions'][$index] ?? ''); ?></p> |
| 82 |
</div> |
| 83 |
</div> |
| 84 |
<?php endforeach; ?> |
| 85 |
<?php endif; ?> |
| 86 |
|
| 87 |
<?php if (!empty($static_settings['mini_title2']) || !empty($static_settings['mini_description2'])): ?> |
| 88 |
<div class="information-card"> |
| 89 |
<div class="icon"> |
| 90 |
<?php if (!empty($static_settings['mini_images_2'][0])): ?> |
| 91 |
<img src="<?php echo esc_url(wp_get_attachment_url($static_settings['mini_images_2'][0])); ?>" alt="<?php echo esc_attr($static_settings['mini_title2'][0]); ?>"> |
| 92 |
<?php endif; ?> |
| 93 |
</div> |
| 94 |
<div class="info-inner"> |
| 95 |
<h3 class="heading ov-mini-title"><?php echo esc_html($static_settings['mini_title2'][0]); ?></h3> |
| 96 |
<p class="description ov-mini-description"><?php echo esc_html($static_settings['mini_description2'][0]); ?></p> |
| 97 |
</div> |
| 98 |
</div> |
| 99 |
<?php endif; ?> |
| 100 |
</div> |
| 101 |
<div class="col-lg-1 col-12 order-md-2 order-sm-1 order-1 position-relative nav-arrow"> |
| 102 |
<div class="swiper-button-prev"></div> |
| 103 |
<div class="swiper-button-next"></div> |
| 104 |
</div> |
| 105 |
</div> |
| 106 |
|
| 107 |
</div> |
| 108 |
|
| 109 |
|
| 110 |
<div class="oe-slider-clients"> |
| 111 |
<div class="client-images"> |
| 112 |
<div class="oe-slider-add-icon"> |
| 113 |
<i class="fa-solid fa-plus"></i> |
| 114 |
</div> |
| 115 |
<?php if (!empty($corner_images)): ?> |
| 116 |
<?php foreach ($corner_images as $image_id): ?> |
| 117 |
<div class="img-holder"> |
| 118 |
<img src="<?php echo esc_url(wp_get_attachment_url($image_id)); ?>" alt="Corner Image"> |
| 119 |
</div> |
| 120 |
<?php endforeach; ?> |
| 121 |
<?php endif; ?> |
| 122 |
<!-- Happy Clients --> |
| 123 |
<p class="ov_review_text_font_size"><?php echo esc_html($static_settings['ov_template_social_review_text'] ?? ''); ?></p> |
| 124 |
</div> |
| 125 |
</div> |
| 126 |
</div> |
| 127 |
</div> |
| 128 |
</section> |
| 129 |
|
| 130 |
|
| 131 |
|