<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">

<link href="https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,700&amp;subset=latin-ext" rel="stylesheet">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" crossorigin="anonymous">

<title><?php bloginfo('name'); ?> - <?php bloginfo('description'); ?></title>

<?php if(is_user_logged_in() && is_admin()){ ?>
<style></style>
<?php } ?>

<?php wp_head(); ?>
</head>
<body>
<header class="page4">

<div class="container-fluid" id="menu2">

<div class="row">

<div class="col-md-3 col-sm-8 menu2 logos">
<h1><a href="<?php echo get_home_url(); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></h1>
</div>

<div class="col-md-9 col-sm-4 menus">

<div class="menu" id="desktop">

<?php wp_nav_menu( array(
'theme_location' => 'menu1',
'menu_class' => 'mainmenu'
) ); ?>

</div>

<div class="dropdown show" id="mobile">
<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">MENU</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuLink">
<?php
$menu_name = 'menu1';

if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) {
$menu = wp_get_nav_menu_object( $locations[ $menu_name ] );

$menu_items = wp_get_nav_menu_items($menu->term_id);

foreach ( (array) $menu_items as $key => $menu_item ) {
$title = $menu_item->title;
$url = $menu_item->url;
$menu_list .= '<a class="dropdown-item"  href="' . $url . '">' . $title . '</a>';
}

echo $menu_list;
}
?>
</div>
</div>


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

</header>