feat(site): focus Mission Core story and center product carousels
This commit is contained in:
@@ -443,6 +443,13 @@ 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.content.sliderItems = (block.content.sliderItems || []).map(item => ({
|
||||
description: "", imageSrc: "", imageAlt: "", videoSrc: "", posterSrc: "", ...item,
|
||||
}));
|
||||
}
|
||||
const renderCount = renderCounts.get(templateName) ?? 0;
|
||||
renderCounts.set(templateName, renderCount + 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user