114 lines
2.8 KiB
PHP
Executable File
114 lines
2.8 KiB
PHP
Executable File
<?php
|
|
use yii\helpers\Html;
|
|
?>
|
|
|
|
<style>
|
|
.modern-list-item {
|
|
background: #fff;
|
|
border-radius: 15px;
|
|
padding: 15px 25px;
|
|
border: 1px solid #FFDBBB;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
transition: all 0.3s ease;
|
|
margin-bottom: 12px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.modern-list-item::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: 0; top: 0; bottom: 0;
|
|
width: 5px;
|
|
background: #8e1d1d;
|
|
opacity: 0;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
|
|
.modern-list-item:hover {
|
|
border-color: #FFC068;
|
|
transform: translateX(10px);
|
|
box-shadow: 0 5px 15px rgba(44, 24, 16, 0.05);
|
|
}
|
|
|
|
.modern-list-item:hover::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
.list-item-content {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
flex-grow: 1;
|
|
}
|
|
|
|
.list-item-title {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
color: #2c1810;
|
|
transition: color 0.3s ease;
|
|
text-decoration: none !important;
|
|
}
|
|
|
|
.modern-list-item:hover .list-item-title {
|
|
color: #8e1d1d;
|
|
}
|
|
|
|
.list-item-meta {
|
|
display: flex;
|
|
gap: 15px;
|
|
font-size: 12px;
|
|
color: #999;
|
|
}
|
|
|
|
.list-item-meta span i {
|
|
color: #FFC068;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.list-item-action {
|
|
flex-shrink: 0;
|
|
margin-left: 20px;
|
|
}
|
|
|
|
.btn-read-circle {
|
|
width: 35px;
|
|
height: 35px;
|
|
background: #fdfaf5;
|
|
border: 1px solid #FFDBBB;
|
|
color: #FFC068;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.modern-list-item:hover .btn-read-circle {
|
|
background: #8e1d1d;
|
|
color: #fff;
|
|
border-color: #8e1d1d;
|
|
transform: rotate(360deg);
|
|
}
|
|
</style>
|
|
|
|
<div class="modern-list-item wow fadeInRight">
|
|
<div class="list-item-content">
|
|
<?= Html::a($model->name, ['/post/view', 'id' => $model->id, 'slug' => Yii::$app->abt->simpleSlug($model->name)], [
|
|
'class' => 'list-item-title'
|
|
]) ?>
|
|
<div class="list-item-meta">
|
|
<span><i class="fa fa-calendar-alt"></i> <?= Yii::$app->formatter->asDate($model->publish_at) ?></span>
|
|
<span><i class="fa fa-eye"></i> <?= number_format($model->hit) ?> เข้าชม</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="list-item-action">
|
|
<?= Html::a('<i class="fa fa-chevron-right"></i>', ['/post/view', 'id' => $model->id, 'slug' => Yii::$app->abt->simpleSlug($model->name)], [
|
|
'class' => 'btn-read-circle'
|
|
]) ?>
|
|
</div>
|
|
</div>
|