Add visual CMS, media library and product directory

This commit is contained in:
2026-11-21 19:27:46 +08:00
parent 188a63fb2f
commit 474008b06e
42 changed files with 1710 additions and 134 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
use App\Content\View;
$e = View::escape(...);
?>
<header class="admin-heading">
<div><h1>产品与服务</h1><p>管理公开目录中的条目、分类和按钮链接。</p></div>
<div class="actions"><a class="button button-outline" href="/services">查看目录</a><a class="button button-primary" href="/admin/catalog/new">添加条目</a></div>
</header>
<section class="admin-panel">
<?php if (!$products): ?><p class="empty-state">暂无产品或服务。</p><?php endif ?>
<ul class="admin-list">
<?php foreach ($products as $item): ?>
<li><div><strong><?= $e($item['name']) ?></strong><small><?= $e($item['category']) ?> · <?= $e($item['url']) ?></small></div>
<a class="button button-outline" href="/admin/catalog/<?= $e($item['id']) ?>">编辑</a>
</li>
<?php endforeach ?>
</ul>
</section>