Apply palettes to shared layouts and template pages

This commit is contained in:
2026-11-28 12:37:25 +08:00
parent 1aaf3908af
commit 70a94dd394
15 changed files with 104 additions and 27 deletions
+6 -1
View File
@@ -44,7 +44,12 @@ final class View
$markup = self::fragment('page', [
'page' => $repo->withSectionFeeds($region), 'site' => $data['site'], 'canvas' => false,
]);
$data[$kind . 'Markup'] = Html::sharedFragment($markup, $region['slug'], $account, $data['path'] ?? null);
$data[$kind . 'Markup'] = self::fragment('shared-layout', [
'kind' => $kind, 'visible' => $page['visibility'][$kind] ?? true,
'content' => Html::sharedFragment($markup, $region['slug'], $account, $data['path'] ?? null),
'palette' => DesignLibrary::find((int) ($region['palette_id'] ?? 0), 'palette'),
'theme' => $region['theme'],
]);
}
}
}