<?php
// list_6 紧凑表格风（序号/标题/日期 行式）
if (!isset($col) || !is_array($col)) { $col = array(); }
if (!isset($list) || !is_array($list)) { $list = array(); }
$lt6_name  = isset($col['name']) ? $col['name'] : '';
$lt6_intro = isset($col['intro']) ? $col['intro'] : '';
$lt6_cover = isset($col['cover']) ? $col['cover'] : '';
?>
<style>
.yk-list6{padding:20px 15px 40px;}
.yk-list6 .yk-l6-banner{position:relative;border-radius:4px;overflow:hidden;background:#22282f center/cover no-repeat;margin-bottom:24px;padding:52px 30px;color:#fff;text-align:center;}
.yk-list6 .yk-l6-banner::before{content:"";position:absolute;inset:0;background:rgba(15,20,26,.6);}
.yk-list6 .yk-l6-banner-in{position:relative;z-index:1;}
.yk-list6 .yk-l6-crumb{font-size:13px;color:#999;margin-bottom:12px;}
.yk-list6 .yk-l6-banner .yk-l6-crumb{color:rgba(255,255,255,.8);}
.yk-list6 .yk-l6-crumb a{color:inherit;}
.yk-list6 .yk-l6-crumb a:hover{color:var(--yk-accent,#e63946);}
.yk-list6 .yk-l6-title{font-size:26px;font-weight:700;margin-bottom:10px;}
.yk-list6 .yk-l6-intro{font-size:14px;color:#777;max-width:720px;}
.yk-list6 .yk-l6-banner .yk-l6-intro{color:rgba(255,255,255,.85);margin:0 auto;}
.yk-list6 .yk-l6-head{background:#fff;border-radius:4px;padding:24px 28px;margin-bottom:24px;box-shadow:0 1px 4px rgba(0,0,0,.05);}
.yk-list6 .yk-l6-table{background:#fff;border-radius:4px;box-shadow:0 1px 4px rgba(0,0,0,.05);overflow:hidden;}
.yk-list6 .yk-l6-tr{display:flex;align-items:center;padding:12px 24px;border-bottom:1px solid #f0f0f0;font-size:14px;}
.yk-list6 .yk-l6-tr:last-child{border-bottom:none;}
.yk-list6 .yk-l6-th{background:#2f3540;color:#fff;font-size:13px;font-weight:700;padding:12px 24px;border-bottom:none;}
.yk-list6 .yk-l6-tr:not(.yk-l6-th):hover{background:#faf5f5;}
.yk-list6 .yk-l6-no{flex:none;width:56px;color:#999;font-variant-numeric:tabular-nums;}
.yk-list6 .yk-l6-th .yk-l6-no{color:rgba(255,255,255,.7);}
.yk-list6 .yk-l6-tt{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.yk-list6 .yk-l6-th .yk-l6-tt{color:#fff;}
.yk-list6 .yk-l6-top{display:inline-block;background:var(--yk-accent,#e63946);color:#fff;font-size:12px;padding:0 7px;border-radius:2px;margin-right:8px;}
.yk-list6 .yk-l6-date{flex:none;width:110px;text-align:right;color:#999;font-size:13px;font-variant-numeric:tabular-nums;}
.yk-list6 .yk-l6-th .yk-l6-date{color:rgba(255,255,255,.7);}
.yk-list6 .yk-l6-empty{background:#fff;border-radius:4px;text-align:center;color:#999;padding:70px 0;font-size:14px;}
@media (max-width:1199px){
  .yk-list6 .yk-l6-title{font-size:23px;}
  .yk-list6 .yk-l6-tr{padding:12px 18px;}
}
@media (max-width:767px){
  .yk-list6 .yk-l6-tr{padding:10px 12px;font-size:13px;}
  .yk-list6 .yk-l6-no{width:36px;}
  .yk-list6 .yk-l6-date{width:92px;font-size:12px;}
  .yk-list6 .yk-l6-banner{padding:36px 18px;}
  .yk-list6 .yk-l6-title{font-size:20px;}
}
</style>
<div class="yk-wrap yk-list6">
  <?php if ($lt6_cover !== '') { ?>
  <div class="yk-l6-banner" style="background-image:url('<?php echo e($lt6_cover); ?>')">
    <div class="yk-l6-banner-in">
      <div class="yk-l6-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt6_name); ?></span></div>
      <div class="yk-l6-title"><?php echo e($lt6_name); ?></div>
      <?php if ($lt6_intro !== '') { ?><div class="yk-l6-intro"><?php echo e($lt6_intro); ?></div><?php } ?>
    </div>
  </div>
  <?php } else { ?>
  <div class="yk-l6-head">
    <div class="yk-l6-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt6_name); ?></span></div>
    <div class="yk-l6-title"><?php echo e($lt6_name); ?></div>
    <?php if ($lt6_intro !== '') { ?><div class="yk-l6-intro"><?php echo e($lt6_intro); ?></div><?php } ?>
  </div>
  <?php } ?>
  <?php if (!empty($list)) { ?>
  <div class="yk-l6-table">
    <div class="yk-l6-tr yk-l6-th"><span class="yk-l6-no">序号</span><span class="yk-l6-tt">标题</span><span class="yk-l6-date">日期</span></div>
    <?php $lt6_i = 0; foreach ($list as $lt6_it) {
      $lt6_i++;
      $lt6_t  = isset($lt6_it['title']) ? $lt6_it['title'] : '';
      $lt6_u  = isset($lt6_it['url']) ? $lt6_it['url'] : '#';
      $lt6_tm = isset($lt6_it['add_time']) ? fdate($lt6_it['add_time'], 'Y-m-d') : '';
    ?>
    <div class="yk-l6-tr">
      <span class="yk-l6-no"><?php echo $lt6_i; ?></span>
      <a class="yk-l6-tt" href="<?php echo e($lt6_u); ?>"><?php if (!empty($lt6_it['is_top'])) { ?><span class="yk-l6-top">置顶</span><?php } echo e($lt6_t); ?></a>
      <span class="yk-l6-date"><?php echo e($lt6_tm); ?></span>
    </div>
    <?php } ?>
  </div>
  <?php } else { ?>
  <div class="yk-l6-empty">暂无内容</div>
  <?php } ?>
  <?php echo isset($pager) ? $pager : ''; ?>
</div>
