feat(site): revise rover use cases and control carousel image opening

This commit is contained in:
DCCONSTRUCTIONS
2026-11-05 21:50:22 +03:00
parent 2ab314a5d3
commit a8d9245413
9 changed files with 256 additions and 145 deletions
+3 -1
View File
@@ -445,9 +445,11 @@ async function renderBlock(block, renderCounts) {
const templateName = block.template;
// Old CMS blocks can adopt the shared carousel without adding every optional field.
if (["project-video-detail.html", "project-composition.html"].includes(templateName)) {
block = { ...block, content: { mediaKind: "", note: "", modules: [], ...block.content } };
block = { ...block, content: { mediaKind: "", note: "", modules: [], openImagesInFullscreen: false, ...block.content } };
block.content.sliderItems = (block.content.sliderItems || []).map(item => ({
description: "", imageSrc: "", imageAlt: "", videoSrc: "", posterSrc: "", ...item,
imageLinkEnabled: block.content.openImagesInFullscreen === true,
imageLinkDisabled: block.content.openImagesInFullscreen !== true,
}));
}
const renderCount = renderCounts.get(templateName) ?? 0;