kokjan/frontend/views/post/index.php

95 lines
2.8 KiB
PHP
Executable File

<?php
/* @var $this yii\web\View */
use yii\widgets\ListView;
$this->title = $category->name;
$this->params['breadcrumbs'][] = $this->title;
?>
<style>
.post-index-wrap {
padding: 30px 0;
}
.list-view-ul {
list-style: none !important;
padding: 0 !important;
margin: 0 !important;
}
.list-view-ul li {
margin-bottom: 15px;
}
/* Modern Peach & Gold Pagination - Clean Version */
.pagination {
border-radius: 0;
overflow: visible;
padding: 0;
background: transparent;
box-shadow: none !important;
border: none !important;
}
.pagination .page-item {
margin: 0 4px;
}
.pagination .page-item .page-link {
border: 1px solid #FFDBBB; /* Soft Peach Border */
color: #2c1810; /* Deep Brown Text */
border-radius: 50% !important;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
font-family: 'Google Sans', sans-serif;
font-weight: 600;
transition: all 0.3s ease;
padding: 0;
}
.pagination .page-item.active .page-link {
background: linear-gradient(135deg, #FFC068 0%, #ff8f00 100%) !important; /* Warm Gold Gradient */
border-color: #FFC068 !important;
color: #fff !important;
box-shadow: 0 4px 10px rgba(255, 143, 0, 0.3);
}
.pagination .page-item:hover:not(.active) .page-link {
background-color: #FFDBBB; /* Soft Peach Hover */
color: #8e1d1d;
border-color: #FFC068;
}
.pagination .page-item.disabled .page-link {
color: #ccc;
border-color: #eee;
background: #f9f9f9;
}
.pagination .page-item.prev .page-link,
.pagination .page-item.next .page-link {
border-radius: 20px !important;
width: auto;
padding: 0 15px;
}
</style>
<div class="post-index-wrap">
<?= ListView::widget([
'summary' => false,
'layout' => "{items}\n<div class='col-12 mt-5 d-flex justify-content-center'>{pager}</div>",
'pager' => [
'class' => 'yii\bootstrap4\LinkPager',
'options' => ['class' => 'pagination shadow-sm'],
'linkContainerOptions' => ['class' => 'page-item'],
'linkOptions' => ['class' => 'page-link'],
'disabledListItemSubTagOptions' => ['tag' => 'span', 'class' => 'page-link'],
],
'dataProvider' => $dataProvider,
'itemView' => ($display == 'card' ? '_post_card' : '_post_ul'),
'options' => [
'class' => 'list-view '.($display == 'card' ? 'row' : 'list-view-ul'),
'tag' => ($display == 'card' ? 'div' : 'ul'),
],
'itemOptions' => [
'tag' => ($display == 'card' ? false : 'li'),
]
])?>
</div>