You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
176 lines
6.5 KiB
176 lines
6.5 KiB
<?
|
|
wp_head();
|
|
global $site_work_mode;
|
|
global $main_host;
|
|
?>
|
|
<?php
|
|
global $woocommerce; ?>
|
|
|
|
|
|
<?if($site_work_mode == 'production'):?>
|
|
<!-- Yandex.Metrika counter -->
|
|
<script type="text/javascript" >
|
|
(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
|
|
m[i].l=1*new Date();
|
|
for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
|
|
k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
|
|
(window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
|
|
|
|
ym(96481053, "init", {
|
|
clickmap:true,
|
|
trackLinks:true,
|
|
accurateTrackBounce:true
|
|
});
|
|
</script>
|
|
<noscript><div><img src="https://mc.yandex.ru/watch/96481053" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
|
<!-- /Yandex.Metrika counter -->
|
|
<script>
|
|
mindbox = window.mindbox || function() { mindbox.queue.push(arguments); };
|
|
mindbox.queue = mindbox.queue || [];
|
|
mindbox('create');
|
|
</script>
|
|
<script src="https://api.mindbox.ru/scripts/v1/tracker.js" async></script>
|
|
<?else:?>
|
|
<? // GP| Замена относительных ссылок изображений, на абсолютные к боевому сайту?>
|
|
|
|
|
|
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
document.querySelectorAll('img').forEach(img => {
|
|
var str = img.attributes['src'].value.replace('<?=$_SERVER['SERVER_NAME']?>', '<?=$main_host?>')
|
|
checkImage(str, function(){ img.attributes['src'].value = str });
|
|
if (img.attributes['srcset']){
|
|
img.attributes['srcset'].value = img.attributes['srcset'].value.replace('cosmopet.good-production.xyz', '<?=$main_host?>')
|
|
}
|
|
})
|
|
});
|
|
|
|
function checkImage(imageSrc, good) {
|
|
var img = new Image();
|
|
img.onload = good;
|
|
img.src = imageSrc;
|
|
}
|
|
</script>
|
|
|
|
|
|
|
|
<?endif;?>
|
|
<style>
|
|
/* Header start */
|
|
.header{
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
z-index: 10;
|
|
width: 100%;
|
|
padding: 24px 0;
|
|
}
|
|
.header .header_block{
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 30px;
|
|
position: static;
|
|
}
|
|
.header .header_navs{
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 14px;
|
|
}
|
|
|
|
.header_navs .header_nav{
|
|
opacity: .5;
|
|
white-space: nowrap;
|
|
font-size: 17px;
|
|
line-height: 24px;
|
|
color: var(--creme-white, #F4F1F0);
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
/* .header_navs .header_nav,
|
|
.header .header_icon{
|
|
|
|
} */
|
|
/* .header .header_icon:hover */
|
|
.header_navs .header_nav:hover
|
|
{
|
|
opacity: 1;
|
|
}
|
|
|
|
.header_bars{
|
|
display: none;
|
|
}
|
|
.header .header_logo .logo{
|
|
height: 44px;
|
|
}
|
|
.header .logo--color{
|
|
display: none;
|
|
}
|
|
.header_close{
|
|
display: none;
|
|
max-width: fit-content;
|
|
margin-left: auto;
|
|
}
|
|
.header .header__icons{
|
|
display: flex;
|
|
gap: 16px;
|
|
}
|
|
/* .header .header__icon .header__icon{
|
|
|
|
} */
|
|
|
|
.header .logo--color,
|
|
.header .header_close,
|
|
.header .cart-icon.icon--color,
|
|
.header .profile-icon.icon--color
|
|
{
|
|
display: none;
|
|
}
|
|
/* Header end */
|
|
</style>
|
|
<div class="wrapper gp-front-page">
|
|
<header class="header">
|
|
<div class="container">
|
|
<div class="header_block">
|
|
<a href="<?php echo home_url() ?>/" class="header_logo">
|
|
<img class="logo logo--white" src="<?= get_template_directory_uri();?>/gp-include/assets/front-page/img/mobile-menu/mobile-menu__logo.svg" alt="">
|
|
<img class="logo logo--color" src="<?= get_template_directory_uri();?>/gp-include/assets/front-page/img/mobile-menu/mobile-menu__logo.svg" alt="">
|
|
</a>
|
|
<div class="header_navs">
|
|
<a href="<?php echo home_url() ?>/" class="header_nav">Главная</a>
|
|
<a href="<?php echo home_url() ?>/produkcziya/" class="header_nav">Продукция</a>
|
|
<a href="<?php echo home_url() ?>/chto-takoe-entoprotein/" class="header_nav">О Сosmopet</a>
|
|
<a href="<?php echo home_url() ?>/proizvodstvo/" class="header_nav">Производство</a>
|
|
<a href="<?php echo home_url() ?>/blog/" class="header_nav">Блог</a>
|
|
|
|
<div class="header-lang">
|
|
<div class="header-lang__c">
|
|
RU
|
|
</div>
|
|
<ul>
|
|
<?php pll_the_languages( array( 'show_flags' => 0, 'show_names' => 1, 'display_names_as' => 'slug' ) ); ?>
|
|
</ul>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="header__icons">
|
|
<a href="my-account" class="header_icon">
|
|
<img class="profile-icon icon--white" src="<?= get_template_directory_uri();?>/gp-include/assets/front-page/img/mobile-menu/mobile-menu__profile-icon.svg" alt="">
|
|
<img class="profile-icon icon--color" src="<?= get_template_directory_uri();?>/gp-include/assets/front-page/img/mobile-menu/mobile-menu__profile-icon.svg" alt="">
|
|
</a>
|
|
<a href="cart" class="header_icon">
|
|
<img class="cart-icon icon--white" src="<?= get_template_directory_uri();?>/gp-include/assets/front-page/img/mobile-menu/mobile-menu__cart-icon.svg" alt="">
|
|
<img class="cart-icon icon--color" src="<?= get_template_directory_uri();?>/gp-include/assets/front-page/img/mobile-menu/mobile-menu__cart-icon.svg" alt="">
|
|
<?php if ($woocommerce->cart->cart_contents_count > 0): ?>
|
|
<span class="basket-btn__counter"><?php echo sprintf($woocommerce->cart->cart_contents_count); ?></span>
|
|
<?php endif; ?>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<button class="header_bars"><img src="<?= get_template_directory_uri();?>/gp-include/assets/front-page/img/bars.svg" alt=""></button>
|
|
<button class="header_close"><img src="<?= get_template_directory_uri();?>/gp-include/assets/front-page/img/mobile-menu/menu-mobile__cross.svg" alt=""></button>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|