<?php
/*
 * DateBook header template
 *
 * @package DateBook
 * @author Pagick Themes
 * @link https://www.pagickthemes.com
 */

$datebook_lang_code = get_theme_mod('datebook_lang_code') ? get_theme_mod('datebook_lang_code') : 'en';

?><!DOCTYPE html>
<html lang="<?php echo esc_attr($datebook_lang_code); ?>" class="h-100">
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" <?php language_attributes(); ?> > <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" <?php language_attributes(); ?> > <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" <?php language_attributes(); ?> > <![endif]-->
<!--[if gt IE 8]><!--><html class="no-js" <?php language_attributes(); ?> ><!--<![endif]-->
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<meta name="HandheldFriendly" content="True">

<?php if ( get_theme_mod( 'datebook_favicon' ) != '' ) { ?>

	<link rel="shortcut icon" href="<?php echo esc_url( get_theme_mod( 'datebook_favicon' ) ); ?>" />

<?php } else { ?>

	<link rel="shortcut icon" href="<?php echo esc_url(get_template_directory_uri() . '/assets/images/favicon.ico'); ?>" />

<?php } ?>


<?php wp_head(); ?>

</head>
<body <?php body_class('d-flex flex-column h-100'); ?>>

	<?php

	if ( function_exists( 'wp_body_open' ) ) {
    	wp_body_open();
	} else {
    	do_action( 'wp_body_open' );
	}

	?>

	<div <?php post_class( 'datebook-wrapper pb-3' ); ?>>

	<header>

	<?php

	if( class_exists( 'DateBook' ) ) {

		do_action('datebook_header');

	} else {

		get_template_part( 'templates/page', 'header' );

	}

	?>
	
	</header>

	<main class="container">