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

?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">

<?php wp_head(); ?>
</head>

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

<?php $home_url = get_home_url(); $current_user = wp_get_current_user(); $description = get_bloginfo( 'description', 'display' ); ?>
<div class="header-row <?php echo (!is_front_page())?'header-row-shadow':''; ?>">
	<header id="masthead" class="site-header col-md-12" role="banner">
		<div class="site-branding">
			<h1 class="site-title">
				<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
					<?php if (is_front_page()) : ?>
						<img src="<?php echo get_template_directory_uri ()."/images/cc-hellenic-logo.png" ?>" width="100" alt="<?php bloginfo( 'name' ); echo " | ".$description; ?>" title="<?php bloginfo( 'name' ); echo " | ".$description; ?>">
					<?php else : ?>
						<img src="<?php echo get_template_directory_uri ()."/images/bottleup-logo.png" ?>" alt="<?php bloginfo( 'name' ); echo " | ".$description; ?>" title="<?php bloginfo( 'name' ); echo " | ".$description; ?>">
					<?php endif; ?>
				</a>
			</h1>

			<?php if (bp_is_current_component('activity')) : ?>
				<a class="back-to-challenges" href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
					<img src="<?php echo get_template_directory_uri ()."/images/back-circle.png" ?>" alt="Back to Challenges">
				</a>
			<?php endif; ?>

			<?php /*if (!(is_front_page())) : */?><!--
				<a class="toggle-nav" href="#">
					<span class="burger-x"></span>
				</a>
			--><?php /*endif; */?>
		</div><!-- .site-branding -->
	</header><!-- #masthead -->
</div>

<div class="site">
	<div class="make-me-a-panel"></div>

	<?php if (!(is_front_page())) : ?>
		<div id="user-info" class="container-fluid">
			<?php
				$current_user = wp_get_current_user();
				$home_url = get_home_url();
			?>
			<div class="welcome-user">
				<!--<div class="welcome-user-avatar">
					<?php
					/*					$user_ID = get_current_user_id();
													echo  get_avatar( $user_ID, 'thumbnail' );
												*/?>
				</div>-->
				Hi, <?php echo $current_user->user_login; ?>
			</div>
			<div class="logout-user"><a href="<?php echo wp_logout_url($home_url); ?>">Logout</a></div>
		</div>
	<?php endif; ?>

	<div id="page" class="container-fluid">
		<div id="content" class="site-content">

