<?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);

$markup_content = [ 
	"@context" => "https://schema.org", 
	"@type" => "NewsArticle", 
	"headline" => $arResult['NAME'], 
	"image" => [ 
		"https://".SITE_SERVER_NAME.$arResult['DETAIL_PICTURE'], 
	], 
	"datePublished" => FormatDate(DATE_W3C, MakeTimeStamp($arResult['ACTIVE_FROM'])), 
	"dateModified" => FormatDate(DATE_W3C, MakeTimeStamp($arResult['ACTIVE_FROM'])), 
	"author" => [ 
		[ 
			"@type" => "Organization", 
			"name" => "Эволюция Автолизинга", 
			"url" => "https://".SITE_SERVER_NAME."/", 
		], 
	], 
];
$APPLICATION->AddHeadString('<script type="application/ld+json">'.json_encode($markup_content).'</script>', false, "AFTER_JS");
?>
<section data-page>
	<div class="container">
		<p class="section_title">Новость</p>
		<div class="news_container" id="news_article">
			<div class="image">
				<div class="advwrapper">
					<img src="<?= $arResult['DETAIL_PICTURE']; ?>" alt="<?= $arResult['NAME']; ?>" />
					<? if(!isset($_GET['advertise']) && $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']): ?>
						<div class="advblock adv_button_news adv_button_news_article">Реклама
							<div class="adv_content">ООО "ЛК Эволюция"</div>
							<div class="adv_content">ИНН 9724016636</div>
							<div class="adv_content">erid: <?= $arResult['PROPERTIES']['ADVERTISING_ERIR']['VALUE']; ?></div>
						</div>
					<? endif; ?>
				</div>
			</div>
			<h1><?= $arResult['NAME']; ?></h1>
			<date class="date"><?= FormatDate("d F Y", MakeTimeStamp($arResult['ACTIVE_FROM'])); ?></date>
			<?= $arResult['DETAIL_TEXT']; ?>

			<? $APPLICATION->IncludeComponent("bitrix:main.share", "evolution", Array(
				"HIDE" => "N",	// Скрыть панель закладок по умолчанию
					"HANDLERS" => array(	// Используемые соц. закладки и сети
						"facebook",
						"vk",
					),
					"PAGE_URL" => "https://".$_SERVER['SERVER_NAME'].$arResult["DETAIL_PAGE_URL"],	// URL страницы относительно корня сайта
					"PAGE_TITLE" => $arResult["NAME"],	// Заголовок страницы
				),
				false
			); ?>
		</div>
	</div>
</section>