12345678910111213141516171819202122232425262728 |
- <?php
- use app\models\base\Image;
- $preview = $model->preview;
- ?>
- <div class="topic-news-item col-md-4" >
- <a href="<?=$model->url?>">
- <?php if($preview instanceof \app\models\base\Image):?>
- <div class="picture-cont-16x9">
- <picture class="w-100">
- <source srcset="<?=$preview->getUrl(Image::SIZE_680x383,"jpg")?>" media="(min-width: 600px)">
- <source srcset="<?=$preview->getUrl(Image::SIZE_680x383,"webp")?>" media="(min-width: 600px)">
- <img src="<?=$preview->getUrl(Image::SIZE_680x383)?>" alt="<?=$model->photo_title?>" class="w-100" loading="lazy">
- </picture>
- </div>
- <?php endif;?>
- <div class="meta">
- <h3 class="title"><?=$model->title?></h3>
- <div class="published_at">
- <?=$model->publishedAt?>
- </div>
- </div>
- </a>
- </div>
|