<?php
// list_3 纯文字列表（标题左、日期右，悬停变色）
if (!isset($col) || !is_array($col)) { $col = array(); }
if (!isset($list) || !is_array($list)) { $list = array(); }
$lt3_name  = isset($col['name']) ? $col['name'] : '';
$lt3_intro = isset($col['intro']) ? $col['intro'] : '';
$lt3_cover = isset($col['cover']) ? $col['cover'] : '';
?>
<style>
.yk-list3{padding:20px 15px 40px;}
.yk-list3 .yk-l3-banner{position:relative;border-radius:10px;overflow:hidden;background:#33251f center/cover no-repeat;margin-bottom:25px;padding:56px 30px;color:#fff;text-align:center;}
.yk-list3 .yk-l3-banner::before{content:"";position:absolute;inset:0;background:rgba(40,25,15,.55);}
.yk-list3 .yk-l3-banner-in{position:relative;z-index:1;}
.yk-list3 .yk-l3-crumb{font-size:13px;color:#999;margin-bottom:12px;}
.yk-list3 .yk-l3-banner .yk-l3-crumb{color:rgba(255,255,255,.8);}
.yk-list3 .yk-l3-crumb a{color:inherit;}
.yk-list3 .yk-l3-crumb a:hover{color:var(--yk-accent,#e63946);}
.yk-list3 .yk-l3-title{font-size:26px;font-weight:700;margin-bottom:10px;}
.yk-list3 .yk-l3-intro{font-size:14px;color:#777;max-width:720px;}
.yk-list3 .yk-l3-banner .yk-l3-intro{color:rgba(255,255,255,.85);margin:0 auto;}
.yk-list3 .yk-l3-head{background:var(--yk-side-bg,#fff);border-radius:10px;padding:25px 30px;margin-bottom:25px;box-shadow:0 1px 4px rgba(0,0,0,.05);}
.yk-list3 .yk-l3-head .yk-l3-title{color:var(--yk-side-color,#333);}
.yk-list3 .yk-l3-list{background:#fff;border-radius:10px;box-shadow:0 1px 4px rgba(0,0,0,.05);padding:0 28px;}
.yk-list3 .yk-l3-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0;border-bottom:1px solid #f0f0f0;}
.yk-list3 .yk-l3-row:last-child{border-bottom:none;}
.yk-list3 .yk-l3-tt{flex:1;min-width:0;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;position:relative;padding-left:16px;}
.yk-list3 .yk-l3-tt::before{content:"";position:absolute;left:0;top:50%;margin-top:-3px;width:6px;height:6px;border-radius:50%;background:#ccc;transition:background .2s;}
.yk-list3 .yk-l3-row:hover .yk-l3-tt{color:var(--yk-accent,#e63946);}
.yk-list3 .yk-l3-row:hover .yk-l3-tt::before{background:var(--yk-accent,#e63946);}
.yk-list3 .yk-l3-top{flex:none;background:var(--yk-accent,#e63946);color:#fff;font-size:12px;padding:1px 8px;border-radius:3px;}
.yk-list3 .yk-l3-date{flex:none;color:#999;font-size:13px;font-variant-numeric:tabular-nums;}
.yk-list3 .yk-l3-empty{background:#fff;border-radius:10px;text-align:center;color:#999;padding:70px 0;font-size:14px;}
@media (max-width:1199px){
  .yk-list3 .yk-l3-title{font-size:23px;}
  .yk-list3 .yk-l3-list{padding:0 22px;}
}
@media (max-width:767px){
  .yk-list3 .yk-l3-list{padding:0 14px;}
  .yk-list3 .yk-l3-row{padding:13px 0;gap:10px;}
  .yk-list3 .yk-l3-tt{font-size:14px;}
  .yk-list3 .yk-l3-date{font-size:12px;}
  .yk-list3 .yk-l3-banner{padding:38px 18px;}
  .yk-list3 .yk-l3-title{font-size:20px;}
}
</style>
<div class="yk-wrap yk-list3">
  <?php if ($lt3_cover !== '') { ?>
  <div class="yk-l3-banner" style="background-image:url('<?php echo e($lt3_cover); ?>')">
    <div class="yk-l3-banner-in">
      <div class="yk-l3-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt3_name); ?></span></div>
      <div class="yk-l3-title"><?php echo e($lt3_name); ?></div>
      <?php if ($lt3_intro !== '') { ?><div class="yk-l3-intro"><?php echo e($lt3_intro); ?></div><?php } ?>
    </div>
  </div>
  <?php } else { ?>
  <div class="yk-l3-head">
    <div class="yk-l3-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt3_name); ?></span></div>
    <div class="yk-l3-title"><?php echo e($lt3_name); ?></div>
    <?php if ($lt3_intro !== '') { ?><div class="yk-l3-intro"><?php echo e($lt3_intro); ?></div><?php } ?>
  </div>
  <?php } ?>
  <div class="yk-llayout">
  <?php echo list_side_html(isset($side) ? $side : array()); ?>
  <div class="yk-lmain">
  <?php if (!empty($list)) { ?>
  <div class="yk-l3-list">
    <?php foreach ($list as $lt3_it) {
      $lt3_t  = isset($lt3_it['title']) ? $lt3_it['title'] : '';
      $lt3_u  = isset($lt3_it['url']) ? $lt3_it['url'] : '#';
      $lt3_tm = isset($lt3_it['add_time']) ? fdate($lt3_it['add_time'], 'Y-m-d') : '';
    ?>
    <div class="yk-l3-row">
      <a class="yk-l3-tt" href="<?php echo e($lt3_u); ?>"><?php echo e($lt3_t); ?></a>
      <?php if (!empty($lt3_it['is_top'])) { ?><span class="yk-l3-top">置顶</span><?php } ?>
      <span class="yk-l3-date"><?php echo e($lt3_tm); ?></span>
    </div>
    <?php } ?>
  </div>
  <?php } else { ?>
  <div class="yk-l3-empty">暂无内容</div>
  <?php } ?>
  <?php echo isset($pager) ? $pager : ''; ?>
  </div>
  </div>
</div>
