<?php
/**
 * Post rendering content according to caller of get_template_part
 *
 * @package Digital
 */

// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>
<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
    <div class="d-flex align-items-center mb-4">
        <?php if (get_theme_mod('digital_enable_featured') !== 'disable') { ?>
            <div class="me-2">
                <a href="<?php echo esc_url(get_permalink(get_the_ID())); ?>">
                    <?php echo get_the_post_thumbnail($post->ID, 'digital-post-thumbnail'); ?>
                </a>
            </div>
        <?php } ?>
        <header class="entry-header">
            <?php
            the_title(
                sprintf('<h2 class="entry-title mb-0"><a href="%s" rel="bookmark">', esc_url(get_permalink())),
                '</a></h2>'
            );
            ?>
        </header>
    </div>
</article>
