File "header.php"

Full Path: /home/vantageo/public_html/wp-content-20240915120940/themes/vantageone/header.php
File size: 7.54 KB
MIME-type: text/x-php
Charset: utf-8

<?php
/**
 * The header for our theme
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
 *
 * @package vantageone
 */

?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="profile" href="https://gmpg.org/xfn/11">

	<?php wp_head(); ?>

	<script>
		jQuery(function($) {
			AOS.init();
		});
	</script>	



<script type="text/javascript">


	/*----------------------------------------------------
	 /*  Small Logo Upon Scroll
	 /* ------------------------------------------------- */
	jQuery(document).ready(function($) {
	    jQuery(window).scroll(function () {
	        if (jQuery(this).scrollTop() > 40) {
	            jQuery('nav#site-navigation').addClass('navback-alt');
	            jQuery('.logobox').addClass('logobox-alt');
	            jQuery('.mainmenu').addClass('mainmenu-alt');
	            jQuery('.innermenu .logoholder img').addClass('logoholder_small img');
	            jQuery('.search-field').addClass('search-field_small');
	            jQuery('.headr').addClass('headr-alt');
	            jQuery('.site-branding').addClass('site-branding-alt');
	            jQuery('ul#primary-menu').addClass('primary-menu-alt');
	            jQuery('.logobox').addClass('logobox-alt');
	            jQuery('.cartholder').addClass('cartholder-alt');
	            jQuery('.productsearchsidebar').addClass('productsearchsidebar-alt');
	            //jQuery('.page-headers').addClass('header#masthead headermove');
	        } 


		// if (jQuery(this).width() < 1025) {
		// 	jQuery('.headr').removeClass('headr-alt');
		// }

		// if (jQuery(this).width() > 1025) {
		// 	jQuery('.headr').addClass('headr-alt');
		// }




			else if (jQuery(this).width() > 1025 && jQuery(this).scrollTop() > 40) {
				jQuery('.page-headers').removeClass('header#masthead headermove');
			}

	        else {
	            jQuery('nav#site-navigation').removeClass('navback-alt');
	            jQuery('.logobox').removeClass('logobox-alt');
	            jQuery('.mainmenu').removeClass('mainmenu-alt');
	            jQuery('.innermenu .logoholder img').removeClass('logoholder_small img');
	            jQuery('.search-field').removeClass('search-field_small');
	            jQuery('.page-headers').removeClass('header#masthead headermove');
	            jQuery('.headr').removeClass('headr-alt');
	            jQuery('.site-branding').removeClass('site-branding-alt');
	            jQuery('ul#primary-menu').removeClass('primary-menu-alt');
	            jQuery('.logobox').removeClass('logobox-alt');
	            jQuery('.cartholder').removeClass('cartholder-alt');
	            jQuery('.productsearchsidebar').removeClass('productsearchsidebar-alt');
	        }
	    });
	});

	

	jQuery(document).ready(function($) {
		$('.dgwt-wcas-no-submit .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input').mouseover(function() {
	    $(this).focus();
	})

	});


	jQuery(document).ready(function($) {		
	    $(".ajaxshow").hide();
	});	


	jQuery(document).ready(function($) {
			$('a.btn.btn-default').click(function() {
		    $(".ajaxshow").show();
		})
	});	


	jQuery(document).ready(function($) {
			$('.closebtn').click(function() {
		    $(".ajaxshow").hide();
		})
	});	


	jQuery(document).ready(function($) {
			$('.closeoverlay').click(function() {
		    $(".ajaxshow").hide();
		})
	});		



// 	$(document).ready(function(){

//     var header = $("nav#site-navigation");
//     $(window).scroll(function() {    
//         var scroll = $(window).scrollTop();
    
//         if (scroll >= 200) {
//             header.removeClass('header').addClass("navback-alt");
//         } else {
//             header.removeClass("navback-alt").addClass('header');
//         }
//     });

// });
</script>	

<!-- <div class="featherlight-content" style="display: table;"> <button class="featherlight-close-icon featherlight-close" aria-label="Close">✕</button>
	<div class="lightbox featherlight-inner" id="fl1">

		<?php if ( is_active_sidebar( 'ajaxsearch-side-bar' ) ) : ?>
		    <?php dynamic_sidebar( 'ajaxsearch-side-bar' ); ?>
		<?php endif; ?>

	</div>
	</div> -->
	
</head>



	<div class="ajaxshow" style="display: none;">

		<div class="closebtn"><a href="#">x</a></div>

		<div class="closeoverlay"><a href="#"></a></div>

		<?php if ( is_active_sidebar( 'ajaxsearch-side-bar' ) ) : ?>
		    <?php dynamic_sidebar( 'ajaxsearch-side-bar' ); ?>
		<?php endif; ?>

	</div>


<body <?php body_class(); ?>>
<?php wp_body_open(); ?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e( 'Skip to content', 'vantageone' ); ?></a>

	<div class="menushade"></div>

	<header id="masthead" class="site-header headr">
		<div class="site-branding">
			<?php ?>

		<div class="logobox float-left pt-0 mt-0 col-2 col-sm-2 col-md-2 col-lg-2" data-aos="fade-down">
			<?php the_custom_logo(); ?>
		</div>

<!-- 		<div class="logoboxbehind float-left pt-1 mt-1 col-2 col-sm-2 col-md-2 col-lg-2">
		</div>		 -->

		<?php

			if ( is_front_page() && is_home() ) :
				?>
				<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
				<?php
			else :
				?>
				<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
				<?php
			endif;
			$vantageone_description = get_bloginfo( 'description', 'display' );
			if ( $vantageone_description || is_customize_preview() ) :
				?>
				<p class="site-description"><?php echo $vantageone_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
			<?php endif; ?>
		</div><!-- .site-branding -->


<div class="cartandsearch">

	<div class="productsearchsidebar col-12 col-sm-12 col-md-2 col-lg-2 float-right">
		
		<!-- <i class="fa fa-search" aria-hidden="true"></i> -->

		<?php #if ( is_active_sidebar( 'productsearch-side-bar' ) ) : ?>
		    <?php #dynamic_sidebar( 'productsearch-side-bar' ); ?>
		<?php #endif; ?>

		<?php
		#echo do_shortcode('[wcas-search-form]');
		?>

<!-- 		<a href='[wcas-search-form]' title="Lightbox Example" data-slb-active="1" data-slb-asset="1317671964" data-slb-internal="0" data-slb-group="368">
			<i class="fa fa-search" aria-hidden="true">xx</i>
		</a> -->

<!-- <a class="btn btn-default" href="#" data-featherlight="#fl1">Default</a> -->

<a class="btn btn-default" href="#"><i class="fa fa-search" aria-hidden="true"></i></a></a>


	</div>

<!-- <i class="fa fa-shopping-cart" aria-hidden="true"></i> -->
<div class="cartholder pt-2 float-right">
	<i class="fa fa-shopping-cart float-right" aria-hidden="true" style="color: #fff;"></i>
	<a class="cart-customlocation" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>">	
	<?php echo sprintf ( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?>	
	</a>
</div>


</div>


		<nav id="site-navigation" class="main-navigation menubox float-left mt-0 col-10 col-sm-10 col-md-10 col-lg-10" data-aos="zoom-in-left">
			<button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false"><?php esc_html_e( 'Primary Menu', 'vantageone' ); ?></button>
			<?php
			wp_nav_menu(
				array(
					'theme_location' => 'menu-1',
					'menu_id'        => 'primary-menu',
				)
			);
			?>
		</nav><!-- #site-navigation -->
	</header><!-- #masthead -->