<?php
/**
 * The header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="content">
 *
 * @package masterpiece
 */

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly.
}

$container = get_theme_mod( 'masterpiece_container_type', 'container');
$logo_position = get_theme_mod('mp_logo_position', 'left');
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
	<link rel="profile" href="http://gmpg.org/xfn/11">
	<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>

<div class="site" id="page">
	<?php if(get_theme_mod('mp_show_top_bar', 0)): ?>
	<div class="top-bar-section" id="top-bar-section">

		<div class="<?php echo $container; ?>">
			<div class="row">
				<div class="col-md-6 welcome-message">
					<?php if ( is_active_sidebar( 'top-bar-left' ) ) : ?>
						<div id="" class="widget-area" role="">
							<?php dynamic_sidebar( 'top-bar-left' ); ?>
						</div><!-- #primary-sidebar -->
					<?php endif; ?>
				</div>
				<div class="col-md-6 social-contacts">
					<div class="pull-right">
						<?php if ( is_active_sidebar( 'top-bar-right' ) ) : ?>
							<div id="" class="widget-area" role="">
								<?php dynamic_sidebar( 'top-bar-right' ); ?>
							</div><!-- #primary-sidebar -->
						<?php endif; ?>
					</div>
				</div>
			</div>
		</div>

	</div>
	<?php endif; ?>
	<?php 
	
	if($logo_position == 'left') require_once(get_template_directory() . '/header/logo.left.php');
	else require_once(get_template_directory() . '/header/logo.middle.php');
	
	?>
