<?php
/**
 * Displays the page and post header.
 */
?>

<header class="entry-header">

	<div class="uk-container<?php echo esc_attr( basho_get_container_width_class( 'entry-header' ) ); ?>">

		<?php

		basho_the_post_meta( get_the_ID(), 'entry-header-top' );

		if ( is_singular() ) {

			the_title( '<h1 class="entry-title">', '</h1>' );

		} else {

			the_title( '<h2 class="entry-title uk-h1"><a href="' . esc_url( get_permalink() ) . '">', '</a></h2>' );

		}

        /**
    	 * Check whether the 'basho_show_post_excerpt' option is activated in the Customizer.
         */
    	$show_excerpt = get_theme_mod( 'basho_show_post_excerpt', true );

		if ( true === $show_excerpt && has_excerpt() && is_singular() ) {
			?>

			<div class="entry-excerpt uk-container-small uk-text-lead">
				<?php the_excerpt(); ?>
			</div>

			<?php
		}

        basho_the_post_meta( get_the_ID(), 'entry-header-bottom' );

		?>

	</div> <!-- .container -->

</header> <!-- .entry-header -->
