<?php
// list_11 标签日期组合卡片（圆角卡片、标签色块）
if (!isset($col) || !is_array($col)) { $col = array(); }
if (!isset($list) || !is_array($list)) { $list = array(); }
$lt11_name  = isset($col['name']) ? $col['name'] : '';
$lt11_intro = isset($col['intro']) ? $col['intro'] : '';
$lt11_cover = isset($col['cover']) ? $col['cover'] : '';
?>
<style>
.yk-list11{padding:20px 15px 40px;}
.yk-list11 .yk-l11-banner{position:relative;border-radius:14px;overflow:hidden;background:#2e1a3d center/cover no-repeat;margin-bottom:28px;padding:60px 30px;color:#fff;text-align:center;}
.yk-list11 .yk-l11-banner::before{content:"";position:absolute;inset:0;background:rgba(35,15,50,.55);}
.yk-list11 .yk-l11-banner-in{position:relative;z-index:1;}
.yk-list11 .yk-l11-crumb{font-size:13px;color:#999;margin-bottom:12px;}
.yk-list11 .yk-l11-banner .yk-l11-crumb{color:rgba(255,255,255,.8);}
.yk-list11 .yk-l11-crumb a{color:inherit;}
.yk-list11 .yk-l11-crumb a:hover{color:var(--yk-accent,#e63946);}
.yk-list11 .yk-l11-title{font-size:28px;font-weight:700;margin-bottom:10px;}
.yk-list11 .yk-l11-intro{font-size:14px;color:#777;max-width:760px;}
.yk-list11 .yk-l11-banner .yk-l11-intro{color:rgba(255,255,255,.85);margin:0 auto;}
.yk-list11 .yk-l11-head{background:#fff;border-radius:14px;padding:25px 30px;margin-bottom:28px;box-shadow:0 1px 4px rgba(0,0,0,.05);}
.yk-list11 .yk-l11-grid{display:flex;flex-wrap:wrap;margin:0 -11px;}
.yk-list11 .yk-l11-cell{width:50%;padding:0 11px;margin-bottom:22px;}
.yk-list11 .yk-l11-card{display:block;background:#fff;border-radius:16px;box-shadow:0 2px 10px rgba(0,0,0,.06);padding:24px 26px;height:100%;transition:transform .25s,box-shadow .25s;border-top:4px solid #5b6cff;}
.yk-list11 .yk-l11-c1{border-top-color:var(--yk-accent,#e63946);}
.yk-list11 .yk-l11-c2{border-top-color:#f08c2e;}
.yk-list11 .yk-l11-c3{border-top-color:#2ea87e;}
.yk-list11 .yk-l11-c4{border-top-color:#5b6cff;}
.yk-list11 .yk-l11-card:hover{transform:translateY(-4px);box-shadow:0 10px 24px rgba(0,0,0,.12);}
.yk-list11 .yk-l11-tags{display:flex;align-items:center;gap:10px;margin-bottom:14px;}
.yk-list11 .yk-l11-tag{display:inline-block;color:#fff;font-size:12px;padding:2px 12px;border-radius:20px;background:#5b6cff;}
.yk-list11 .yk-l11-c1 .yk-l11-tag{background:var(--yk-accent,#e63946);}
.yk-list11 .yk-l11-c2 .yk-l11-tag{background:#f08c2e;}
.yk-list11 .yk-l11-c3 .yk-l11-tag{background:#2ea87e;}
.yk-list11 .yk-l11-c4 .yk-l11-tag{background:#5b6cff;}
.yk-list11 .yk-l11-top{display:inline-block;background:#fff0f1;color:var(--yk-accent,#e63946);border:1px solid var(--yk-accent,#e63946);font-size:12px;padding:0 10px;border-radius:20px;}
.yk-list11 .yk-l11-date{margin-left:auto;font-size:12px;color:#999;font-variant-numeric:tabular-nums;}
.yk-list11 .yk-l11-tt{display:block;font-size:17px;font-weight:700;color:#222;line-height:1.5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.yk-list11 .yk-l11-card:hover .yk-l11-tt{color:var(--yk-accent,#e63946);}
.yk-list11 .yk-l11-desc{display:block;color:#777;font-size:13px;margin-top:10px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.yk-list11 .yk-l11-foot{display:flex;font-size:12px;color:#aaa;margin-top:14px;justify-content:space-between;}
.yk-list11 .yk-l11-empty{width:100%;background:#fff;border-radius:16px;text-align:center;color:#999;padding:70px 0;font-size:14px;}
@media (max-width:1199px){
  .yk-list11 .yk-l11-title{font-size:24px;}
  .yk-list11 .yk-l11-card{padding:20px 22px;}
}
@media (max-width:767px){
  .yk-list11 .yk-l11-cell{width:100%;}
  .yk-list11 .yk-l11-tt{font-size:16px;white-space:normal;}
  .yk-list11 .yk-l11-banner{padding:40px 20px;}
  .yk-list11 .yk-l11-title{font-size:20px;}
}
</style>
<div class="yk-wrap yk-list11">
  <?php if ($lt11_cover !== '') { ?>
  <div class="yk-l11-banner" style="background-image:url('<?php echo e($lt11_cover); ?>')">
    <div class="yk-l11-banner-in">
      <div class="yk-l11-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt11_name); ?></span></div>
      <div class="yk-l11-title"><?php echo e($lt11_name); ?></div>
      <?php if ($lt11_intro !== '') { ?><div class="yk-l11-intro"><?php echo e($lt11_intro); ?></div><?php } ?>
    </div>
  </div>
  <?php } else { ?>
  <div class="yk-l11-head">
    <div class="yk-l11-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt11_name); ?></span></div>
    <div class="yk-l11-title"><?php echo e($lt11_name); ?></div>
    <?php if ($lt11_intro !== '') { ?><div class="yk-l11-intro"><?php echo e($lt11_intro); ?></div><?php } ?>
  </div>
  <?php } ?>
  <div class="yk-l11-grid">
    <?php if (!empty($list)) { ?>
      <?php $lt11_i = 0; foreach ($list as $lt11_it) {
        $lt11_i++;
        $lt11_t  = isset($lt11_it['title']) ? $lt11_it['title'] : '';
        $lt11_u  = isset($lt11_it['url']) ? $lt11_it['url'] : '#';
        $lt11_d  = isset($lt11_it['desc']) ? $lt11_it['desc'] : '';
        $lt11_tm = isset($lt11_it['add_time']) ? fdate($lt11_it['add_time'], 'Y-m-d') : '';
        $lt11_v  = isset($lt11_it['views']) ? (int)$lt11_it['views'] : 0;
        $lt11_cc = 'yk-l11-c'.(($lt11_i - 1) % 4 + 1);
      ?>
      <div class="yk-l11-cell">
        <a class="yk-l11-card <?php echo $lt11_cc; ?>" href="<?php echo e($lt11_u); ?>">
          <span class="yk-l11-tags">
            <span class="yk-l11-tag"><?php echo e($lt11_name !== '' ? $lt11_name : '资讯'); ?></span>
            <?php if (!empty($lt11_it['is_top'])) { ?><span class="yk-l11-top">置顶</span><?php } ?>
            <span class="yk-l11-date"><?php echo e($lt11_tm); ?></span>
          </span>
          <span class="yk-l11-tt"><?php echo e($lt11_t); ?></span>
          <?php if ($lt11_d !== '') { ?><span class="yk-l11-desc"><?php echo e($lt11_d); ?></span><?php } ?>
          <span class="yk-l11-foot"><span>阅读 <?php echo $lt11_v; ?></span><span>查看详情 &gt;</span></span>
        </a>
      </div>
      <?php } ?>
    <?php } else { ?>
      <div class="yk-l11-empty">暂无内容</div>
    <?php } ?>
  </div>
  <?php echo isset($pager) ? $pager : ''; ?>
</div>
