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.

38 lines
1.1 KiB

7 years ago
<?php
3 years ago
use core\entities\post\Post;
7 years ago
use yii\helpers\Html;
3 years ago
use yii\helpers\StringHelper;
use yii\web\View;
7 years ago
/**
3 years ago
* @var $this View
* @var $post Post
7 years ago
*/
?>
<div class="col-md-12">
<!-- Post Future-->
<article class="post-future post-future-horizontal">
<a class="post-future-figure" href="#">
<img src="<?= Html::encode($post->getThumbFileUrl('image', '370_325')) ?>" alt="<?= Html::encode($post->title) ?>" />
</a>
<div class="post-future-main">
<h4 class="post-future-title">
3 years ago
<?= Html::a(StringHelper::truncateWords(Html::encode($post->title), 8, '...'), '#') ?>
7 years ago
</h4>
<div class="post-future-meta">
<!-- Badge-->
<div class="badge badge-secondary"><?= $post->category->name ?></div>
<div class="post-future-time"><span class="icon fa fa-calendar"></span>
<time datetime="<?= date('Y') ?>"><?= Yii::$app->formatter->asDate($post->published_at, 'php:d F, Y') ?></time>
</div>
</div>
<hr>
<div class="post-future-text">
3 years ago
<p><?= StringHelper::truncateWords(Html::encode($post->description), 16, '...') ?></p>
7 years ago
</div>
</div>
</article>
3 years ago
</div>