| Server IP : 213.186.33.4 / Your IP : 216.73.216.146 Web Server : Apache System : Linux webm005.cluster103.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : karinebmkh ( 644538) PHP Version : 8.4.22 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/karinebmkh/www/wp-content/plugins/divi-pixel/public/partials/ |
Upload File : |
<?php
namespace DiviPixel;
$hide_top_bar = DIPI_Public::get_option('hide_top_bar');
$top_bar_text_size = DIPI_Public::get_option('top_bar_text_size');
$top_bar_letter_spacing = DIPI_Public::get_option('top_bar_letter_spacing');
$top_bar_font = DIPI_Public::get_option('top_bar_font');
$top_bar_font_weight = DIPI_Public::get_option('top_bar_font_weight');
$top_bar_shadow = DIPI_Public::get_option('top_bar_shadow');
$top_bar_shadow_color = DIPI_Public::get_option('top_bar_shadow_color');
$top_bar_shadow_offset = DIPI_Public::get_option('top_bar_shadow_offset');
$top_bar_shadow_blur = DIPI_Public::get_option('top_bar_shadow_blur');
?>
<?php if( $hide_top_bar) : ?>
<script type="text/javascript">
jQuery(document).ready(function ($) {
var didScroll;
var lastScrollTop = 0;
var delta = 5;
var navbarHeight = $('#top-header').innerHeight();
$(window).scroll(function(event){
didScroll = true;
});
setInterval(function() {
if (didScroll) {
hasScrolled();
didScroll = false;
}
}, 250);
// function has scrolled
function hasScrolled() {
var st = $(this).scrollTop();
if(Math.abs(lastScrollTop - st) <= delta)
return;
if (st > lastScrollTop && st > navbarHeight){
if($('body').hasClass('et_secondary_nav_enabled')) {
$('#top-header').addClass('is_hidden');
if($('body').hasClass('admin-bar')) {
$('#main-header').animate({'top': '32px'}, 200);
} else {
$('#main-header').animate({'top': '0px'}, 200);
}
}
} else {
if(st + $(window).height() < $(document).height()) {
$('#top-header').removeClass('is_hidden');
if($('body').hasClass('admin-bar')) {
$('#main-header').animate({'top': (navbarHeight+32)+'px'}, 200);
} else {
$('#main-header').animate({'top': (navbarHeight)+'px'}, 200);
}
}
}
lastScrollTop = st;
}
});
</script>
<?php endif; ?>
<style type="text/css" id="top-header-bar-css">
#top-header {
<?php echo sanitize_text_field( et_builder_get_font_family($top_bar_font) ); ?>;
font-size: <?php echo $top_bar_text_size; ?>px !important;
letter-spacing: <?php echo $top_bar_letter_spacing; ?>px !important;
<?php if($top_bar_shadow) : ?>
box-shadow: 0px <?php echo $top_bar_shadow_offset; ?>px <?php echo $top_bar_shadow_blur; ?>px <?php echo $top_bar_shadow_color; ?> !important;
<?php endif; ?>
}
#top-header li a,
#et-info-email,
#et-info-phone {
<?php echo DIPI_Public::print_font_style_option('top_bar_font_style'); ?>
font-weight: <?php echo $top_bar_font_weight; ?> !important;
}
<?php if($hide_top_bar) : ?>
#top-header.is_hidden {
transform: translateY(-200%);
transition: transform .5s ease-out;
}
<?php else : ?>
#top-header {
transform: translateY(0%);
transition: transform .5s ease-out;
}
<?php endif; ?>
</style>