<?php
// list_4 大图通栏卡片（一列大图+摘要）
if (!isset($col) || !is_array($col)) { $col = array(); }
if (!isset($list) || !is_array($list)) { $list = array(); }
$lt4_name  = isset($col['name']) ? $col['name'] : '';
$lt4_intro = isset($col['intro']) ? $col['intro'] : '';
$lt4_cover = isset($col['cover']) ? $col['cover'] : '';
?>
<style>
.yk-list4{padding:20px 15px 40px;}
.yk-list4 .yk-l4-banner{position:relative;border-radius:8px;overflow:hidden;background:#1d3a2f center/cover no-repeat;margin-bottom:28px;padding:60px 30px;color:#fff;text-align:center;}
.yk-list4 .yk-l4-banner::before{content:"";position:absolute;inset:0;background:rgba(10,30,22,.55);}
.yk-list4 .yk-l4-banner-in{position:relative;z-index:1;}
.yk-list4 .yk-l4-crumb{font-size:13px;color:#999;margin-bottom:12px;}
.yk-list4 .yk-l4-banner .yk-l4-crumb{color:rgba(255,255,255,.8);}
.yk-list4 .yk-l4-crumb a{color:inherit;}
.yk-list4 .yk-l4-crumb a:hover{color:var(--yk-accent,#e63946);}
.yk-list4 .yk-l4-title{font-size:28px;font-weight:700;margin-bottom:10px;}
.yk-list4 .yk-l4-intro{font-size:14px;color:#777;max-width:760px;}
.yk-list4 .yk-l4-banner .yk-l4-intro{color:rgba(255,255,255,.85);margin:0 auto;}
.yk-list4 .yk-l4-head{background:#fff;border-radius:8px;padding:25px 30px;margin-bottom:28px;box-shadow:0 1px 4px rgba(0,0,0,.05);}
.yk-list4 .yk-l4-card{background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,.07);margin-bottom:30px;transition:box-shadow .25s;}
.yk-list4 .yk-l4-card:hover{box-shadow:0 10px 26px rgba(0,0,0,.13);}
.yk-list4 .yk-l4-thumb{display:block;height:380px;overflow:hidden;background:#e9ecef;position:relative;}
.yk-list4 .yk-l4-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .4s;}
.yk-list4 .yk-l4-card:hover .yk-l4-thumb img{transform:scale(1.04);}
.yk-list4 .yk-l4-ph{width:100%;height:100%;background:linear-gradient(120deg,#14532d 0%,#2f855a 55%,#68d391 100%);display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.75);font-size:14px;letter-spacing:4px;}
.yk-list4 .yk-l4-top{position:absolute;top:16px;left:16px;background:var(--yk-accent,#e63946);color:#fff;font-size:12px;padding:2px 12px;border-radius:3px;z-index:2;}
.yk-list4 .yk-l4-body{padding:24px 30px 28px;}
.yk-list4 .yk-l4-tt{font-size:22px;font-weight:700;line-height:1.5;display:block;}
.yk-list4 .yk-l4-tt:hover{color:var(--yk-accent,#e63946);}
.yk-list4 .yk-l4-meta{font-size:12px;color:#999;margin:10px 0 14px;display:flex;gap:18px;}
.yk-list4 .yk-l4-desc{color:#666;font-size:14px;line-height:1.9;}
.yk-list4 .yk-l4-more{display:inline-block;margin-top:16px;font-size:13px;color:var(--yk-accent,#e63946);border:1px solid var(--yk-accent,#e63946);border-radius:20px;padding:5px 20px;transition:all .2s;}
.yk-list4 .yk-l4-more:hover{background:var(--yk-accent,#e63946);color:#fff;}
.yk-list4 .yk-l4-empty{background:#fff;border-radius:10px;text-align:center;color:#999;padding:70px 0;font-size:14px;}
@media (max-width:1199px){
  .yk-list4 .yk-l4-thumb{height:300px;}
  .yk-list4 .yk-l4-title{font-size:24px;}
}
@media (max-width:767px){
  .yk-list4 .yk-l4-thumb{height:190px;}
  .yk-list4 .yk-l4-body{padding:18px 18px 22px;}
  .yk-list4 .yk-l4-tt{font-size:17px;}
  .yk-list4 .yk-l4-banner{padding:38px 18px;}
  .yk-list4 .yk-l4-title{font-size:20px;}
}
</style>
<div class="yk-wrap yk-list4">
  <?php if ($lt4_cover !== '') { ?>
  <div class="yk-l4-banner" style="background-image:url('<?php echo e($lt4_cover); ?>')">
    <div class="yk-l4-banner-in">
      <div class="yk-l4-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt4_name); ?></span></div>
      <div class="yk-l4-title"><?php echo e($lt4_name); ?></div>
      <?php if ($lt4_intro !== '') { ?><div class="yk-l4-intro"><?php echo e($lt4_intro); ?></div><?php } ?>
    </div>
  </div>
  <?php } else { ?>
  <div class="yk-l4-head">
    <div class="yk-l4-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt4_name); ?></span></div>
    <div class="yk-l4-title"><?php echo e($lt4_name); ?></div>
    <?php if ($lt4_intro !== '') { ?><div class="yk-l4-intro"><?php echo e($lt4_intro); ?></div><?php } ?>
  </div>
  <?php } ?>
  <?php if (!empty($list)) { ?>
    <?php foreach ($list as $lt4_it) {
      $lt4_t   = isset($lt4_it['title']) ? $lt4_it['title'] : '';
      $lt4_u   = isset($lt4_it['url']) ? $lt4_it['url'] : '#';
      $lt4_img = isset($lt4_it['thumb']) ? $lt4_it['thumb'] : '';
      $lt4_d   = isset($lt4_it['desc']) ? $lt4_it['desc'] : '';
      $lt4_tm  = isset($lt4_it['add_time']) ? fdate($lt4_it['add_time'], 'Y-m-d') : '';
      $lt4_v   = isset($lt4_it['views']) ? (int)$lt4_it['views'] : 0;
    ?>
    <div class="yk-l4-card">
      <a class="yk-l4-thumb" href="<?php echo e($lt4_u); ?>">
        <?php if (!empty($lt4_it['is_top'])) { ?><span class="yk-l4-top">置顶</span><?php } ?>
        <?php if ($lt4_img !== '') { ?><img src="<?php echo e($lt4_img); ?>" alt="<?php echo e($lt4_t); ?>"><?php } else { ?><div class="yk-l4-ph">炎酷CMS</div><?php } ?>
      </a>
      <div class="yk-l4-body">
        <a class="yk-l4-tt" href="<?php echo e($lt4_u); ?>"><?php echo e($lt4_t); ?></a>
        <div class="yk-l4-meta"><span><?php echo e($lt4_tm); ?></span><span>阅读 <?php echo $lt4_v; ?></span></div>
        <?php if ($lt4_d !== '') { ?><div class="yk-l4-desc"><?php echo e($lt4_d); ?></div><?php } ?>
        <a class="yk-l4-more" href="<?php echo e($lt4_u); ?>">阅读全文</a>
      </div>
    </div>
    <?php } ?>
  <?php } else { ?>
    <div class="yk-l4-empty">暂无内容</div>
  <?php } ?>
  <?php echo isset($pager) ? $pager : ''; ?>
</div>
