header.php 8.86 KB
<?
global $APPLICATION;
global $USER;
?><!DOCTYPE html>
<!--[if IE 9]>         <html class="no-js ie ie9 lt-ie10"><![endif]-->
<!--[if gt IE 9]><!--> <html class="no-js no-mini"><!--<![endif]-->
<head lang="ru">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta charset="UTF-8">
	<meta name="format-detection" content="telephone=no">

	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

	<title><? $APPLICATION->ShowTitle(); ?></title>
	<!-- Google Tag Manager -->
	<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
		new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
	j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
	'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-W9G6NXM');</script>
<!-- End Google Tag Manager -->



<script>if (screen.width>768) document.write('<link rel="stylesheet" href="/css/main.css?<?=filemtime(BASE_PATH . '/css/main.css')?>" id="pre_load">');</script>

<script src="/js/modernizr.js" type="text/javascript" async></script>

<?
//    if($USER && $USER->IsAdmin()) {
//        $APPLICATION->ShowHead();
//    } else {
$APPLICATION->ShowMeta('keywords', false, true);
$APPLICATION->ShowMeta('description', false, true);
//    }

if(!isProduction()) echo '<meta name="robots" content="none">';

if ($APPLICATION->GetCurPage() == '/projects/online/') echo '<meta name="robots" content="none">';

?>
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="/img/fav/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/img/fav/apple-touch-icon-114x114.png" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/img/fav/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/img/fav/apple-touch-icon-144x144.png" />
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="/img/fav/apple-touch-icon-60x60.png" />
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/img/fav/apple-touch-icon-120x120.png" />
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="/img/fav/apple-touch-icon-76x76.png" />
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="/img/fav/apple-touch-icon-152x152.png" />
<link rel="icon" type="image/png" href="/img/fav/favicon-196x196.png" sizes="196x196" />
<link rel="icon" type="image/png" href="/img/fav/favicon-96x96.png" sizes="96x96" />
<link rel="icon" type="image/png" href="/img/fav/favicon-128.png" sizes="128x128" />
<meta name="application-name" content="Stroy House"/>
<meta name="msapplication-TileColor" content="#FFFFFF" />
<meta name="msapplication-TileImage" content="/img/fav/mstile-144x144.png" />
<meta name="msapplication-square70x70logo" content="/img/fav/mstile-70x70.png" />
<meta name="msapplication-square150x150logo" content="/img/fav/mstile-150x150.png" />
<meta name="msapplication-wide310x150logo" content="/img/fav/mstile-310x150.png" />
<meta name="msapplication-square310x310logo" content="/img/fav/mstile-310x310.png" />

<!-- Facebook Pixel Code -->
<script>
	!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
		n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
		n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
		t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
			document,'script','https://connect.facebook.net/en_US/fbevents.js');
		fbq('init', '1561387797525188');
		fbq('track', 'PageView');
	</script>
	<noscript><img height="1" width="1" style="display:none"
		src="https://www.facebook.com/tr?id=1561387797525188&ev=PageView&noscript=1&quot;
		/></noscript>
		<!-- DO NOT MODIFY -->
		<!-- End Facebook Pixel Code -->

	</head>
	<body class="<? $APPLICATION->ShowProperty('BODY_CLASS') ?>">
		<!-- Google Tag Manager (noscript) -->
		<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W9G6NXM"
			height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
			<!-- End Google Tag Manager (noscript) -->

			<script>if (screen.width<=768) document.body.style.display="none";</script>
			<?//$APPLICATION->ShowPanel()?>

			<div class="container<?$APPLICATION->ShowProperty('CONTAINER_CLASS_TOP', ' _top')?> <?$APPLICATION->ShowProperty('CONTAINER_EXTRA_CLASS')?>">
				<header class="header">
					<? if($APPLICATION->GetCurPage() !== SITE_DIR) { ?>
					<a href="/" class="logo _header"></a>
					<? } else { ?>
					<div class="logo _header"></div>
					<? } ?>
					<div class="fav-link js-fav-link<? if(!getFaveItems()) { ?> _inactive<? } ?>">
						<a href="#!" class="fav-link-clear js-fav-clear"></a>
						<span class="fav-link-count js-fav-count _inactive">0</span>
						<a href="/projects/fave/" class="fav-link-link"><span class="fav-link-icon"></span></a>
					</div>
					<form class="search-form" method="get" action="/search/" <?if($APPLICATION->GetCurDir()=="/search/"){?> style="width: 670px;" <?}?>>
						<span id='header_search_wrap'>
							<div class="search-from__inner">
                            <input type="text" id='header_search' autocomplete='off' placeholder="Введите название"  name="q" value="<?=$_GET['q']?>"><!--
                        --><!-- <button type="submit" class="search-button"><span class="site-styled-button__span">Найти</span></button> -->
                    </div>
                    <ul id='result_list'></ul>
                    <i class='flaticon-search'></i>
                </span>
            </form>
                              <?
