feat: HeroSplit section

This commit is contained in:
2026-01-30 08:49:03 -05:00
parent 8bd544b5c3
commit 0bafc3a9dd
4 changed files with 51 additions and 3 deletions

View File

@@ -1,8 +1,7 @@
fragment BuilderSections on GroupAbstractBuilder_Fields { fragment BuilderSections on GroupAbstractBuilder_Fields {
sections { sections {
__typename __typename
... on GroupAbstractBuilderSectionsTextBlockLayout { ... on GroupAbstractBuilderSectionsHeroSplitLayout { ... SectionHeroSplit }
... SectionTextBlock ... on GroupAbstractBuilderSectionsTextBlockLayout { ... SectionTextBlock }
}
} }
} }

View File

@@ -0,0 +1,6 @@
fragment SectionHeroSplit on GroupAbstractBuilderSectionsHeroSplitLayout {
content
reverse
...AcfMedia
}

View File

@@ -0,0 +1,40 @@
<script setup lang="ts">
import { tv, type VariantProps } from "tailwind-variants";
import type { SectionHeroSplitFragment } from "#graphql/operations";
const tvSectionHeroSplit = tv({
slots: {
base: "py-6",
container: "container flex flex-col gap-6 items-center",
content: "flex-1",
media: "w-full basis-1/2",
},
variants: {
reverse: {
false: {
container: "lg:flex-row",
},
true: {
container: "lg:flex-row-reverse",
},
},
},
defaultVariants: {
reverse: false,
},
});
const props = defineProps<SectionHeroSplitFragment>();
const classes = tvSectionHeroSplit({
reverse: props.reverse,
} as VariantProps<typeof tvSectionHeroSplit>);
</script>
<template>
<section :class="classes.base()">
<div :class="classes.container()">
<UiProse :content="content" :class="classes.content()" />
<AcfMedia :media="$props" :class="classes.media()" />
</div>
</section>
</template>

View File

@@ -4727,6 +4727,9 @@ type MediaItem implements ContentNode & DatabaseIdentifier & HierarchicalContent
""" """
modifiedGmt: String modifiedGmt: String
"""CSS object-position value from Media Focus Point plugin"""
objectPosition: String
"""The parent of the node. The parent object can be of various types""" """The parent of the node. The parent object can be of various types"""
parent: HierarchicalContentNodeToParentContentNodeConnectionEdge parent: HierarchicalContentNodeToParentContentNodeConnectionEdge