<?php
$file=Yii::getAlias('@app/web/img/box3.jpg');
$image=Yii::$app->image->load($file);
echo $image->resize(200,200)->rotate(30)->render();?>
<?php if ($item->category == "ALANÆ LIFE"): ?>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<article class="post img-thumbnail with-border post-list">
<div class="post-holder">
<div class="row">
<div class="col-md-8">
<figure>
<a href="<?= Url::to(["/post/index", 'id' => $item->id]) ?>">
<?php if(empty($item->img)):?>
<?= Html::img("@backend/web/images/store/no-images.jpg")?></a>
<?php endif?>
<?php
$file=Yii::getAlias('@app/web/img/box3.jpg');
$image=Yii::$app->image->load($file);
echo $image->resize(100,100);
?>
<?= Html::img("@backend/web/images/store/{$item->img}") ?></a>
<ul class="post-meta">
<li>
<a href="<?= Url::to(["/post/index", 'id' => $item->id]) ?>">
<em><?= mb_substr($item->date, 8, 2, 'UTF-8')?></em>
<em>
<?php
$dateObj = \DateTime::createFromFormat('!m', mb_substr($item->date, 5, 2));
echo mb_substr($dateObj->format('F'), 0, 3);
?>
</em>
</a>
</li>
</ul>
</figure>
</div>
<div class="col-md-4">
<div class="post-head">
<h2>
<a href="<?= Url::to(["/post/index", 'id' => $item->id]) ?>">
<?php switch (Yii::$app->language): case"ru-RU": ?>
<?= $item->title_ru ?>
<?php break ?>
<?php
case"en-US":
?>
<?= $item->title_en ?>
<?php break ?>
<?php
case
"ir-IR":
?>
<?= $item->title_ir ?>
<?php break ?>
<?php endswitch?>
</a></h2>
</div>
<div class="description">
<p>
<?php switch (Yii::$app->language): case"ru-RU": ?>
<?= mb_substr('<p>' . $item->text_ru . '</p>', 0, 300, 'UTF-8') . ' <b>. . . </b>'; ?></p>
<?php break ?>
<?php
case"en-US":
?>
<?= mb_substr('<p>' . $item->text_en . '</p>', 0, 300, 'UTF-8') . ' <b>. . . </b>'; ?></p>
<?php break ?>
<?php
case
"ir-IR":
?>
<?= mb_substr('<p>' . $item->text_ir . '</p>', 0, 300, 'UTF-8') . ' <b>. . . </b>'; ?></p>
<?php break ?>
<?php endswitch?>
</p>
</div>