2022-06-24 11:34:47 +03:00

47 lines
1.7 KiB
PHP

<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
/** @var array $arParams */
/** @var array $arResult */
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponentTemplate $this */
/** @var string $templateName */
/** @var string $templateFile */
/** @var string $templateFolder */
/** @var string $componentPath */
/** @var CBitrixComponent $component */
$this->setFrameMode(true);
?>
<div id="special_slider">
<div class="special_list swiped">
<? foreach($arResult['BANNERS'] AS $banner): ?>
<div class="special_item">
<a href="<?= $banner['PROPERTIES']['OFFER']['RELATED']['DETAIL_PAGE_URL']; ?>">
<span class="special_name"><?= $banner['NAME']; ?></span>
<span class="special_desc"><?= $banner['PREVIEW_TEXT']; ?></span>
<span class="special_link">Подробнее</span>
</a>
<img src="<?= $banner['PREVIEW_PICTURE']; ?>" alt="<?= $banner['NAME']; ?>"/>
</div>
<? endforeach; ?>
</div>
<? if(count($arResult['BANNERS']) > 2): ?>
<div class="special_arrows">
<button class="prev">
<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="https://www.w3.org/2000/svg">
<path d="M7 11L1 6L6.25 1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</button>
<button class="next">
<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="https://www.w3.org/2000/svg">
<path d="M1 1L7 6L1.75 11" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
</svg>
</button>
</div>
<? endif; ?>
<? if(count($arResult['BANNERS']) == 0): ?>
<div class="disable_space">
<? endif; ?>
</div>