Prepare LaySite 1.5.1 page routing and template updates

This commit is contained in:
2026-11-28 03:07:14 +08:00
parent 50fb30ff3b
commit 474cb766be
41 changed files with 354 additions and 146 deletions
+2 -2
View File
@@ -5,9 +5,9 @@ use App\Content\SiteDesign;
use App\Content\View;
$e = View::escape(...);
$home = $page['slug'] === 'home';
$home = ($page['page_type'] ?? 'page') === 'home';
$shared = !empty($page['layout_kind']);
$system = ($page['page_type'] ?? 'page') !== 'page';
$system = !in_array($page['page_type'] ?? 'page', ['page', 'home'], true);
$showHero = $page['visibility']['hero'] ?? true;
$heroLinks = array_filter($page['sections'], static fn (array $section): bool => $section['style'] === 'hero-links');
$alignments = $page['alignments'];