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

<header class="entry-header" role="banner" data-uk-scrollspy="cls: uk-animation-fade" style="visibility: hidden;">

	<div class="uk-container uk-container-xsmall">

		<?php

		/**
		 * Allow child themes and plugins to filter the display of the categories in the entry header.
		 *
		 * @param bool   Whether to show the categories in header, default true.
		 */
		$show_categories = apply_filters( 'eisai_show_categories_in_entry_header', true );

		if ( true === $show_categories && has_category() ) {
			?>

			<div class="entry-categories">
				<span class="screen-reader-text"><?php esc_html_e( 'Categories', 'eisai' ); ?></span>
				<div class="entry-categories-inner uk-text-small uk-clearfix">
					<?php the_category( ' ' ); ?>
				</div> <!-- .entry-categories-inner -->
			</div> <!-- .entry-categories -->

			<?php
		}

		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>' );

		}

		if ( has_excerpt() && is_singular() ) {
			?>

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

			<?php
		}

        /**
		 * Allow child themes and plugins to filter the display of the post meta in the entry header.
		 *
		 * @param bool   Whether to show the post meta in header, default true.
		 */
		$show_post_meta = apply_filters( 'eisai_show_post_meta_in_entry_header', true );

        if ( true === $show_post_meta ) {
    		eisai_the_post_meta( get_the_ID(), 'entry-header' );
        }

		?>

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

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