<?php
// list_1 经典左缩略图右文字列表（分割线）
if (!isset($col) || !is_array($col)) { $col = array(); }
if (!isset($list) || !is_array($list)) { $list = array(); }
$lt1_name  = isset($col['name']) ? $col['name'] : '';
$lt1_intro = isset($col['intro']) ? $col['intro'] : '';
$lt1_cover = isset($col['cover']) ? $col['cover'] : '';
?>
<style>
.yk-list1{padding:20px 15px 40px;}
.yk-list1 .yk-l1-banner{position:relative;border-radius:10px;overflow:hidden;background:#1c2b45 center/cover no-repeat;margin-bottom:25px;padding:60px 30px;color:#fff;text-align:center;}
.yk-list1 .yk-l1-banner::before{content:"";position:absolute;inset:0;background:rgba(15,25,45,.55);}
.yk-list1 .yk-l1-banner-in{position:relative;z-index:1;}
.yk-list1 .yk-l1-crumb{font-size:13px;color:#999;margin-bottom:12px;}
.yk-list1 .yk-l1-banner .yk-l1-crumb{color:rgba(255,255,255,.8);}
.yk-list1 .yk-l1-crumb a{color:inherit;}
.yk-list1 .yk-l1-crumb a:hover{color:var(--yk-accent,#e63946);}
.yk-list1 .yk-l1-title{font-size:28px;font-weight:700;margin-bottom:10px;}
.yk-list1 .yk-l1-intro{font-size:14px;color:#777;max-width:760px;}
.yk-list1 .yk-l1-banner .yk-l1-intro{color:rgba(255,255,255,.85);margin:0 auto;}
.yk-list1 .yk-l1-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-list1 .yk-l1-head .yk-l1-title{color:var(--yk-side-color,#333);}
.yk-list1 .yk-l1-item{display:flex;gap:22px;padding:22px 0;border-bottom:1px solid #e8e8e8;}
.yk-list1 .yk-l1-list{background:#fff;border-radius:10px;padding:8px 25px;box-shadow:0 1px 4px rgba(0,0,0,.05);}
.yk-list1 .yk-l1-item:last-child{border-bottom:none;}
.yk-list1 .yk-l1-thumb{flex:none;width:220px;height:148px;border-radius:8px;overflow:hidden;background:#e9ecef;}
.yk-list1 .yk-l1-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .3s;}
.yk-list1 .yk-l1-item:hover .yk-l1-thumb img{transform:scale(1.06);}
.yk-list1 .yk-l1-ph{width:100%;height:100%;background:linear-gradient(135deg,#2b3a5e 0%,#4a6fa5 60%,#7aa5d2 100%);display:flex;align-items:center;justify-content:center;color:rgba(255,255,255,.75);font-size:13px;letter-spacing:3px;}
.yk-list1 .yk-l1-body{flex:1;min-width:0;}
.yk-list1 .yk-l1-tt{font-size:18px;font-weight:700;line-height:1.5;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.yk-list1 .yk-l1-tt:hover{color:var(--yk-accent,#e63946);}
.yk-list1 .yk-l1-top{display:inline-block;background:var(--yk-accent,#e63946);color:#fff;font-size:12px;padding:1px 8px;border-radius:3px;margin-right:8px;vertical-align:2px;}
.yk-list1 .yk-l1-desc{color:#777;font-size:13px;margin:10px 0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.yk-list1 .yk-l1-meta{font-size:12px;color:#999;display:flex;gap:18px;}
.yk-list1 .yk-l1-empty{background:#fff;border-radius:10px;text-align:center;color:#999;padding:70px 0;font-size:14px;}
@media (max-width:1199px){
  .yk-list1 .yk-l1-thumb{width:190px;height:128px;}
  .yk-list1 .yk-l1-title{font-size:24px;}
}
@media (max-width:767px){
  .yk-list1 .yk-l1-item{flex-direction:column;gap:12px;padding:16px 0;}
  .yk-list1 .yk-l1-thumb{width:100%;height:170px;}
  .yk-list1 .yk-l1-banner{padding:40px 20px;}
  .yk-list1 .yk-l1-title{font-size:20px;}
  .yk-list1 .yk-l1-tt{font-size:16px;white-space:normal;}
}
</style>
<div class="yk-wrap yk-list1">
  <?php if ($lt1_cover !== '') { ?>
  <div class="yk-l1-banner" style="background-image:url('<?php echo e($lt1_cover); ?>')">
    <div class="yk-l1-banner-in">
      <div class="yk-l1-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt1_name); ?></span></div>
      <div class="yk-l1-title"><?php echo e($lt1_name); ?></div>
      <?php if ($lt1_intro !== '') { ?><div class="yk-l1-intro"><?php echo e($lt1_intro); ?></div><?php } ?>
    </div>
  </div>
  <?php } else { ?>
  <div class="yk-l1-head">
    <div class="yk-l1-crumb"><a href="<?php echo e(url_home()); ?>">首页</a> &gt; <span><?php echo e($lt1_name); ?></span></div>
    <div class="yk-l1-title"><?php echo e($lt1_name); ?></div>
    <?php if ($lt1_intro !== '') { ?><div class="yk-l1-intro"><?php echo e($lt1_intro); ?></div><?php } ?>
  </div>
  <?php } ?>
  <div class="yk-llayout">
  <?php echo list_side_html(isset($side) ? $side : array()); ?>
  <div class="yk-lmain">
  <div class="yk-l1-list">
    <?php if (!empty($list)) { ?>
      <?php foreach ($list as $lt1_it) {
        $lt1_t   = isset($lt1_it['title']) ? $lt1_it['title'] : '';
        $lt1_u   = isset($lt1_it['url']) ? $lt1_it['url'] : '#';
        $lt1_img = isset($lt1_it['thumb']) ? $lt1_it['thumb'] : '';
        $lt1_d   = isset($lt1_it['desc']) ? $lt1_it['desc'] : '';
        $lt1_tm  = isset($lt1_it['add_time']) ? fdate($lt1_it['add_time'], 'Y-m-d') : '';
        $lt1_v   = isset($lt1_it['views']) ? (int)$lt1_it['views'] : 0;
      ?>
      <div class="yk-l1-item">
        <a class="yk-l1-thumb" href="<?php echo e($lt1_u); ?>">
          <?php if ($lt1_img !== '') { ?><img src="<?php echo e($lt1_img); ?>" alt="<?php echo e($lt1_t); ?>"><?php } else { ?><div class="yk-l1-ph">炎酷CMS</div><?php } ?>
        </a>
        <div class="yk-l1-body">
          <a class="yk-l1-tt" href="<?php echo e($lt1_u); ?>"><?php if (!empty($lt1_it['is_top'])) { ?><span class="yk-l1-top">置顶</span><?php } echo e($lt1_t); ?></a>
          <?php if ($lt1_d !== '') { ?><div class="yk-l1-desc"><?php echo e($lt1_d); ?></div><?php } ?>
          <div class="yk-l1-meta"><span><?php echo e($lt1_tm); ?></span><span>阅读 <?php echo $lt1_v; ?></span></div>
        </div>
      </div>
      <?php } ?>
    <?php } else { ?>
      <div class="yk-l1-empty">暂无内容</div>
    <?php } ?>
  </div>
  <?php echo isset($pager) ? $pager : ''; ?>
  </div>
  </div>
</div>
