49 lines
2.0 KiB
PHP
49 lines
2.0 KiB
PHP
|
|
<?php
|
||
|
|
/**
|
||
|
|
* Created by HanumanIT Co.,Ltd.
|
||
|
|
* User: kongoon
|
||
|
|
* Date: 2020-02-10
|
||
|
|
* Time: 00:05
|
||
|
|
*/
|
||
|
|
|
||
|
|
use yii\helpers\Html;
|
||
|
|
use yii\helpers\StringHelper;
|
||
|
|
use yii\helpers\Url;
|
||
|
|
|
||
|
|
?>
|
||
|
|
|
||
|
|
<!--
|
||
|
|
<div class="news-block col-lg-4 col-md-6 col-sm-12">
|
||
|
|
<div class="inner-box wow fadeInLeft" data-wow-delay="0ms" data-wow-duration="1500ms">
|
||
|
|
<div class="image">
|
||
|
|
<a href="<?= Url::to(['/post/view', 'slug' => Yii::$app->abt->simpleSlug($model->name), 'id' => $model->id]) ?>"><?= Html::img(Yii::$app->abt->getFirstImage($model->description), ['class' => 'card-img-top img-activity']) ?></a>
|
||
|
|
</div>
|
||
|
|
<div class="lower-content">
|
||
|
|
<ul class="post-info" style="color: whitesmoke">
|
||
|
|
<span> <?= Yii::$app->formatter->asDate($model->publish_at) ?> </span>
|
||
|
|
<span class="fa fa-user"></span> <?= Html::a($model->createdBy->name, ['/site/author', 'id' => $model->created_by]) ?>
|
||
|
|
<a href="<?= Url::to(['/post/view', 'slug' => Yii::$app->abt->simpleSlug($model->name), 'id' => $model->id]) ?>"></a>
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
<h6><?= Html::a($model->name, ['/post/view', 'slug' => Yii::$app->abt->simpleSlug($model->name), 'id' => $model->id]) ?></h6>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
dt-sc-one-half ends-->
|
||
|
|
|
||
|
|
<!-- news activity -->
|
||
|
|
|
||
|
|
|
||
|
|
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
|
||
|
|
<div class="property-3 img-news">
|
||
|
|
<?= Html::img(Yii::$app->abt->getFirstImage($model->description), ['class' => 'img-fluid w-100']) ?>
|
||
|
|
<div class="featured-tag2"><?= Html::a($model->cmsCategory->name, ['/post/index', 'id' => $model->cms_category_id]) ?></div>
|
||
|
|
<div class="ling-section">
|
||
|
|
|
||
|
|
<?= Html::a('<h3>' . StringHelper::truncate(strip_tags($model->name), 50, '...', 'utf-8', false) . '</h4>', ['/post/view', 'slug' => Yii::$app->abt->simpleSlug($model->name), 'id' => $model->id]) ?>
|
||
|
|
|
||
|
|
<a href="<?= Url::to(['/post/view', 'slug' => Yii::$app->abt->simpleSlug($model->name), 'id' => $model->id]) ?>" class="read-more-btn">อ่านต่อ</a>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|