<?php
/**
 * The header for our theme
 *
 * This is the template that displays all of the <head> section and everything up until <div id="content">
 *
 * @package Ef Practical
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="profile" href="http://gmpg.org/xfn/11">
	<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<div id="page" class="hfeed site">
    <a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'ef-practical' ); ?></a>
    
    <header id="masthead" class="site-header" role="banner">
        <?php
            if ( 1 == get_theme_mod( 'practical_header_top_bar', 1 ) ) :
                get_template_part( '/template-parts/header/top-bar' );
            endif;
            if ( 'center_logo' == get_theme_mod( 'practical_header_layout', 'left_logo' ) ) :
                get_template_part( '/template-parts/header/header-center' );
            else:
                get_template_part( '/template-parts/header/header' );
            endif;
        ?>
    </header><!-- #masthead -->
    <div class="mobile-nav">
        <?php
            if ( 0 != get_theme_mod( 'practical_mobile_search', 0 ) ) :
                get_search_form();
            endif;
        ?>
    </div>
    
    <?php
        if ( 0 == get_theme_mod( 'practical_header_img_pages', 0 ) ) :
            practical_header_image();
        else:
            if ( is_front_page() ) :
                practical_header_image();
            endif;
        endif;
    ?>