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
+23
View File
@@ -0,0 +1,23 @@
<?php
use App\Content\Repository;
use App\Content\View;
$e = View::escape(...);
?>
<?php if ($articles): ?>
<ul class="article-list">
<?php foreach ($articles as $item): ?>
<li>
<a class="article-row" href="/articles/<?= $e($item['slug']) ?>">
<span class="article-category"><?= $e(Repository::CATEGORIES[$item['category']]) ?></span>
<span class="article-row-title"><?= $e($item['title']) ?>
<?php if ($item['summary']): ?><small><?= $e($item['summary']) ?></small><?php endif ?>
</span>
<time datetime="<?= $e(View::date($item['published_at'], 'Y-m-d')) ?>"><?= $e(View::date($item['published_at'], 'Y.m.d')) ?></time>
</a>
</li>
<?php endforeach ?>
</ul>
<?php else: ?>
<p class="empty-state">暂无已发布的动态。</p>
<?php endif ?>