2023-02-08 20:57:38 +03:00

120 lines
4.6 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);
?>
<script>
$(".car_top_card").on("click", function()
{
$(".car_top_description").css("display", "none");
$(".car_top_description_"+$(this).attr("data-id")).css("display", "flex");
});
</script>
<section data-page>
<div class="container">
<ul class="breadcrumbs">
<li></li>
</ul>
<h1 class="section_title"><?= $arResult['NAME']; ?></h1>
<div class="special_detail">
<div class="special_offer">
<?= isset($arResult['PROPERTIES']['CONTENT_HEADER']['~VALUE']['TEXT']) ? $arResult['PROPERTIES']['CONTENT_HEADER']['~VALUE']['TEXT'] : ""; ?>
<a href="#order" class="button button-blue">Отправить заявку</a>
<img src="<?= $arResult['DETAIL_PICTURE']; ?>" alt="<?= $arResult['NAME']; ?>" />
</div>
<div class="special_offer-text">
<?= isset($arResult['PROPERTIES']['CONTENT_TOP']['~VALUE']['TEXT']) ? $arResult['PROPERTIES']['CONTENT_TOP']['~VALUE']['TEXT'] : ""; ?>
</div>
<div class="leasing_offer">
<? if(count($arResult['PROPERTIES']['CARS']['RELATED']) > 0): ?>
<div class="title_wrapper">
<div class="left">
<h3>Лизинговые предложения</h3>
</div>
<div class="right leasing_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>
</div>
<div id="leasing_slider">
<div class="leasing_list swiped">
<? for($i = 0; $i < count($arResult['PROPERTIES']['CARS']['RELATED']); $i++): ?>
<? $car = $arResult['PROPERTIES']['CARS']['RELATED'][$i]; ?>
<div class="leasing_item">
<a class="item_wrapper car_top_card" data-id="<?= $i; ?>" style="cursor: pointer;">
<img src="<?= $car['PREVIEW_PICTURE']; ?>" alt="<?= $car['NAME']; ?>" />
<span class="leasing_model"><?= $car['NAME']; ?></span>
<span class="leasing_desc"><?= $car['PROPERTIES']['TAGLINE']['VALUE']; ?></span>
</a>
</div>
<? endfor; ?>
</div>
</div>
<? endif; ?>
<a id="leasing_offer_car"></a>
<? for($i = 0; $i < count($arResult['PROPERTIES']['CARS']['RELATED']); $i++): ?>
<div class="leasing_offer-detail car_top_description car_top_description_<?= $i; ?>" style="display: <?= $i == 0 ? "flex" : "none"; ?>;">
<div id="single_slider" class="image_slider">
<div class="slider_list">
<? foreach($arResult['PROPERTIES']['CARS']['RELATED'][$i]['PROPERTIES']['PHOTOS']['VALUE'] AS $photo_url): ?>
<div class="slide">
<img src="<?= $photo_url; ?>" alt="<?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['NAME']; ?>" />
</div>
<? endforeach; ?>
</div>
<div class="slider_dots">
<script type="text/template" id="embla-dot-template">
<button class="embla__dot" type="button"></button>
</script>
</div>
</div>
<div class="offer_desc">
<p class="offer_name"><?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['NAME']; ?></p>
<?= $arResult['PROPERTIES']['CARS']['RELATED'][$i]['PREVIEW_TEXT']; ?>
<a href="#order" class="button button-blue">Отправить заявку</a>
</div>
</div>
<? endfor; ?>
</div>
<div class="aside_container">
<article>
<div class="special_offer-text">
<?= $arResult['DETAIL_TEXT']; ?>
</div>
<? /*<div class="info_column">
<?= $arResult['DETAIL_TEXT']; ?>
</div>
*/ ?>
<div class="dropdown_blocks_list">
<div class="dropdown_block">
<div class="block_header">
<p>Условия спецпредложения</p>
<button class="block_toggle"></button>
</div>
<div class="block_body">
<?= $arResult['PROPERTIES']['RULES']['~VALUE']['TEXT']; ?>
</div>
</div>
</div>
</article>
</div>
</div>
</div>
</section>