123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- /**
- * @var $model \app\models\News
- * @var $key
- * @var $index
- * @var $widget
- */
- use app\models\base\Image;
- $preview = $model->image;
- ?>
- <div class="col-md-4">
- <div class="partner-news-item " data-key="<?=$key?>">
- <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">
- <h2 class="title"><?=$model->title?></h2>
- <div class="published_at">
- <?=$model->publishedAt?>
- <?php
- $count=$model->getCommentsAll()->count();
- ?>
- <?php if($count>0):?>
- <span class="commnets"> <svg class="icon icon-comments"><use xlink:href="/svg/symbol/sprite-clear.svg#comments"></use></svg><?=$count?></span>
- <?php endif;?>
- </div>
- </div>
- </a>
- </div>
- </div>
|