<?php $page_class = 'page-image'; include __DIR__ . '/_header.php'; ?>
<section class="banner-simple"><div class="container"><h1><?php echo htmlspecialchars(tplv($tplCurrent, 'title', '图集详情')); ?></h1></div></section>
<?php if ($tplCurrent) { $albums = tpl_json_array(tplv($tplCurrent, 'albums')); if (empty($albums) && tplv($tplCurrent, 'litpic')) $albums = [tplv($tplCurrent, 'litpic')]; ?><section class="section-block"><div class="container gallery-grid"><?php foreach ($albums as $img) { $src = is_array($img) ? tplv($img, 'url', tplv($img, 'src')) : $img; ?><div class="gallery-item"><?php echo getLitpicHtml($src, tplv($tplCurrent, 'title')); ?></div><?php } ?></div></section><?php } else { ?><section class="section-block"><div class="container card-grid cols-3"><?php foreach ($tplList as $row) { ?><article class="show-card"><div class="show-thumb"><?php echo getLitpicHtml(tplv($row, 'litpic'), tplv($row, 'title')); ?></div><div class="show-body"><h3><a href="<?php echo tpl_url('image', $row); ?>"><?php echo htmlspecialchars(tplv($row, 'title')); ?></a></h3></div></article><?php } ?></div><div class="pagination-wrap"><?php echo $tplPager; ?></div></section><?php } ?>
<?php include __DIR__ . '/_footer.php'; ?>
