<?php
// list_9 三列图片网格（图下标题+日期）
if (!isset($col) || !is_array($col)) { $col = array(); }
if (!isset($list) || !is_array($list)) { $list = array(); }
$lt9_name  = isset($col['name']) ? $col['name'] : '';
$lt9_intro = isset($col['intro']) ? $col['intro'] : '';
$lt9_cover = isset($col['cover']) ? $col['cover'] : '';
?>
<style>
.yk-list9{padding:20px 15px 40px;}
.yk-list9 .yk-l9-banner{position:relative;border-radius:8px;overflow:hidden;background:#12333b center/cover no-repeat;margin-bottom:26px;padding:56px 30px;color:#fff;text-align:center;}
.yk-list9 .yk-l9-banner::before{content:"";position:absolute;inset:0;background:rgba(8,35,42,.55);}
.yk-list9 .yk-l9-banner-in{position:relative;z-index:1;}
.yk-list9 .yk-l9-crumb{font-size:13px;color:#999;margin-bottom:12px;}
.yk-list9 .yk-l9-banner .yk-l9-crumb{color:rgba(255,255,255,.8);}
.yk-list9 .yk-l9-crumb a{color:inherit;}
.yk-list9 .yk-l9-crumb a:hover{color:var(--yk-accent,#e63946);}
.yk-list9 .yk-l9-title{font-size:28px;font-weight:700;margin-bottom:10px;}
.yk-list9 .yk-l9-intro{font-size:14px;color:#777;max-width:760px;}
.yk-list9 .yk-l9-banner .yk-l9-intro{color:rgba(255,255,255,.85);margin:0 auto;}
.yk-list9 .yk-l9-head{background:#fff;border-radius:8px;padding:25px 30px;margin-bottom:26px;box-shadow:0 1px 4px rgba(0,0,0,.05);}
.yk-list9 .yk-l9-grid{display:flex;flex-wrap:wrap;margin:0 -10px;}
.yk-list9 .yk-l9-cell{width:33.3333%;padding:0 10px;margin-bottom:24px;}
.yk-list9 .yk-l9-card{background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 1px 5px rgba(0,0,0,.07);height:100%;transition:transform .25s,box-shadow .25s;}
.yk-list9 .yk-l9-card:hover{transform:translateY(-4px);box-shadow:0 8px 20px rgba(0,0,0,.12);}
.yk-list9 .yk-l9-thumb{display:block;height:210px;overflow:hidden;background:#e9ecef;position:relative;}
.yk-list9 .yk-l9-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .35s;}
.yk-list9 .yk-l9-card:hover .yk-l9-thumb img{transform:scale(1.08);}
.yk-list9 .yk-l9-ph{width:100%;height:100%;background:linear-gradient(140deg,#0f4c5c 0%,#2a7f8f 55%,#5fb8a5 100%);display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.75);font-size:13px;letter-spacing:3px;}
.yk-list9 .yk-l9-top{position:absolute;top:10px;left:10px;background:var(--yk-accent,#e63946);color:#fff;font-size:12px;padding:1px 9px;border-radius:3px;z-index:2;}
.yk-list9 .yk-l9-body{padding:14px 16px 16px;}
.yk-list9 .yk-l9-tt{font-size:15px;font-weight:700;line-height:1.5;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.yk-list9 .yk-l9-tt:hover{color:var(--yk-accent,#e63946);}
.yk-list9 .yk-l9-meta{display:flex;justify-content:space-between;font-size:12px;color:#999;margin-top:10px;}
.yk-list9 .yk-l9-empty{width:100%;background:#fff;border-radius:8px;text-align:center;color:#999;padding:70px 0;font-size:14px;}
@media (max-width:1199px){
  .yk-list9 .yk-l9-thumb{height:170px;}
  .yk-list9 .yk-l9-title{font-size:24px;}
}
@media (max-width:767px){
  .yk-list9 .yk-l9-cell{width:50%;}
  .yk-list9 .yk-l9-thumb{height:130px;}
  .yk-list9 .yk-l9-tt{font-size:14px;}
  .yk-list9 .yk-l9-banner{padding:38px 18px;}
  .yk-list9 .yk-l9-title{font-size:20px;}
}
@media (max-width:480px){
  .yk-list9 .yk-l9-cell{width:100%;}
  .yk-list9 .yk-l9-thumb{height:170px;}
}
</style>
<div class="yk-wrap yk-list9">
  <?php if ($lt9_cover !== '') { ?>
  <div class="yk-l9-banner" style="background-image:url('<?php echo e($lt9_cover); ?>')">
    <div class="yk-l9-banner-in">
      <div class="yk-l9-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt9_name); ?></span></div>
      <div class="yk-l9-title"><?php echo e($lt9_name); ?></div>
      <?php if ($lt9_intro !== '') { ?><div class="yk-l9-intro"><?php echo e($lt9_intro); ?></div><?php } ?>
    </div>
  </div>
  <?php } else { ?>
  <div class="yk-l9-head">
    <div class="yk-l9-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt9_name); ?></span></div>
    <div class="yk-l9-title"><?php echo e($lt9_name); ?></div>
    <?php if ($lt9_intro !== '') { ?><div class="yk-l9-intro"><?php echo e($lt9_intro); ?></div><?php } ?>
  </div>
  <?php } ?>
  <div class="yk-l9-grid">
    <?php if (!empty($list)) { ?>
      <?php foreach ($list as $lt9_it) {
        $lt9_t   = isset($lt9_it['title']) ? $lt9_it['title'] : '';
        $lt9_u   = isset($lt9_it['url']) ? $lt9_it['url'] : '#';
        $lt9_img = isset($lt9_it['thumb']) ? $lt9_it['thumb'] : '';
        $lt9_tm  = isset($lt9_it['add_time']) ? fdate($lt9_it['add_time'], 'Y-m-d') : '';
        $lt9_v   = isset($lt9_it['views']) ? (int)$lt9_it['views'] : 0;
      ?>
      <div class="yk-l9-cell">
        <div class="yk-l9-card">
          <a class="yk-l9-thumb" href="<?php echo e($lt9_u); ?>">
            <?php if (!empty($lt9_it['is_top'])) { ?><span class="yk-l9-top">置顶</span><?php } ?>
            <?php if ($lt9_img !== '') { ?><img src="<?php echo e($lt9_img); ?>" alt="<?php echo e($lt9_t); ?>"><?php } else { ?><div class="yk-l9-ph">炎酷CMS</div><?php } ?>
          </a>
          <div class="yk-l9-body">
            <a class="yk-l9-tt" href="<?php echo e($lt9_u); ?>"><?php echo e($lt9_t); ?></a>
            <div class="yk-l9-meta"><span><?php echo e($lt9_tm); ?></span><span>阅读 <?php echo $lt9_v; ?></span></div>
          </div>
        </div>
      </div>
      <?php } ?>
    <?php } else { ?>
      <div class="yk-l9-empty">暂无内容</div>
    <?php } ?>
  </div>
  <?php echo isset($pager) ? $pager : ''; ?>
</div>
