kokjan/frontend/views/page/view.php

113 lines
2.8 KiB
PHP
Executable File

<?php
/* @var $this yii\web\View */
use yii\helpers\HtmlPurifier;
use yii\helpers\Html;
$this->title = $model->name;
$this->params['breadcrumbs'][] = $this->title;
?>
<style>
/* Professional Page Styling (Consistent with Post View) */
.page-view-container {
background: #fff;
border-radius: 30px;
box-shadow: 0 15px 50px rgba(44, 24, 16, 0.05);
border: 1px solid #FFDBBB;
overflow: hidden;
margin-top: -40px; /* Overlap with header */
position: relative;
z-index: 5;
}
.page-header-meta {
background: #fdfaf5;
padding: 15px 40px;
border-bottom: 1px solid #eee;
display: flex;
flex-wrap: wrap;
gap: 25px;
align-items: center;
}
.meta-item {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
color: #888;
font-weight: 600;
}
.meta-item i {
color: #FFC068;
}
.page-body-wrap {
padding: 50px 60px;
position: relative;
}
/* Thai Ornament Decor */
.page-body-wrap::before {
content: '';
position: absolute;
top: 20px; right: 20px;
width: 100px; height: 100px;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M100 0 L100 100 L80 100 L80 20 L0 20 L0 0 Z' fill='%23FFC068' fill-opacity='0.1'/%3E%3C/svg%3E");
background-size: contain;
pointer-events: none;
}
.page-content {
font-size: 18px;
line-height: 1.8;
color: #333;
}
.page-content img {
max-width: 100%;
height: auto !important;
border-radius: 15px;
box-shadow: 0 10px 25px rgba(0,0,0,0.05);
margin: 20px 0;
}
.page-content ul, .page-content ol {
padding-left: 30px;
margin: 20px 0;
}
.page-content li {
margin-bottom: 10px;
}
@media (max-width: 768px) {
.page-header-meta { padding: 15px 20px; }
.page-body-wrap { padding: 30px 20px; }
}
</style>
<div class="page-view-container wow fadeIn">
<!-- Meta Info Bar -->
<div class="page-header-meta">
<div class="meta-item">
<i class="fa fa-clock"></i>
<span>ปรับปรุงล่าสุด: <?= Yii::$app->formatter->asDateTime($model->updated_at) ?></span>
</div>
<div class="meta-item">
<i class="fa fa-eye"></i>
<span>ผู้เข้าชม: <?= number_format($model->hit) ?> ครั้ง</span>
</div>
</div>
<!-- Main Content -->
<div class="page-body-wrap">
<div class="page-content">
<?= $model->description ?>
</div>
</div>
</div>