<?php
    $post = get_theme_mod('crt_manage_hero_v1_center_post');
    $ratio = get_theme_mod('crt_manage_hero_v1_thumbnail_size', 'ratio169');
?>
<?php if(!empty($post)): ?>
    <?php foreach ( $post as $post_id ) :
        $post = get_post( $post_id );
        $get_permalink = get_permalink( $post );
        $get_thumbnail_url = get_the_post_thumbnail_url( $post, 'nason-magazine-blog-image-large');
    ?>
        <div class="hero__item">
            <div class="hero__item--inner">
                <div class="position-relative">
                    <a href="<?php echo esc_attr($get_permalink); ?>">
                        <img class="thumbnail <?php echo esc_attr($ratio); ?>" data-lazy="<?php echo esc_attr($get_thumbnail_url); ?>" alt="<?php echo esc_attr($post->post_title); ?>" style="" />
                    </a>
                    <div class="entry__cat-read">
                        <?php nason_magazine_blog_entry_options($post, array('class' => 'mt-0 d-flex justify-content-between c-white pd-20', 'entry_date' => false, 'entry_cat' => true, 'entry_author' => false, 'entry_read_time' => true, 'entry_comment' => false, 'entry_view_count' => false, 'entry_date_order' => 1, 'entry_cat_order' => 2, 'entry_author_order' => 3, 'entry_read_time_order' => 4, 'entry_comment_order' => 5, 'entry_view_count_order' => 6)); ?>
                    </div>
                </div>
                <div class="hero__content">
                    <div class="entry">
                        <?php nason_magazine_blog_entry_options($post, array('class' => 'mb-2', 'entry_date' => true, 'entry_cat' => false, 'entry_author' => true, 'entry_read_time' => false, 'entry_comment' => false, 'entry_view_count' => false)); ?>
                    </div>
                    <h3 class="hero__title mb-3"><a href="<?php echo esc_attr($get_permalink); ?>"><?php echo esc_html($post->post_title); ?></a></h3>
                    <div class="hero__sub">
                        <?php echo nason_magazine_blog_excerpt_custom(30, $post_id); ?>
                    </div>
                </div>
            </div>
        </div>
    <?php endforeach;  ?>
<?php endif; ?>
