文件还在测试中

This commit is contained in:
2026-08-08 15:53:53 +08:00
parent 5f1e7adb64
commit 8101177cb5
241 changed files with 18074 additions and 22 deletions
+23
View File
@@ -0,0 +1,23 @@
<section class="page-hero">
<div class="container">
<h1>客户案例</h1>
<p>从需求沟通到成衣交付,为各行业提供定制化降温解决方案</p>
</div>
</section>
<section class="section" style="padding-top:20px">
<div class="container">
<div class="news-grid">
<?php foreach ($cases as $c): ?>
<a class="news-card reveal" href="<?php echo site_url('cases/' . $c['slug']); ?>">
<div class="news-thumb" style="background:<?php echo gradient($c['id']); ?>">🤝</div>
<div class="news-body">
<div class="news-date"><?php echo e(format_date($c['published_at'])); ?> · <?php echo e($c['industry'] ?? ''); ?></div>
<div class="news-title"><?php echo e($c['title']); ?></div>
<div class="news-sum"><?php echo e($c['summary']); ?></div>
</div>
</a>
<?php endforeach; ?>
</div>
<?php if (empty($cases)): ?><p style="color:var(--c-muted)">暂无案例。</p><?php endif; ?>
</div>
</section>
+36
View File
@@ -0,0 +1,36 @@
<?php
$c = $c ?? null;
$layoutArr = [];
if (!empty($c['layout'])) { $d = json_decode($c['layout'], true); if (is_array($d)) $layoutArr = $d; }
// 模式渲染:可视化编辑(builder)且有 layout → 画布;否则固定版式(正文富文本)
$useBuilder = !empty($layoutArr) && ($c['mode'] ?? '') !== 'fixed';
?>
<section class="page-hero">
<div class="container">
<h1><?php echo e($c['title']); ?></h1>
<p><?php echo e(format_date($c['published_at'])); ?> · <?php echo e($c['customer'] ?? ''); ?> · <?php echo e($c['industry'] ?? ''); ?></p>
</div>
</section>
<div class="container">
<nav class="breadcrumb"><a href="<?php echo site_url(); ?>">首页</a> / <a href="<?php echo site_url('cases'); ?>">客户案例</a> / <?php echo e($c['title']); ?></nav>
</div>
<?php if ($useBuilder): ?>
<?php echo \Core\View::buffer('parts/canvas', ['layout' => $layoutArr, 'item' => $c, 'module' => 'case']); ?>
<?php else: ?>
<section class="section" style="padding-top:10px">
<div class="container" style="max-width:780px">
<article class="detail-desc detail-rich" style="font-size:16px"><?php echo $c['content']; ?></article>
</div>
</section>
<?php endif; ?>
<section class="section" style="padding-top:0">
<div class="container" style="max-width:780px">
<div style="display:flex;justify-content:space-between;margin-top:40px;gap:12px;flex-wrap:wrap">
<?php if ($prev): ?><a class="btn btn-ghost" href="<?php echo site_url('cases/' . $prev['slug']); ?>">← <?php echo e(mb_substr($prev['title'],0,14)); ?></a><?php else: ?><span></span><?php endif; ?>
<?php if ($next): ?><a class="btn btn-ghost" href="<?php echo site_url('cases/' . $next['slug']); ?>"><?php echo e(mb_substr($next['title'],0,14)); ?> →</a><?php else: ?><span></span><?php endif; ?>
</div>
<div style="text-align:center;margin-top:30px"><a class="more-link" href="<?php echo site_url('cases'); ?>">返回案例列表</a></div>
</div>
</section>