You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
661 B

7 years ago
<?php
3 years ago
use core\entities\post\Post;
7 years ago
use yii\helpers\Html;
use yii\helpers\Url;
3 years ago
/* @var $this yii\web\View */
/* @var $model Post */
7 years ago
$url = Url::to(['post/post', 'id' =>$model->id]);
?>
<div class="post-item">
<?php if ($model->image): ?>
<div>
<a href="<?= Html::encode($url) ?>">
<img src="<?= Html::encode($model->getThumbFileUrl('image', 'list')) ?>" alt="" class="img-responsive" />
</a>
</div>
<?php endif; ?>
<div class="h2"><a href="<?= Html::encode($url) ?>"><?= Html::encode($model->title) ?></a></div>
<p><?= Yii::$app->formatter->asNtext($model->description) ?></p>
</div>