78 lines
3.9 KiB
PHP
78 lines
3.9 KiB
PHP
<?php
|
|
global $tp;
|
|
global $chirkashi;
|
|
?>
|
|
|
|
<?php if(!empty($text_block_list)) : ?>
|
|
<div class="textblock">
|
|
<div class="textblock__wrapper">
|
|
<?php foreach($text_block_list as $t) : ?>
|
|
<div class="textblock__container accordeon_container
|
|
<?php if($t['swap_position'] == 1) : ?> textblock__container_swap<?php endif; ?>
|
|
<?php if($t['in_row'] == 1) : ?> textblock__container_row<?php endif; ?>
|
|
<?php if($t['floated'] == 1) : ?> textblock__container_floated<?php endif; ?>
|
|
<?php if($t['align_center'] == 1) : ?> textblock__container_ac<?php endif; ?>
|
|
">
|
|
<?php if(!empty($t['image']) || !empty($t['video'])) : ?>
|
|
<div class="textblock__image textblock__block">
|
|
|
|
<?php if(!empty($t['video'])) : ?>
|
|
<div class="textblock__video video-wrap">
|
|
<div class="textblock__video-btn play-button"></div>
|
|
<video preload="metadata" width="596" height="365">
|
|
<source src="<?php echo $t['video']; ?>">
|
|
</video>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($t['image'])) : ?>
|
|
<?php foreach($t['image'] as $i) : ?>
|
|
<div class="image-border-wrap">
|
|
<?php if(!empty($t['borders_desktop'])) : ?>
|
|
<?php foreach($t['borders_desktop'] as $bd_key => $bd_val) : ?>
|
|
<?php if($bd_val) : ?>
|
|
<div class="textblock__image-border image-border image-border_desktop image-border_<?php echo $bd_key; ?>">
|
|
<?php echo $chirkashi[$bd_key]; ?>
|
|
</div>
|
|
<?php endif ?>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($t['borders_mobile'])) : ?>
|
|
<?php foreach($t['borders_mobile'] as $bm_key => $bm_val) : ?>
|
|
<?php if($bm_val) : ?>
|
|
<div class="textblock__image-border image-border image-border_mobile image-border_<?php echo $bm_key; ?>">
|
|
<?php echo $chirkashi[$bm_key]; ?>
|
|
</div>
|
|
<?php endif ?>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
<img src="<?php echo $i['url']; ?>" alt="<?php echo (!empty($t['title']) ? $t['title'] : ' '); ?>" />
|
|
</div>
|
|
<?php endforeach; ?>
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div class="textblock__info textblock__block">
|
|
<?php if(!empty($t['title'])) : ?>
|
|
<div class="textblock__info-title subtitle"><?php echo $t['title']; ?></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($t['text'])) : ?>
|
|
<div class="textblock__info-description description"><?php echo $t['text']; ?></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if(!empty($t['button']['url'])) : ?>
|
|
<a class="textblock__info-btn btn" href="<?php echo $t['button']['url']; ?>" title="<?php echo $t['button']['title']; ?>">
|
|
<?php echo $t['button']['title']; ?>
|
|
<i class="btn__icon <?php echo $t['button_icon']; ?>"></i>
|
|
</a>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|