/home/bdqbpbxa/demo-subdomains/sendon.goodface.com.ua/wp-content/themes/sendon/header.php
<!DOCTYPE html>
<?php
$curr_lang = pll_current_language();
$template_dir = get_template_directory_uri() . '/assets';
$soon_text;
if ($curr_lang == 'en') {
$soon_text = "Coming soon";
} else {
$soon_text = "Незабаром";
}
?>
<html lang="<? echo $curr_lang; ?>">
<head>
<title>
<?php echo wp_get_document_title(); ?>
</title>
<link rel="canonical" href="<?php echo get_the_permalink(); ?>">
<!-- Mobile -->
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<?php
wp_head();
?>
</head>
<body>
<style>
.-allow-animations .preloader {
opacity: 1;
}
.preloader {
height: var(--window-inner-height);
width: 100vw;
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 99999;
background: #fff;
display: flex;
justify-content: center;
align-items: center;
}
.-allow-animations .preloader.-hidden {
opacity: 0;
pointer-events: none;
}
.change-color {
transition: fill 0.4s;
}
.move-item {
transition: transform 0.4s, fill 0.4s;
}
.preloader.-active .change-color {
fill: var(--blue)
}
.preloader.-active .move-item {
fill: var(--yellow);
transform: translateX(18px);
}
</style>
<div class="preloader">
<div class="img">
<svg width="87" height="48" viewBox="0 0 87 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M10.462 42.9749C13.8072 42.9749 16.519 40.2251 16.519 36.8331C16.519 33.441 13.8072 30.6912 10.462 30.6912C7.11686 30.6912 4.40506 33.441 4.40506 36.8331C4.40506 40.2251 7.11686 42.9749 10.462 42.9749ZM10.462 47.4417C16.24 47.4417 20.924 42.692 20.924 36.8331C20.924 30.9741 16.24 26.2245 10.462 26.2245C4.68401 26.2245 0 30.9741 0 36.8331C0 42.692 4.68401 47.4417 10.462 47.4417Z"
fill="#0A0A1F" />
<path
d="M20.3734 0.534783V5.00156C18.5403 4.85046 12.0799 4.39319 10.1518 4.47535C8.74432 4.53532 7.25418 4.70067 6.14121 4.97614C5.41767 5.15522 4.97238 5.82934 4.92094 6.58276C4.85179 7.59563 5.51147 8.48736 6.51241 8.51353C7.69717 8.54449 9.17558 8.4667 10.5547 8.36815C12.4451 8.23182 14.7974 8.06218 16.6858 8.55156C17.7378 8.82419 18.8573 9.34705 19.7007 10.3688C20.5617 11.4119 20.924 12.7179 20.924 14.1381C20.924 15.4732 20.5514 16.6754 19.8317 17.6855C19.1301 18.6703 18.1835 19.3556 17.1991 19.8358C15.2815 20.7711 12.8839 21.0896 10.685 21.1742C8.43563 21.2608 2.40457 20.8067 0.550633 20.641V16.1742C2.34507 16.3346 8.54623 16.7866 10.5178 16.7107C12.0042 16.6534 13.5939 16.4805 14.7637 16.1822C15.4507 16.007 15.8855 15.3757 15.9599 14.6615C16.0666 13.6381 15.4062 12.7168 14.3916 12.6956C13.2944 12.6727 11.9551 12.746 10.6169 12.8417C8.70779 12.9787 6.13735 13.1633 4.21474 12.6421C3.15555 12.3549 2.04103 11.8123 1.20612 10.7752C0.357631 9.72123 0 8.40863 0 6.97847C0 5.67483 0.354828 4.49476 1.04934 3.49675C1.72792 2.52165 2.64699 1.83915 3.60736 1.35922C5.4744 0.426211 7.81198 0.104327 9.96691 0.0125082C12.172 -0.0814495 18.4923 0.379731 20.3734 0.534783Z"
fill="#0A0A1F" />
<path
d="M42.9493 46.8832L38.4845 46.8833L27.5315 33.9855V46.8832H23.1266V26.7828H27.5914L38.5442 39.6804V26.7828H42.9493V46.8832Z"
fill="#0A0A1F" />
<path
d="M42.3987 4.44891V0.540481H23.1266V20.641H42.9494V16.7326H27.5316V12.2658H39.0949V8.35734H27.5316V4.44891H42.3987Z"
fill="#0A0A1F" />
<path
d="M64.9746 20.6409L60.5098 20.641L49.5569 7.7432V20.6409H45.1519V0.540481H49.6167L60.5695 13.438V0.540481H64.9746V20.6409Z"
fill="#0A0A1F" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M67.1772 0.540481H71.5823L71.5824 0.543467L77.0886 0.540481C82.5625 0.540481 87 5.04013 87 10.5907C87 16.1413 82.5625 20.641 77.0886 20.641H67.1772V0.540481ZM71.5823 4.44891H76.538C79.8831 4.44891 82.5949 7.1987 82.5949 10.5907C82.5949 13.9828 79.8831 16.7326 76.538 16.7326H71.5823L71.5823 4.44891Z"
fill="#0A0A1F" />
<path class="change-color"
d="M45.1519 36.8331C45.1519 30.6657 50.0824 25.6661 56.1646 25.6661H75.9873C82.0695 25.6661 87 30.6657 87 36.8331C87 43.0004 82.0695 48 75.9873 48H56.1646C50.0824 48 45.1519 43.0004 45.1519 36.8331Z"
fill="#CECECE" />
<path class="move-item"
d="M65.2468 36.8331C65.2468 41.4586 61.5489 45.2083 56.9873 45.2083C52.4257 45.2083 48.7278 41.4586 48.7278 36.8331C48.7278 32.2076 52.4257 28.4578 56.9873 28.4578C61.5489 28.4578 65.2468 32.2076 65.2468 36.8331Z"
fill="#FCFCFC" />
</svg>
</div>
</div>
<script>
// Allow animations if JS support is enabled
document.body.classList.add('-allow-animations');
// Don't show preloader again if the page was visited
let preloader = document.querySelector('.preloader');
let fullPageUrl = window.location.href;
let visitedPages = window.localStorage.getItem('visited-pages');
let visitedPagesArr = visitedPages ? visitedPages.split(' ') : '';
let isPreloaderLoaded = visitedPagesArr.includes(fullPageUrl);
if (preloader && isPreloaderLoaded) {
preloader.remove();
} else if (preloader) {
lockScroll();
}
function lockScroll() {
const html = document.documentElement;
const body = document.body;
const scrollTop = window.scrollY;
html.classList.add('-scroll-lock');
body.classList.add('-scroll-lock');
document.body.scrollTo(0, scrollTop);
html.setAttribute('data-scroll', scrollTop);
}
</script>
<?php
$logo = get_field('logo', 'option');
$header = get_field("header-{$curr_lang}", 'option');
?>
<header class="header">
<div class="container">
<div class="header__wrapper">
<a href="<?php echo get_home_url(); ?>" class="logo">
<img src="<?php echo $logo['url']; ?>" alt="<?php echo $logo['alt']; ?>">
</a>
<nav class="header__navigation text-2">
<?php
foreach($header['navigation'] as $item) :
$link = get_link_group_field($item);
if ($link) :
?>
<a href="<?php echo $link['url'] ?>" <?php echo $link['target']; ?> class="<?php if ($link['url'] == get_the_permalink()) echo '-active' ?>"><?php echo $link['title']; ?></a>
<?php
endif;
endforeach;
$language_arr = pll_the_languages([
'hide_if_no_translation' => 1,
'raw' => 1,
]);
foreach($language_arr as $lang) :
if (!$lang['current_lang']) :
$lang_name = $lang['name'];
$firstThreeChars = mb_substr(trim($lang_name), 0, 3, 'UTF-8');
?>
<a href="<?php echo $lang['url'] ?>" class="link-with-icon -lang-switcher">
<span class="icon">
</span>
<?php echo $firstThreeChars ?>
</a>
<?php
endif;
endforeach;
?>
</nav>
<?php
$button = get_link_group_field($header['button']);
if ($button) :
?>
<a href="<?php echo $button['url'] ?>" <?php echo $button['target'] ?> class="default-button -disabled -icon -login" data-text="<?php echo $soon_text; ?>">
<span class="icon"></span>
<?php echo $button['title'] ?>
</a>
<?php
endif;
?>
<div class="burger">
<span></span><span></span>
</div>
</div>
</div>
<div class="mobile-menu">
<div class="mobile-menu__wrapper">
<nav class="mobile-menu__navigation mob-text-2 --semi-bold">
<?php
foreach($header['additional_links_for_mobile_menu'] as $item) :
$link = get_link_group_field($item);
if ($link) :
?>
<a href="<?php echo $link['url'] ?>" <?php echo $link['target']; ?> class="<?php if ($link['url'] == get_the_permalink()) echo '-active' ?>"><?php echo $link['title']; ?></a>
<?php
endif;
endforeach;
?>
<?php
foreach($header['navigation'] as $item) :
$link = get_link_group_field($item);
if ($link) :
?>
<a href="<?php echo $link['url'] ?>" <?php echo $link['target']; ?> class="<?php if ($link['url'] == get_the_permalink()) echo '-active' ?>"><?php echo $link['title']; ?></a>
<?php
endif;
endforeach;
?>
</nav>
<div class="mobile-menu__footer">
<?php
if ($button) :
?>
<a href="<?php echo $button['url'] ?>" <?php echo $button['target'] ?> class="default-button -disabled -icon -login" data-text="<?php echo $soon_text; ?>">
<span class="icon"></span>
<?php echo $button['title'] ?>
</a>
<?php
endif;
?>
<?php
$language_arr = pll_the_languages([
'display_names_as' => 'name',
'hide_if_no_translation' => 1,
'raw' => 1,
]);
foreach($language_arr as $lang) :
if (!$lang['current_lang']) :
?>
<a href="<?php echo $lang['url'] ?>" class="link-with-icon mob-text-2 -lang-switcher">
<span class="icon">
</span>
<?php echo $lang['name'] ?>
</a>
<?php
endif;
endforeach;
?>
</div>
</div>
</div>
</header>