<?php

/**
 * This template displays the blog post summaries
 * @link https://developer.wordpress.org/themes/basics/theme-functions/
 * @package Glaciers
 * @since 1.0.0
 */

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

// Are the options activated in the customizer.
$glaciers_blog_excerpt = get_theme_mod('glaciers_blog_excerpt', true);
$glaciers_featured_img_below = get_theme_mod('glaciers_featured_img_below', false);
$glaciers_blog_style = apply_filters('glaciers_blog_layout', get_theme_mod('glaciers_blog_style', 'classic-right'));
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

	<?php glaciers_post_thumbnail();	?>

	<div class="summary-inner">
		<header class="entry-header">
			<?php // Get the post title and meta
			glaciers_featured_badge();
			the_title('<h2 class="entry-title"><a href="' . esc_url(get_permalink()) . '" rel="bookmark">', '</a></h2>');	?>
			<div class="entry-meta">
				<?php
				glaciers_posted_by();
				glaciers_first_category();
				glaciers_posted_on();
				glaciers_comment_link();
				?>
			</div>
		</header>

		<div class="entry-content">
			<?php
			if (true === $glaciers_blog_excerpt) {
				the_excerpt();
				glaciers_read_more_link();
			} else {
				the_content();
			}
			// Multi-page navigation
			glaciers_multipage_pagination();
			?>
		</div><!-- .entry-content -->
	</div><!-- .summary-inner -->

</article>