<?php
$themeSettingConfig = $this->helper('MGS\ThemeSettings\Helper\Config');
$_headerAbsolute = $themeSettingConfig->getStoreConfig('themesettings/header/header_absolute');
$stickyMenu = $themeSettingConfig->getStoreConfig('themesettings/header/sticky_menu');
?>
<?php if ($_headerAbsolute): ?>
    <div id="placeholder-header"></div>
<?php else: ?>
    <div id="placeholder-header" class="absolute-header"></div>
<?php endif; ?>

<?php if ($_headerAbsolute): ?>
    <script>
        function arrowGetHeaderHeight() {
            var height_header = document.querySelector('.page-header').offsetHeight;
            document.querySelector('#placeholder-header').style.height = height_header + 'px';
        }

        window.addEventListener('load', arrowGetHeaderHeight);
        window.addEventListener('resize', arrowGetHeaderHeight);
    </script>
<?php endif; ?>
