<article class="post-preview <?php if (has_post_thumbnail()) : echo 'has-image'; endif; ?>">
    <div class="post-preview_wrap">

        <?php if (has_post_thumbnail()) { ?>
        <div class="featured-img" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
            <a href="<?php the_permalink(); ?>"></a>
        </div>
        <?php } ?>
        
        <div class="content">
            <div class="post-meta">
                <span class="date"><?php echo get_the_date(get_option('date_format')); ?></span>
                <?php if (has_category() && !has_category('Uncategorized')) : ?>
                    <span class="cats"><?php the_category('  /  '); ?></span>
                <?php else : endif;?>
                <?php if (has_tag()) : ?>
                    <span class="tags"><?php the_tags(' | ', ', '); ?></span>
                <?php else : endif;?>
            </div>
            <h1><?php the_title(); ?></h1>
            <?php the_excerpt(); ?>   
            
            <!-- Global button -->
            <div class="rem-btn_wrapper">
                <a class="rem-btn" href="<?php the_permalink(); ?>">
                    <span class="rem-btn__text">Read more</span>
                </a>
            </div>

        </div>

    </div>
</article>