<div class="newslist__item">
    <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 else: ?>
            <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="<?= get_template_directory_uri() ?>/assets/img/event-cover.jpg" 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>
                <a href="<?php echo esc_url( get_permalink() ); ?>">
                    <?php the_announce(); ?>
                </a>
            </div>
            <div class="publication__data">
                <?php echo date("d.m.Y", strtotime(get_post_meta(get_the_ID(),'event_date',true))); ?>
            </div>
        </div>
    </div>
</div>