<?php
$formatted_date = format_event_date();
$full_width = $args['full_width'] ?? false;
$class = $full_width ? 'article-item article-item--lg' : 'article-item';
?>
<div class="<?= $class; ?>">
    <a href="<?php the_permalink(); ?>" class="article-item__image-container">
        <?=render_webp_picture_by_post( null, 'news-list-picture'); ?>
    </a>
    <div class="article-item__text">
        <div class="article-time">
            <img src="<?= get_asset('/icons/time.svg'); ?>" alt="" /><?php echo $formatted_date; ?>
        </div>
        <a href="<?php the_permalink(); ?>" class="subtitle-16 article-item__link"><?php the_title(); ?></a>
        <? if ($full_width) : ?>
            <p class="article-item__descr text-13"><?php the_excerpt(); ?></p>
        <? endif; ?>
    </div>
</div>