123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?php
- /**
- * @var $post \app\models\News
- * @var \yii\data\ActiveDataProvider $newsDataProvider
- * @var \app\models\base\NewsTopic | \app\models\base\Story $topic
- * @var \app\models\Design $design
- */
- if( $topic instanceof \app\models\base\NewsTopic ) $url = '/news/';
- if( $topic instanceof \app\models\base\Story ) $url = '/story/';
- if( $topic instanceof \app\models\base\Tags ) $url = '/tags/';
- $post = Yii::$app->cache->getOrSet("main-page-wide-widget9-".$design->id,function () use($newsDataProvider){
- return $newsDataProvider->models[0];
- },600);
- ?>
- <div class="wide-widget row partner-news" style="background-color: #516985;padding: 9px 0px;">
- <div class="col-md-8">
- <div class="cont">
- <?php if($post->image instanceof \app\models\base\Image):?>
- <div class="picture-cont-16x9">
- <picture class="w-100">
- <source srcset="<?=$post->image->url?>" media="(min-width: 600px)">
- <img src="<?=$post->image->url?>" alt="<?=htmlentities($post->photo_title,ENT_QUOTES)?>" class="w-100" loading="lazy">
- </picture>
- </div>
- <?php endif;?>
- <div class="meta">
- <h2 class="title">
- <a href="<?=$post->url?>"><?=$post->title?></a>
- </h2>
- <div class="topic">
- <a href="<?=$design->url!=""?$design->url:$url.$topic->url?>" class="wwt"><?=$design->title!=""?$design->title:$topic->title?></a>
- </div>
- <?php
- $comments = $post->commentsAll;
- if(!is_null($comments)){
- $count=count($comments);
- } else{
- $count = 0;
- }
- ?>
- <?php if($count>0 || 1):?>
- <div class="commnets"> <svg class="icon icon-comments"><use xlink:href="/svg/symbol/sprite-clear.svg#comments"></use></svg><?=$count?></div>
- <?php endif;?>
- </div>
- </div>
- </div>
- <div class="d-flex col-md-4" style="align-items: center;background-image: url(/img/bg-radio.jpg);background-clip: content-box;background-size: contain;">
- <div class="cont" style="text-align:center;width:100%">
- <iframe width="99%" height="225" src="https://www.youtube.com/embed/videoseries?list=PLZuTpNfhNHuuUO454fh7VnVn9_mHJzuwS&controls=0&autoplay=0&loop=1&modestbranding=1" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
- </div>
- </div>
- </div>
|