<article class="video-card"<?php if (!empty($videoId)): ?> data-video-id="<?= $videoId ?>"<?php endif; ?>>
    <a href="<?= url('/video/' . $slug) ?>" class="video-card__thumb"<?php if ($timelineSprite !== ''): ?> data-timeline="<?= $timelineSprite ?>" data-timeline-count="<?= $timelineCount ?>"<?php elseif ($preview !== ''): ?> data-preview="<?= $preview ?>"<?php endif; ?>>
        <img src="<?= $thumb ?>" alt="<?= $title ?>" width="320" height="180" decoding="async"<?php if (!empty($imgPriority)): ?> fetchpriority="high"<?php endif; ?> loading="<?= !empty($imgEager) ? 'eager' : 'lazy' ?>" onerror="this.onerror=null;this.style.display='none';this.parentNode.classList.add('video-card__thumb--noimg')">
        <?php 
 ?>
        <?php if ($showDuration): ?>
            <span class="video-card__duration"><?= $duration ?></span>
        <?php endif; ?>
    </a>
    <?php if ($showTitle || $left !== '' || $right !== ''): ?>
        <div class="video-card__info">
            <?php if ($showTitle): ?>
                <h3 class="<?= $titleClass ?>"><a href="<?= url('/video/' . $slug) ?>"><?= $title ?></a></h3>
            <?php endif; ?>
            <?php if ($left !== '' || $right !== ''): ?>
                <div class="video-card__meta">
                    <span><?= $left ?></span>
                    <span><?= $right ?></span>
                </div>
            <?php endif; ?>
        </div>
    <?php endif; ?>
</article>
