Enable in-place editing for page sections and media

This commit is contained in:
2026-11-21 21:06:34 +09:00
parent a910f03929
commit faba214971
11 changed files with 505 additions and 80 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ final class SiteController
return $this->renderPage($repo, $page);
}
public function renderPage(Repository $repo, array $page, bool $preview = false): Response
public function renderPage(Repository $repo, array $page, bool $preview = false, bool $canvas = false): Response
{
$slug = $page['slug'];
$isHome = $slug === 'home';
@@ -42,7 +42,7 @@ final class SiteController
'socialImage' => $page['image'],
'socialAlt' => $page['alt'],
'articles' => $isHome ? $repo->articles(limit: 3) : [],
'previewMode' => $preview, 'noindex' => $preview,
'previewMode' => $preview, 'canvas' => $preview && $canvas, 'noindex' => $preview,
]);
}