123 lines
6.4 KiB
PHP
123 lines
6.4 KiB
PHP
<?php
|
|
global $tp;
|
|
global $chirkashi;
|
|
|
|
if(!isset($text_block) && empty($text_block)) {
|
|
$text_block = get_field('text_block');
|
|
}
|
|
|
|
$borders = array();
|
|
|
|
?>
|
|
|
|
<?php if(empty($text_block['hide_block'])) : ?>
|
|
|
|
<div class="textblock fw fw-container <?php if(!empty($text_block['bg']) && $text_block['bg'] == 1) : ?> textblock_bg<?php endif; ?> <?php if(!empty($custom_class)) : echo $custom_class; endif; ?> <?php if(!empty($addclass)) : echo $addclass; endif; ?>">
|
|
<div class="textblock__wrapper wrapper">
|
|
<?php if(!empty($text_block['title']) || !empty($text_block['subtitle']['text'])) : ?>
|
|
<h2 class="textblock__title title">
|
|
<?php if(!empty($text_block['title'])) : ?>
|
|
<span class="title-text"><?php echo $text_block['title']; ?></span>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($text_block['subtitle']['text'])) : ?>
|
|
<span class="subtitle-text textblock__subtitle subtitle <?php if($text_block['subtitle']['cursive']) : ?>subtitle_paint<?php endif; ?>"><?php echo $text_block['subtitle']['text']; ?></span>
|
|
<?php endif; ?>
|
|
</h2>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($text_block['list'])) : ?>
|
|
<?php foreach($text_block['list'] as $l) : ?>
|
|
<div class="textblock__container
|
|
<?php if($l['swap_position'] == 1) : ?> textblock__container_swap<?php endif; ?>
|
|
<?php if($l['in_row'] == 1) : ?> textblock__container_row<?php endif; ?>
|
|
<?php if($l['floated'] == 1) : ?> textblock__container_floated<?php endif; ?>
|
|
<?php if($l['align_center'] == 1) : ?> textblock__container_ac<?php endif; ?>
|
|
">
|
|
<?php if(!empty($l['image']) || !empty($l['video'])) : ?>
|
|
<div class="textblock__image textblock__block">
|
|
|
|
<?php if(!empty($l['video'])) : ?>
|
|
<div class="textblock__video video-wrap">
|
|
<div class="textblock__video-btn play-button"></div>
|
|
<?php echo $l['video']; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($l['image'])) : ?>
|
|
<?php foreach($l['image'] as $i) : ?>
|
|
<div class="image-border-wrap">
|
|
<?php
|
|
$borders['desktop'] = $l['borders_desktop'];
|
|
$borders['mobile'] = $l['borders_mobile'];
|
|
|
|
set_query_var('borders', $borders);
|
|
get_template_part('partials/borders');
|
|
?>
|
|
|
|
<img src="<?php echo $i['url']; ?>" alt="<?php echo (!empty($l['title']) ? $l['title'] : $text_block['title']); ?>" />
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($l['image_description'])) : ?>
|
|
<div class="textblock__image-description description"><?php echo $l['image_description']; ?></div>
|
|
<?php endif; ?>
|
|
<?php if(!empty($l['button']['url']) && ($l["button"]["title"] == "Nous Rejoindre" || $custom_class == "notre-politique")) : ?>
|
|
<a class="textblock__info-btn btn"
|
|
href="<?php echo $l['button']['url']; ?>"
|
|
target="<?php echo $l['button']['target'] ?>"
|
|
title="<?php echo $l['button']['title']; ?>"
|
|
<?php if($l['button_icon'] == 'btn__icon_dl') : ?> download<?php endif; ?>
|
|
>
|
|
<?php echo $l['button']['title']; ?>
|
|
<i class="btn__icon <?php echo $l['button_icon']; ?>"></i>
|
|
</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="textblock__info textblock__block">
|
|
<?php if(!empty($l['title'])) : ?>
|
|
<h3 class="textblock__info-title subtitle"><?php echo $l['title']; ?></h3>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($l['text'])) : ?>
|
|
<div class="textblock__info-description description <?php if($l['quote'] == 1) : ?> quote__text<?php endif; ?>">
|
|
<?php if($l['quote'] == 1) : ?>
|
|
<?php echo strip_tags($l['text']); ?>
|
|
<?php else : ?>
|
|
<?php echo $l['text']; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($l['quote_author']) && $l['quote'] == 1) : ?>
|
|
<div class="textblock__info-author quote__author"><?php echo $l['quote_author']; ?></div>
|
|
<?php endif; ?>
|
|
<?php if(!empty($l['button']['url']) && $l["button"]["title"] != "Nous Rejoindre" && $custom_class != "notre-politique") : ?>
|
|
<a class="textblock__info-btn btn"
|
|
href="<?php echo $l['button']['url']; ?>"
|
|
target="<?php echo $l['button']['target'] ?>"
|
|
title="<?php echo $l['button']['title']; ?>"
|
|
<?php if($l['button_icon'] == 'btn__icon_dl') : ?> download<?php endif; ?>
|
|
>
|
|
<?php echo $l['button']['title']; ?>
|
|
<i class="btn__icon <?php echo $l['button_icon']; ?>"></i>
|
|
</a>
|
|
<?php endif; ?>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
<?php
|
|
set_query_var('custom_class', null);
|
|
set_query_var('addclass', null);
|
|
set_query_var('text_block', null);
|
|
?>
|