<?php
/**
 * Template part for displaying posts.
 *
 * @link https://codex.wordpress.org/Template_Hierarchy
 *
 * @package Credit_Hub
 */

?>

<article id="post-<?php the_ID(); ?>" <?php post_class('uk-margin-large-bottom'); ?>>
	<header class="entry-header">
		<?php
		the_post_thumbnail( 'custom-thumbnail-size', array( 'alt' => get_the_title(), 'class' => 'post-img' ) );
			if ( is_single() ) {
				the_title( '<h2 class="entry-title">', '</h2>' );
			} else {
				the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
			}

		if ( 'post' === get_post_type() ) : ?>
		<div class="entry-meta">
			<?php tmbd_posted_on(); ?>
		</div><!-- .entry-meta -->
		<?php
		endif; ?>
	</header><!-- .entry-header -->

	<div class="entry-content">
		<p class="uk-text-justify"><?php echo custom_excerpt(); ?></p>
	</div><!-- .entry-content -->



	<footer class="entry-footer">
	    <div class="uk-grid">
	    	<div class="uk-width-1-2">
				<a class="uk-button read-more-btn" href="<?php echo esc_url( get_permalink() ); ?>" rel="bookmark">Read More</a>
			</div>
	      	<div class="uk-width-1-2 uk-text-right">
				<?php tmbd_entry_footer(); ?>
			</div>
		</div>
	</footer><!-- .entry-footer -->
</article><!-- #post-## -->
