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
+22
View File
@@ -0,0 +1,22 @@
<?php
use App\Content\View;
$e = View::escape(...);
?>
<div class="editor" data-editor data-format="<?= $format ?>">
<label for="editor-text">正文(<?= $format === 'markdown' ? 'Markdown' : 'HTML' ?>)</label>
<div class="editor-toolbar">
<div role="group" aria-label="插入格式">
<button type="button" data-insert="heading">小标题</button>
<button type="button" data-insert="bold">粗体</button>
<button type="button" data-insert="list">列表</button>
<button type="button" data-insert="link">链接</button>
</div>
<button data-preview-button type="button" aria-controls="editor-preview" aria-expanded="false">预览正文</button>
</div>
<textarea id="editor-text" name="body" rows="15" spellcheck="false"><?= $e($body) ?></textarea>
<?php if ($format === 'html'): ?>
<p class="field-note">支持段落、标题、链接、图片、列表、表格和折叠问答。保存时会清理脚本、内联样式等标签或属性。</p>
<?php endif ?>
<div class="editor-preview rich prose" id="editor-preview" aria-live="polite" hidden></div>
</div>