/home/bdqbpbxa/demo-subdomains/ecosphere.goodface.com.ua/wp-content/themes/ecosphere/products.php
<?php
/*
template name: products
*/
get_header();
$current_lang = pll_current_language();
$srcset = get_template_directory_uri() . "/assets/images/lazyload.png";
?>
<?php
$main_container = get_field('main-container');
if ($main_container['title']) :
?>
<section class="product-start-block">
<div class="container">
<div class="product-start-block__inner">
<div class="product-start-block__stickers">
<?php
if ( $main_container['sticker-1'] ) :
?>
<div class="product-start__sticker-1 animation -onload -scale" data-delay="0.6s">
<img src="<?php echo $main_container['sticker-1']['url']; ?>" alt="<?php echo $main_container['sticker-1']['alt']; ?>" />
</div>
<?php
endif;
if ( $main_container['sticker-2'] ) :
?>
<div class="product-start__sticker-2 animation -onload -scale" data-delay="0.7s">
<img src="<?php echo $main_container['sticker-2']['url']; ?>" alt="<?php echo $main_container['sticker-2']['url']; ?>" />
</div>
<?php
endif;
?>
</div>
<h1 class="title title-1 mob-title-1 animation -onload -swim-top">
<?php echo $main_container['title']; ?>
</h1>
<?php
if ($main_container['text']) :
?>
<div class="text text-2 mob-text-2 animation -onload -swim-top" data-delay="0.1s">
<p>
<?php echo $main_container['text']; ?>
</p>
</div>
<?php
endif;
?>
<?php
if ($main_container['link-list']) :
?>
<ul
class="
product-start-block__links
text-5
mob-text-4
animation
-onload
-swim-top
-scroll-links
--extrabold
--uppercase
"
data-delay="0.2s"
>
<?php
foreach($main_container['link-list'] as $item) :
$link = getLink($item);
if ($link['displayed']) :
?>
<li>
<a href="<?php echo $link['url']; ?>" class="default-border-button">
<?php echo $link['title']; ?>
</a>
</li>
<?php
endif;
endforeach;
?>
</ul>
<?php
endif;
?>
</div>
</div>
</section>
<?php
endif;
?>
<?php
$juices_slider_container = get_field('juices-slider-container');
if ($juices_slider_container['title']) :
?>
<section class="default-slider-block" id="<?php echo $juices_slider_container['ID']; ?>">
<div class="container animation -swim-top">
<div class="default-slider-block__inner">
<div class="default-slider-block__left">
<p class="title title-2 mob-title-2"><?php echo $juices_slider_container['title']; ?></p>
<?php
if ($juices_slider_container['subtitle']) :
?>
<div class="text text-2 mob-text-2">
<p>
<?php echo $juices_slider_container['subtitle']; ?>
</p>
</div>
<?php
endif;
?>
</div>
<?php
if ($juices_slider_container['slider']) :
?>
<div class="default-slider-block__slider-container">
<div class="default-button swiper-button-prev"></div>
<div class="default-button swiper-button-next"></div>
<div class="default-slider-block__slider swiper">
<div class="default-slider-block__slider-inner swiper-wrapper">
<?php
foreach($juices_slider_container['slider'] as $item) :
?>
<div class="default-slider-block__slide swiper-slide">
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $item['url'] ?>" alt="<?php echo $item['alt'] ?>" />
</div>
<?php
endforeach;
?>
</div>
</div>
<div class="swiper-pagination"></div>
</div>
<?php
endif;
?>
</div>
</div>
</section>
<?php
endif;
?>
<?php
$juices_brands_container = get_field('juices-brands-container');
if ($juices_brands_container['title']) :
?>
<section class="brands-list" id="<?php echo $juices_brands_container['ID']; ?>">
<div class="container animation -swim-top">
<div class="brands-list__inner">
<h2 class="title-3 mob-title-2"><?php echo $juices_brands_container['title']; ?></h2>
<?php
if ($juices_brands_container['brand-list']):
?>
<ul class="brands-list__list">
<?php
foreach($juices_brands_container['brand-list'] as $item) :
$brand_container = get_field('brand-container', $item);
$logo = $brand_container['logo']['color'];
$brand_permalink = get_field('brand-permalink', $item);
$target = '';
$hover_button = get_field("hover-button-{$current_lang}", 'option');
$brand_link_type = $brand_permalink['permalink_type'];
$without_hover = false;
if ($brand_link_type == 'custom') {
$brand_permalink = $brand_permalink['link']['url'];
$target = 'target="_blank"';
$hover_button_text = $hover_button['external'];
} elseif ($brand_link_type == 'default') {
$brand_permalink = get_the_permalink($item);
$hover_button_text = $hover_button['internal'];
} else {
$brand_permalink = get_field('brand-permalink', $item);
$hover_button_text = 'class="-withour-hover"';
$without_hover = true;
}
if ($logo && $brand_permalink) :
?>
<li data-brand-hover="<?php if (!$without_hover) echo $hover_button_text; ?>">
<?php
if ($brand_link_type != 'none') :
?>
<a href="<?php echo $brand_permalink; ?>" <?php echo $target; if ($without_hover) echo $hover_button_text;?> >
<?php
else :
?>
<div <?php echo $hover_button_text;?> >
<?php
endif;
if ($brand_container['own-brand']) :
?>
<span data-text="<?php the_field("own-sticker-text-{$current_lang}", "option")?>"></span>
<?php
endif;
?>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $logo['url']; ?>" alt="<?php echo $logo['alt']; ?>" />
<?php
if ($brand_link_type == 'none') echo '</div>'; else echo '</a>';
?>
</li>
<?php
endif;
endforeach;
?>
</ul>
<?php
endif;
?>
</div>
</div>
</section>
<?php
endif;
?>
<?php
$package_container = get_field('package-container');
if ($package_container['title'] && $package_container['package-repeater']) {
$args = [];
$args['container'] = $package_container;
get_template_part('template-parts/package-card-block', null, $args);
}
?>
<?php
$concentrated_container = get_field('concentrated-container');
?>
<section class="puree-product" id="<?php echo $concentrated_container['ID']; ?>">
<div class="puree-product__wave-top --noise-bg">
<svg class="svg-wave" xmlns="http://www.w3.org/2000/svg">
<clipPath
id="puree-product__wave-top"
clipPathUnits="objectBoundingBox"
>
<path
d="M0.042,0.435 L0,0.336 V1 L1,1 V0.774 L0.958,0.628 C0.917,0.482,0.833,0.191,0.75,0.068 C0.667,-0.054,0.583,-0.006,0.5,0.163 C0.417,0.336,0.333,0.628,0.25,0.679 C0.167,0.727,0.083,0.53,0.042,0.435"
></path>
</clipPath>
</svg>
</div>
<div class="puree-product__inner --noise-bg">
<div class="container animation -swim-top">
<?php
if ($concentrated_container['title']) :
?>
<div class="puree-product__info">
<?php
if ($concentrated_container['img']) :
?>
<div class="puree-product__info-img">
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $concentrated_container['img']['url']; ?>" alt="<?php echo $concentrated_container['img']['alt']; ?>" />
</div>
<?php
endif;
?>
<div class="puree-product__info-text">
<h2 class="title-2 mob-title-2">
<?php
echo $concentrated_container['title'];
?>
</h2>
<?php
if ($concentrated_container['text']) :
?>
<div class="text text-2 mob-text-2">
<p>
<?php
echo $concentrated_container['text'];
?>
</p>
</div>
<?php
endif;
?>
</div>
</div>
<?php
endif;
?>
<?php
$juices_concentrat_container = get_field('juices-concentrat-container');
if ($juices_concentrat_container['title']) :
?>
<div class="brands-list" id="<?php echo $juices_concentrat_container['ID']; ?>">
<h3 class="title-3 mob-title-2">
<?php echo $juices_concentrat_container['title']; ?>
</h3>
<?php
if ($juices_concentrat_container['brand-list']):
?>
<ul class="brands-list__list">
<?php
foreach($juices_concentrat_container['brand-list'] as $item) :
$brand_container = get_field('brand-container', $item);
$logo = $brand_container['logo']['color'];
$brand_permalink = get_field('brand-permalink', $item);
$target = '';
$hover_button = get_field("hover-button-{$current_lang}", 'option');
$brand_link_type = $brand_permalink['permalink_type'];
$without_hover = false;
if ($brand_link_type == 'custom') {
$brand_permalink = $brand_permalink['link']['url'];
$target = 'target="_blank"';
$hover_button_text = $hover_button['external'];
} elseif ($brand_link_type == 'default') {
$brand_permalink = get_the_permalink($item);
$hover_button_text = $hover_button['internal'];
} else {
$brand_permalink = get_field('brand-permalink', $item);
$hover_button_text = 'class="-withour-hover"';
$without_hover = true;
}
if ($logo && $brand_permalink) :
?>
<li data-brand-hover="<?php if (!$without_hover) echo $hover_button_text; ?>">
<?php
if ($brand_link_type != 'none') :
?>
<a href="<?php echo $brand_permalink; ?>" <?php echo $target; if ($without_hover) echo $hover_button_text;?> >
<?php
else :
?>
<div <?php echo $hover_button_text;?> >
<?php
endif;
if ($brand_container['own-brand']) :
?>
<span data-text="<?php the_field("own-sticker-text-{$current_lang}", "option")?>"></span>
<?php
endif;
?>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $logo['url']; ?>" alt="<?php echo $logo['alt']; ?>" />
<?php
if ($brand_link_type == 'none') echo '</div>'; else echo '</a>';
?>
</li>
<?php
endif;
endforeach;
?>
</ul>
<?php
endif;
?>
</div>
<?php
endif;
?>
<?php
$fruits_container = get_field('fruits-container');
if ($fruits_container['title']) :
?>
<div class="puree-product__tastes-container" id="<?php echo $fruits_container['ID']; ?>">
<ul
class="
puree-product__tastes-fruits
text-5
mob-text-4
--extrabold
--uppercase
"
>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/peach.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Персик';
} else {
echo 'Peach';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/apricot.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Абрикос';
} else {
echo 'Apricot';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/pumpkin.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Гарбуз';
} else {
echo 'Pumpkin';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/apple.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Яблуко';
} else {
echo 'Apple';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/carrot.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Морква';
} else {
echo 'Carrot';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/strawberry.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Полуниця';
} else {
echo 'Strawberry';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/blackberry.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Ожина';
} else {
echo 'Blackberry';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/pear.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Груша';
} else {
echo 'Pear';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/cranberry.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Журавлина';
} else {
echo 'Cranberry';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/cherry.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Вишня';
} else {
echo 'Cherry';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/raspberry.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Малина';
} else {
echo 'Raspberry';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/blackcurrant.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Чорна <br /> смородина';
} else {
echo 'Blackberry';
}
?>
</span>
</li>
<li>
<div>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo get_template_directory_uri(); ?>/assets/images/fruits/bilberry.png" alt="icon-taste" />
</div>
<span>
<?php
if ($current_lang == 'uk') {
echo 'Чорниця';
} else {
echo 'Bilberry';
}
?>
</span>
</li>
</ul>
<div class="puree-product__tastes">
<h3 class="title-3 mob-title-2">
<?php echo $fruits_container['title']; ?>
</h3>
<?php
$button = getLink($fruits_container['button']);
if ($button['displayed']) :
?>
<div class="button-container -center">
<a
href="<?php echo $button['url']; ?>"
target="_blank"
class="default-button text-3 mob-text-3 -rectangular"
>
<?php echo $button['title']; ?>
</a>
</div>
<?php
endif;
?>
</div>
</div>
<?php
endif;
?>
</div>
</div>
<div class="puree-product__wave-bottom --noise-bg">
<svg class="svg-wave" xmlns="http://www.w3.org/2000/svg">
<clipPath
id="puree-product__wave-bottom"
clipPathUnits="objectBoundingBox"
>
<path
d="M0.958,0.661 L1,0.562 V0 L0,0 V1 L0.042,0.854 C0.083,0.708,0.167,0.416,0.25,0.294 C0.333,0.172,0.417,0.219,0.5,0.389 C0.583,0.562,0.667,0.854,0.75,0.905 C0.833,0.952,0.917,0.756,0.958,0.661"
></path>
</clipPath>
</svg>
</div>
</section>
<?php
$water_container = get_field('water-container');
if ($water_container['title']) :
?>
<section class="default-info-block -reverse" id="<?php echo $water_container['ID']; ?>">
<div class="container animation -swim-top">
<div class="default-info-block__inner">
<?php
if ($water_container['img']) :
?>
<div class="default-info-block__img">
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $water_container['img']['url']; ?>" alt="<?php echo $water_container['img']['alt']; ?>" />
</div>
<?php
endif;
?>
<div class="default-info-block__content">
<h2 class="title-2 mob-title-2"><?php echo $water_container['title']; ?></h2>
<?php
if ($water_container['text']):
?>
<div class="text text-2 mob-text-2">
<?php
echo $water_container['text'];
?>
</div>
<?php
endif;
// $water_button = getLink($water_container['button']);
// if ($water_button['displayed']):
?>
<!-- <div class="button-container">
<a
href="<?php// echo $water_button['url']; ?>"
target="_blank"
class="default-button text-3 mob-text-3 -rectangular -target"
>
<?php// echo $water_button['title']; ?>
</a>
</div> -->
<?php
// endif;
?>
</div>
</div>
</div>
</section>
<?php
endif;
?>
<?php
$preferences_container = get_field('preferences-container');
if ($preferences_container['preferences-list']) :
?>
<section class="product-advantages" id="<?php echo $preferences_container['ID']; ?>">
<div class="container animation -swim-top">
<ul class="product-advantages__list">
<?php
foreach($preferences_container['preferences-list'] as $item) :
if ($item['title']) :
?>
<li class="product-advantages__item">
<?php
if ($item['img']) :
?>
<div class="product-advantages__item-preview">
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $item['img']['url']; ?>" alt="<?php echo $item['img']['alt']; ?>" />
</div>
<?php
endif;
?>
<h2 class="title text-1 mob-text-1 --extrabold">
<?php
echo $item['title'];
?>
</h2>
<?php
if ($item['text']) :
?>
<div class="text text-3 mob-text-3">
<p>
<?php echo $item['text']; ?>
</p>
</div>
<?php
endif;
?>
</li>
<?php
endif;
endforeach;
?>
</ul>
</div>
</section>
<?php
endif;
?>
<?php
$water_brand_container = get_field('water-brand-container');
if ($water_brand_container['title']) :
?>
<section class="brands-list" id="<?php echo $water_brand_container['ID']; ?>">
<div class="container animation -swim-top">
<div class="brands-list__inner">
<h2 class="title-3 mob-title-2"><?php echo $water_brand_container['title']; ?></h2>
<?php
if ($water_brand_container['brand-list']):
?>
<ul class="brands-list__list">
<?php
foreach($water_brand_container['brand-list'] as $item) :
$brand_container = get_field('brand-container', $item);
$logo = $brand_container['logo']['color'];
$brand_permalink = get_field('brand-permalink', $item);
$target = '';
$hover_button = get_field("hover-button-{$current_lang}", 'option');
$brand_link_type = $brand_permalink['permalink_type'];
$without_hover = false;
if ($brand_link_type == 'custom') {
$brand_permalink = $brand_permalink['link']['url'];
$target = 'target="_blank"';
$hover_button_text = $hover_button['external'];
} elseif ($brand_link_type == 'default') {
$brand_permalink = get_the_permalink($item);
$hover_button_text = $hover_button['internal'];
} else {
$brand_permalink = get_field('brand-permalink', $item);
$hover_button_text = 'class="-withour-hover"';
$without_hover = true;
}
if ($logo && $brand_permalink) :
?>
<li data-brand-hover="<?php if (!$without_hover) echo $hover_button_text; ?>">
<?php
if ($brand_link_type != 'none') :
?>
<a href="<?php echo $brand_permalink; ?>" <?php echo $target; if ($without_hover) echo $hover_button_text;?> >
<?php
else :
?>
<div <?php echo $hover_button_text;?> >
<?php
endif;
if ($brand_container['own-brand']) :
?>
<span data-text="<?php the_field("own-sticker-text-{$current_lang}", "option")?>"></span>
<?php
endif;
?>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $logo['url']; ?>" alt="<?php echo $logo['alt']; ?>" />
<?php
if ($brand_link_type == 'none') echo '</div>'; else echo '</a>';
?>
</li>
<?php
endif;
endforeach;
?>
</ul>
<?php
endif;
?>
</div>
</div>
</section>
<?php
endif;
?>
<?php
$tm_container = get_field('tm-container');
?>
<section class="default-info-block -bigger-img" id="<?php echo $tm_container['ID']; ?>">
<div class="container animation -swim-top">
<?php
if ($tm_container['title']) :
?>
<div class="default-info-block__inner">
<?php
if ($tm_container['img']) :
?>
<div class="default-info-block__img">
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $tm_container['img']['url']; ?>" alt="<?php echo $tm_container['img']['alt']; ?>" />
</div>
<?php
endif;
?>
<div class="default-info-block__content">
<h2 class="title title-3 mob-title-2"><?php echo $tm_container['title']; ?></h2>
<?php
if ($tm_container['text']):
?>
<div class="text text-2 mob-text-2">
<?php
echo $tm_container['text'];
?>
</div>
<?php
endif;
?>
</div>
</div>
<?php
endif;
if ($tm_container['point-list']) :
?>
<div class="default-info-block__point-list">
<?php
foreach($tm_container['point-list'] as $item) :
if ($item['img'] && $item['description']) :
?>
<div class="default-info-block__point">
<div class="img">
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $item['img']['url']; ?>" alt="<?php echo $item['img']['alt']; ?>">
</div>
<p class="text text-3 mob-text-3">
<?php echo $item['description']; ?>
</p>
</div>
<?php
endif;
endforeach;
?>
</div>
<?php
endif;
?>
</div>
</section>
<?php
$package_container_water = get_field('package-container-water');
if ($package_container_water['title'] && $package_container_water['package-repeater']) {
$args = [];
$args['container'] = $package_container_water;
$args['blue'] = '-blue';
get_template_part('template-parts/package-card-block', null, $args);
}
?>
<?php
$delivery_container = get_field('delivery-container');
?>
<section class="default-info-block -bigger-img -reverse" id="<?php echo $delivery_container['ID']; ?>">
<div class="container animation -swim-top">
<?php
if ($delivery_container['title']) :
?>
<div class="default-info-block__inner">
<?php
if ($delivery_container['img']) :
?>
<div class="default-info-block__img">
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $delivery_container['img']['url']; ?>" alt="<?php echo $delivery_container['img']['alt']; ?>" />
</div>
<?php
endif;
?>
<div class="default-info-block__content">
<h2 class="title title-3 mob-title-2"><?php echo $delivery_container['title']; ?></h2>
<?php
if ($delivery_container['text']):
?>
<div class="text text-2 mob-text-2">
<?php
echo $delivery_container['text'];
?>
</div>
<?php
endif;
$delivery_button = getLink($delivery_container['button']);
if ($delivery_button['displayed']):
?>
<div class="button-container">
<a
href="<?php echo $delivery_button['url']; ?>"
target="_blank"
class="default-button text-3 mob-text-3 -rectangular -target"
>
<?php echo $delivery_button['title']; ?>
</a>
</div>
<?php
endif;
?>
</div>
</div>
<?php
endif;
?>
</div>
</section>
<?php
$soda_container = get_field('soda-container');
?>
<section class="default-info-block -smaller-img" id="<?php echo $soda_container['ID']; ?>">
<div class="container animation -swim-top">
<?php
if ($soda_container['title']) :
?>
<div class="default-info-block__inner">
<?php
if ($soda_container['img']) :
?>
<div class="default-info-block__img">
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $soda_container['img']['url']; ?>" alt="<?php echo $soda_container['img']['alt']; ?>" />
</div>
<?php
endif;
?>
<div class="default-info-block__content">
<h2 class="title title-2 mob-title-2"><?php echo $soda_container['title']; ?></h2>
<?php
if ($soda_container['text']):
?>
<div class="text text-2 mob-text-2">
<?php
echo $soda_container['text'];
?>
</div>
<?php
endif;
?>
</div>
</div>
<?php
endif;
?>
</div>
</section>
<?php
$video_container = get_field('video-container');
if ($video_container['video-link']) :
?>
<section class="default-video-section">
<div class="container">
<div
class="video-block animation -hover-container -swim-top"
data-src="<?php echo $video_container['video-link']['url']; ?>"
>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $video_container['video_preview']['url']; ?>" alt="<?php echo $video_container['video_preview']['alt']; ?>" />
<div class="default-button"></div>
</div>
</div>
</section>
<?php
endif;
?>
<?php
$soda_brand_container = get_field('soda-brand-container');
if ($soda_brand_container['title']) :
?>
<section class="brands-list" id="<?php echo $soda_brand_container['ID']; ?>">
<div class="container animation -swim-top">
<div class="brands-list__inner">
<h2 class="title-3 mob-title-2"><?php echo $soda_brand_container['title']; ?></h2>
<?php
if ($soda_brand_container['brand-list']):
?>
<ul class="brands-list__list">
<?php
foreach($soda_brand_container['brand-list'] as $item) :
$brand_container = get_field('brand-container', $item);
$logo = $brand_container['logo']['color'];
$brand_permalink = get_field('brand-permalink', $item);
$target = '';
$hover_button = get_field("hover-button-{$current_lang}", 'option');
$brand_link_type = $brand_permalink['permalink_type'];
$without_hover = false;
if ($brand_link_type == 'custom') {
$brand_permalink = $brand_permalink['link']['url'];
$target = 'target="_blank"';
$hover_button_text = $hover_button['external'];
} elseif ($brand_link_type == 'default') {
$brand_permalink = get_the_permalink($item);
$hover_button_text = $hover_button['internal'];
} else {
$brand_permalink = get_field('brand-permalink', $item);
$hover_button_text = 'class="-withour-hover"';
$without_hover = true;
}
if ($logo && $brand_permalink) :
?>
<li data-brand-hover="<?php if (!$without_hover) echo $hover_button_text; ?>">
<?php
if ($brand_link_type != 'none') :
?>
<a href="<?php echo $brand_permalink; ?>" <?php echo $target; if ($without_hover) echo $hover_button_text;?> >
<?php
else :
?>
<div <?php echo $hover_button_text;?> >
<?php
endif;
if ($brand_container['own-brand']) :
?>
<span data-text="<?php the_field("own-sticker-text-{$current_lang}", "option")?>"></span>
<?php
endif;
?>
<img class="--lazyload" srcset="<?php echo $srcset; ?>" src="<?php echo $logo['url']; ?>" alt="<?php echo $logo['alt']; ?>" />
<?php
if ($brand_link_type == 'none') echo '</div>'; else echo '</a>';
?>
</li>
<?php
endif;
endforeach;
?>
</ul>
<?php
endif;
?>
</div>
</div>
</section>
<?php
endif;
?>
<?php
$package_container_soda = get_field('package-container-soda');
if ($package_container_soda['title'] && $package_container_soda['package-repeater']) {
$args = [];
$args['container'] = $package_container_soda;
get_template_part('template-parts/package-card-block', null, $args);
}
?>
<?php
get_footer();
?>