Scope article feeds and expand canvas editing

This commit is contained in:
2026-11-21 22:55:59 +08:00
parent a2fc628f08
commit 9bc0ee0e45
32 changed files with 476 additions and 67 deletions
+3 -1
View File
@@ -2,13 +2,15 @@
use App\Content\View;
$e = View::escape(...);
$scope = isset($categoryScope) ? array_flip($categoryScope) : null;
?>
<?php if ($articles): ?>
<ul class="article-list">
<?php foreach ($articles as $item): ?>
<?php $labels = $scope === null ? $item['categories'] : array_intersect_key($item['categories'], $scope); ?>
<li>
<a class="article-row" href="/articles/<?= $e($item['slug']) ?>">
<span class="article-category"><?= $e(implode('、', $item['categories'])) ?></span>
<span class="article-category"><?= $e(implode('、', $labels)) ?></span>
<span class="article-row-title"><?= $e($item['title']) ?>
<?php if ($item['summary']): ?><small><?= $e($item['summary']) ?></small><?php endif ?>
</span>