<?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 Nymera
 */

?>
<!DOCTYPE html>
<html>
<head>
    <title>
        <?php if (is_404()): echo "Page Not Found"; else: echo get_the_title(); endif;
        echo " - " . get_bloginfo(); ?>
    </title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="<?= get_template_directory_uri(); ?>/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="<?= get_template_directory_uri(); ?>/css/font-awesome.css"/>
    <link rel="stylesheet" href="<?= get_template_directory_uri(); ?>/css/owl.carousel.css"/>
    <link rel="stylesheet" href="<?= get_template_directory_uri(); ?>/css/animate.css"/>
    <link rel="stylesheet" href="<?= get_template_directory_uri(); ?>/css/style.css"/>
	<link rel="stylesheet" href="<?= get_template_directory_uri(); ?>/style.css"/>
    <?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<header class="container-fluid">
    <div class="row">
        <div class="container">
            <div class="row flex_col align_center">
                <div class="col-xs-6">
                    <a href="<?php echo site_url(); ?>"><img src="<?php the_field('he_logo', 'options'); ?>"/> </a>
                </div>
                <div class="col-xs-6 text-right">
                    <a href="javascript:void(0);" class="menu_toggle_button"><img
                                src="<?= get_template_directory_uri(); ?>/images/3-line.png"/> </a>
                </div>
            </div>
        </div>
    </div>
    <div class="menu_portion ">
        <div>
            <a href='javascript:void(0);' class="close_menu_btn"><img
                        src="<?= get_template_directory_uri(); ?>/images/X.png"></a>
            <img src="<?php the_field('ftr_logo', 'options'); ?>" class="menu_logo"/>

            <?php
            wp_nav_menu(
                array(
                    'menu' => false,
                    'theme_location' => 'menu-1',
                    'link_before' => false,
                    'link_after' => false,
                    'menu_class' => false,
                    'menu_id' => false,
                    'container' => false,
                )
            ); ?>
            <div class="social">
                <?php
                if (have_rows('social_icon', 'options')):
                    while (have_rows('social_icon', 'options')) : the_row();
                        $icon = get_sub_field('si_icon', 'options');
                        $url = get_sub_field('si_url', 'options');
                        if (!empty($icon) && !empty($url)): ?>
                            <a href="<?php echo $url; ?>"><i class="fa fa-<?php echo $icon; ?>"></i></a>
                        <?php endif;
                    endwhile;
                endif;
                wp_reset_postdata();
                ?>

            </div>
        </div>
    </div>
</header>