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

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

  <?php if ( has_post_thumbnail() ) : ?>
    <div class="at-post__thumb">
      <a href="<?php the_permalink(); ?>">
        <?php the_post_thumbnail('motivate-post-big'); ?>
      </a>
    </div>
  <?php endif; ?>

  <div class="at-post__contentwrap">
    <h2 class="at-post__title">
      <a href="<?php the_permalink(); ?>" rel="bookmark">
        <?php the_title(); ?>
      </a>
    </h2>

    <ul class="at-post__meta">
      <li><?php the_date(); ?></li>  
      <li><?php the_category( ' / ' ); ?></li>
    </ul>

    <?php if ( true == get_theme_mod( 'at_setting__postsshare_archive', true ) ) : ?>
        <div class="at-post__metaf">
          <?php get_template_part( 'single', 'socialshare' ); ?>
        </div>
      <?php endif; ?>

    <div class="at-post__excerpt">
      <?php
        the_excerpt();
        wp_link_pages( array(
          'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'motivate' ),
          'after'  => '</div>',
        ) );
      ?>
      
      
      <a class="at-post__readmore" href="<?php the_permalink(); ?>"><?php esc_html_e( 'Read More','motivate' ); ?></a>

    </div><!-- .at-post__content -->

  </div>

</article><!-- #post-## -->