<?php $active = (is_sticky() || get_post_meta($post->ID, '_breaking', true) == 1) ? ' active ' : ''; ?>
<div class="newslist__item <?= $active ?>">
    <div class="d-flex">
        <?php if (has_post_thumbnail() && show_thumbnail()): ?>
            <div class="newslist__frame">
                <a href="<?php echo esc_url( get_permalink() ); ?>">
                    <img loading="lazy" <?php if(wp_is_mobile()): ?>src="<?= get_template_directory_uri() ?>/assets/img/Profile_lazyload_m.webp"<?php else: ?>src="<?= get_template_directory_uri() ?>/assets/img/Profile_lazyload.jpg"<?php endif; ?> class="lazyload" data-src="<?php echo get_the_post_thumbnail_url(); ?>" alt="<?php the_title(); ?>" />
                </a>
            </div>
        <?php endif; ?>
        <div>
            <div class="newslist__body">
                <h2 class="newslist__title">
                    <a href="<?php echo esc_url( get_permalink() ); ?>"><?php the_title(); ?></a>
                </h2>
                <?php if(!wp_is_mobile()): ?>
                    <a href="<?php echo esc_url( get_permalink() ); ?>">
                        <?php the_announce(); ?>
                    </a>
                <?php endif; ?>
            </div>
            <div class="publication__data">
                <span class="publication__number" itemprop="datePublished" content="<?php echo get_the_date("j.m.Y H:i"); ?>"><?php echo get_the_date("j.m.Y H:i"); ?></span>
                <?php if (in_array(get_post_type(), array('anew', 'yellow'))): ?>
                    <?php get_template_part('author', 'news'); ?>
                <?php else: ?>
                    <?php get_template_part('author', 'single'); ?>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>