|
@@ -10,18 +10,19 @@ use app\models\base\Image;
|
|
if( $topic instanceof \app\models\base\NewsTopic ) $url = '/news/';
|
|
if( $topic instanceof \app\models\base\NewsTopic ) $url = '/news/';
|
|
if( $topic instanceof \app\models\base\Story ) $url = '/story/';
|
|
if( $topic instanceof \app\models\base\Story ) $url = '/story/';
|
|
if( $topic instanceof \app\models\base\Tags ) $url = '/tags/';
|
|
if( $topic instanceof \app\models\base\Tags ) $url = '/tags/';
|
|
-
|
|
|
|
|
|
+try{
|
|
$post = Yii::$app->cache->getOrSet("main-page-wide-video-".$design->id,function () use($newsDataProvider){
|
|
$post = Yii::$app->cache->getOrSet("main-page-wide-video-".$design->id,function () use($newsDataProvider){
|
|
return $newsDataProvider->models[0];
|
|
return $newsDataProvider->models[0];
|
|
},600);
|
|
},600);
|
|
$model = $post;
|
|
$model = $post;
|
|
$preview = $model->image;
|
|
$preview = $model->image;
|
|
$key = 'okey';
|
|
$key = 'okey';
|
|
|
|
+
|
|
?>
|
|
?>
|
|
<div class="row partner-news" style="height-min:360px">
|
|
<div class="row partner-news" style="height-min:360px">
|
|
<div class="col-md-8">
|
|
<div class="col-md-8">
|
|
<div class="cont">
|
|
<div class="cont">
|
|
- <iframe width="100%" height="100%" style="aspect-ratio: 16 / 9;" src="https://www.youtube.com/embed/5FNI26lPfgE" title="Crystal Bay Yacht Club | Lamai | Koh Samui | Thailand | Live Beach Webcam | 2160p 4K" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
|
|
|
|
|
+ <iframe width="100%" height="100%" style="aspect-ratio: 16 / 9;" src="https://www.youtube.com/embed/5FNI26lPfgE?autoplay=1" title="Crystal Bay Yacht Club | Lamai | Koh Samui | Thailand | Live Beach Webcam | 2160p 4K" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4" >
|
|
<div class="col-md-4" >
|
|
@@ -38,7 +39,7 @@ $key = 'okey';
|
|
<?php endif;?>
|
|
<?php endif;?>
|
|
<div class="meta">
|
|
<div class="meta">
|
|
<h2 class="title"><?=$model->title?></h2>
|
|
<h2 class="title"><?=$model->title?></h2>
|
|
- <div class="lead" style="font-size: 17px;"><?=$model->lid?></div>
|
|
|
|
|
|
+ <div class="lead" style="font-size: 17px; color: #888;"><?=$model->lid?></div>
|
|
<div class="published_at">
|
|
<div class="published_at">
|
|
<?=$model->publishedAt?>
|
|
<?=$model->publishedAt?>
|
|
<?php
|
|
<?php
|
|
@@ -53,3 +54,7 @@ $key = 'okey';
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+<?
|
|
|
|
+} catch (Exception $e) {
|
|
|
|
+ echo "\n<!-- нет подвязанных новостей (блок с видео)-->\n";
|
|
|
|
+}
|