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.

36 lines
1.1 KiB

7 years ago
<?php
use yii\helpers\Html;
/**
* @var $this \yii\web\View
* @var $post \core\entities\post\Post
*/
?>
<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">
<?= Html::a(\yii\helpers\StringHelper::truncateWords(Html::encode($post->title), 8, '...'), '#') ?>
</h4>
<div class="post-future-meta">
<!-- Badge-->
<!-- <div class="badge badge-red">hot<span class="icon fa fa-bolt"></span></div> -->
<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">
<p><?= \yii\helpers\StringHelper::truncateWords(Html::encode($post->description), 16, '...') ?></p>
</div>
</div>
</article>
</div>