Full website

This commit is contained in:
Your Name committed 2026-06-17 07:42:59 -04:00
1 parent 807c43ece5
commit ea9f33f60e
40 files changed
+4503 -1202

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import type { PageSection } from '@homaroma/types'
const announcementTypes = new Set(['ANNOUNCEMENT_BAR'])
const heroTypes = new Set(['HERO', 'BANNER'])
function sectionType(section: PageSection) {
return section.type.toUpperCase()
}
export function splitCmsLayoutSections(sections: PageSection[]) {
const activeSections = sections.filter((section) => section.isActive)
return {
announcementSections: activeSections.filter((section) => announcementTypes.has(sectionType(section))),
heroSections: activeSections.filter((section) => heroTypes.has(sectionType(section))),
bottomSections: activeSections.filter((section) => {
const type = sectionType(section)
return !announcementTypes.has(type) && !heroTypes.has(type)
}),
}
}