<?php
// art_3.html 文章内容页·样式3：宽屏大标题头部色块 + 正文
// 可用变量：$art 文章行(title/content/add_time/views)；$col 所属栏目(id/name，可为 null)
//          $prev $next 上一篇/下一篇(id/title 或 null)；$art['content'] 为管理员富文本，原样输出
$ar3       = isset($art) && is_array($art) ? $art : array();
$ar3_title = isset($ar3['title']) ? $ar3['title'] : '';
$ar3_cont  = isset($ar3['content']) ? $ar3['content'] : '';
$ar3_time  = isset($ar3['add_time']) ? (int)$ar3['add_time'] : 0;
$ar3_views = isset($ar3['views']) ? (int)$ar3['views'] : 0;
$ar3_col   = isset($col) && is_array($col) ? $col : null;
$ar3_prev  = isset($prev) && is_array($prev) ? $prev : null;
$ar3_next  = isset($next) && is_array($next) ? $next : null;
?>
<style>
.yk-art3{padding-bottom:56px;}
.yk-art3 .yk-art3-head{background:linear-gradient(120deg,#16222a 0%,#2b3a5e 55%,#4a6fa5 100%);color:#fff;padding:64px 20px 58px;position:relative;overflow:hidden;}
.yk-art3 .yk-art3-head::after{content:"";position:absolute;right:-80px;bottom:-110px;width:300px;height:300px;border-radius:50%;background:rgba(255,255,255,.06);}
.yk-art3 .yk-art3-headin{max-width:1200px;margin:0 auto;position:relative;z-index:1;}
.yk-art3 .yk-art3-crumb{font-size:13px;color:rgba(255,255,255,.7);margin-bottom:18px;}
.yk-art3 .yk-art3-crumb a{color:rgba(255,255,255,.85);border-bottom:1px dashed rgba(255,255,255,.4);}
.yk-art3 .yk-art3-crumb a:hover{color:#fff;border-bottom-style:solid;}
.yk-art3 .yk-art3-title{font-size:32px;line-height:1.4;margin:0;font-weight:700;}
.yk-art3 .yk-art3-meta{margin-top:16px;font-size:13px;color:rgba(255,255,255,.75);}
.yk-art3 .yk-art3-meta span{margin-right:20px;}
.yk-art3 .yk-art3-body{max-width:1200px;margin:28px auto 0;background:#fff;border-radius:10px;box-shadow:0 1px 4px rgba(0,0,0,.05);padding:38px 44px;font-size:16px;line-height:2;color:#333;word-wrap:break-word;}
.yk-art3 .yk-art3-body img{max-width:100%;height:auto;border-radius:6px;}
.yk-art3 .yk-art3-body p{margin:0 0 1em;}
.yk-art3 .yk-art3-body h2,.yk-art3 .yk-art3-body h3{color:#2b3a5e;margin:1.3em 0 .6em;}
.yk-art3 .yk-art3-body blockquote{margin:1.2em 0;padding:14px 20px;background:#f2f6fb;border-left:4px solid #4a6fa5;color:#5a6b85;}
.yk-art3 .yk-art3-pn{max-width:880px;margin:36px auto 0;padding:20px 24px 0;border-top:1px solid #e8ecf2;font-size:14px;display:flex;justify-content:space-between;gap:20px;}
.yk-art3 .yk-art3-pn a{color:#2b3a5e;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block;max-width:100%;vertical-align:bottom;}
.yk-art3 .yk-art3-pn a:hover{color:var(--yk-accent,#e63946);}
.yk-art3 .yk-art3-pn .yk-art3-none{color:#bbb;}
.yk-art3 .yk-art3-pn .yk-art3-pi{min-width:0;}
@media (max-width:1199px){
  .yk-art3 .yk-art3-head{padding:52px 20px 48px;}
  .yk-art3 .yk-art3-title{font-size:27px;}
}
@media (max-width:767px){
  .yk-art3{padding-bottom:36px;}
  .yk-art3 .yk-art3-head{padding:38px 16px 34px;}
  .yk-art3 .yk-art3-title{font-size:21px;}
  .yk-art3 .yk-art3-body{padding:28px 16px 0;font-size:14px;line-height:1.9;}
  .yk-art3 .yk-art3-pn{flex-direction:column;gap:8px;padding:16px 16px 0;margin-top:26px;}
}
</style>
<div class="yk-art3">
  <div class="yk-art3-head">
    <div class="yk-art3-headin">
      <div class="yk-art3-crumb">
        <a href="<?php echo e(url_home()); ?>">首页</a>
        <?php if ($ar3_col && isset($ar3_col['id'])) { ?> &gt; <a href="<?php echo e(url_col($ar3_col['id'])); ?>"><?php echo e(isset($ar3_col['name']) ? $ar3_col['name'] : ''); ?></a><?php } ?>
        &gt; <span>正文</span>
      </div>
      <h1 class="yk-art3-title"><?php echo e($ar3_title); ?></h1>
      <div class="yk-art3-meta">
        <?php if ($ar3_col && isset($ar3_col['name'])) { ?><span>栏目：<?php echo e($ar3_col['name']); ?></span><?php } ?>
        <span>时间：<?php echo e(fdate($ar3_time, 'Y-m-d')); ?></span>
        <span>阅读：<?php echo $ar3_views; ?></span>
      </div>
    </div>
  </div>
  <div class="yk-art3-body"><?php echo $ar3_cont; /* 管理员富文本，原样输出 */ ?></div>
  <div class="yk-art3-pn">
    <div class="yk-art3-pi">上一篇：<?php if ($ar3_prev) { ?><a href="<?php echo e(url_art($ar3_prev['id'])); ?>"><?php echo e($ar3_prev['title']); ?></a><?php } else { ?><span class="yk-art3-none">没有了</span><?php } ?></div>
    <div class="yk-art3-pi">下一篇：<?php if ($ar3_next) { ?><a href="<?php echo e(url_art($ar3_next['id'])); ?>"><?php echo e($ar3_next['title']); ?></a><?php } else { ?><span class="yk-art3-none">没有了</span><?php } ?></div>
  </div>
</div>
