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

    <?php if ( has_post_thumbnail() ) : ?>
        <div class="post-thumbnail">
            <a href="<?php the_permalink(); ?>">
                <?php the_post_thumbnail( 'large' ); ?>
            </a>
        </div>
    <?php endif; ?>

    <header class="entry-header">
        <?php
        if ( is_singular() ) :
            the_title( '<h1 class="entry-title">', '</h1>' );
        else :
            the_title( '<h2 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h2>' );
        endif;
        ?>
    </header>

    <div class="entry-meta">
        <?php if ( 'post' === get_post_type() ) : ?>
            <span class="posted-on"><?php echo get_the_date(aurora_lite_get_date_format()); ?></span>
            <span class="byline"><?php the_author_posts_link(); ?></span>
            <span class="categories"><?php the_category(', '); ?></span>
        <?php endif; ?>
    </div>

    <div class="entry-content">
        <?php
        if ( is_singular() ) {
            the_content();
            wp_link_pages([
                'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'aurora-lite' ),
                'after'  => '</div>',
            ]);
        } else {
            the_excerpt();
        }
        ?>
    </div>

    <footer class="entry-footer">
        <?php
        if ( 'post' === get_post_type() ) {
            echo '<span class="tags">' . wp_kses_post( get_the_tag_list( '', ', ' ) ) . '</span>';
        }
        ?>
    </footer>

</article>