//26.04.2017 Hawks
                              CModule::IncludeModule('nurgush.mobiledetect');

                              $detect = new Nurgush\MobileDetect\Main();
// Для мобыльных
                              if($detect->isMobile() && !$detect->isTablet()){?>


            <span class='mobile_menu_wrap'>
                  <?$APPLICATION->IncludeComponent(
                        "bitrix:menu",
                        "top",
                        Array(
                              "ROOT_MENU_TYPE" => "top",
                              "MAX_LEVEL" => "2",
                              "CHILD_MENU_TYPE" => "sub",
                              "USE_EXT" => "N",
                              "MENU_CACHE_TYPE" => "Y",
                              "MENU_CACHE_TIME" => "3600",
                              "MENU_CACHE_USE_GROUPS" => "N",
                              "MENU_CACHE_GET_VARS" => Array()
                              )
                              );?>
                        </span>
                        <?}else{?>

            <span class='mobile_menu_wrap'>
                  <?$APPLICATION->IncludeComponent(
                        "bitrix:menu",
                        "top_new",
                        Array(
                              "ROOT_MENU_TYPE" => "top",
                              "MAX_LEVEL" => "2",
                              "CHILD_MENU_TYPE" => "sub",
                              "USE_EXT" => "N",
                              "MENU_CACHE_TYPE" => "Y",
                              "MENU_CACHE_TIME" => "3600",
                              "MENU_CACHE_USE_GROUPS" => "N",
                              "MENU_CACHE_GET_VARS" => Array()
                              )
                              );?>
                        </span>
                        <a href="https://stroy.basecamphq.com/login" class="secret-button" target="_blank" rel="nofollow"></a>

                        <?}?>

            	</header>

            	<?$APPLICATION->AddBufferContent(function() {
            		global $APPLICATION;
            		if($APPLICATION->GetProperty('HIDE_PAGE_HEAD')) return '';
            		$APPLICATION->IncludeComponent('cpeople:page.head.pic', '');
            		ob_start(); ?>
            		<div class="page-head <?=$APPLICATION->GetProperty('PAGE_HEAD_EXTRA_CLASS')?>" <?=$APPLICATION->GetProperty('PAGE_HEAD_PIC_STYLE')?>>
            			<div class="phone">
            				<div class="project js-project">
            					<? include INCLUDE_PATH . 'header-phone.php' ?>
            					<a href="#order_price" class='phone-call js-order-project'>Заказать звонок</a>
            				</div>
            				<?$APPLICATION->IncludeComponent('cpeople:form', 'callback')?>
            			</div>
            			<?= getBreadCrumbsHtml() ?>

            			<?=$APPLICATION->GetProperty('PAGE_HEAD_EXTRA_CONTENT')?>
            		</div>
            		<? return ob_get_clean();
            	}); ?>

            	<?$APPLICATION->AddBufferContent(function() {
            		global $APPLICATION;
            		$result = '';
            		if(!$APPLICATION->GetProperty('HIDE_PAGE_CONTENT')) $result .= '<div class="page-content">';
            		if(!$APPLICATION->GetProperty('HIDE_CENTRING_WRAP')) $result .= '<div class="centering">';
            		return $result;
            	})?>