Rebuild Laysense site with Webman and SQLite CMS

This commit is contained in:
2026-11-21 17:29:24 +08:00
commit d9bda755d1
99 changed files with 4280 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
<?php
use App\Content\View;
$e = View::escape(...);
$slug = $section['page_slug'];
$key = $section['key'];
?>
<a class="back-link" href="/admin/pages/<?= $e($slug) ?>">返回页面编辑</a>
<header class="admin-heading">
<div><h1><?= $e($title) ?></h1><p><?= $e($slug) ?> · #<?= $e($key) ?></p></div>
<a class="button button-outline" href="<?= $e(($slug === 'home' ? '/' : '/' . $slug) . '#' . $key) ?>">查看公开区块</a>
</header>
<?= View::fragment('admin-feedback', compact('error', 'saved')) ?>
<form class="admin-form admin-panel" method="post" action="/admin/pages/<?= $e($slug) ?>/<?= $e($key) ?>">
<input type="hidden" name="csrf" value="<?= $e($token) ?>">
<input type="hidden" name="version" value="<?= $e($section['version']) ?>">
<label>区块标题<input name="title" value="<?= $e($section['title']) ?>" required maxlength="100"></label>
<label>区块简介<textarea name="lead" rows="2" maxlength="500"><?= $e($section['lead']) ?></textarea></label>
<?= View::fragment('admin-editor', ['format' => 'html', 'body' => $section['body']]) ?>
<div class="form-submit"><button class="button button-primary" type="submit">保存区块</button></div>
</form>