Add pop-out style to dynamic grid

This commit is contained in:
Kuba Orlik 2026-08-24 10:06:27 +02:00
parent 970a7892a1
commit 6631bd7980
2 changed files with 27 additions and 2 deletions

View File

@ -250,4 +250,23 @@
} }
} }
} }
&.dynamic-grid--style-pop-out {
.tile {
overflow: visible;
.tile-content {
transform: translateY(-20px) translateX(20px);
box-shadow: -10px 10px 0px #00000026;
}
.tile-image {
grid-row: 1/3 !important;
}
.tile-image--vertical {
grid-row: 1/5 !important;
}
}
}
} }

View File

@ -10,6 +10,7 @@ const component_arguments = {
bleed: new ComponentArguments.Enum(["none", "bleed", "screen"]).setDefaultValue( bleed: new ComponentArguments.Enum(["none", "bleed", "screen"]).setDefaultValue(
"none" "none"
), ),
style: new ComponentArguments.Enum(["flat", "pop-out"]),
tiles: new ComponentArguments.List( tiles: new ComponentArguments.List(
new ComponentArguments.Structured({ new ComponentArguments.Structured({
title: new ComponentArguments.ShortText(), title: new ComponentArguments.ShortText(),
@ -90,14 +91,19 @@ export class DynamicGridV2 extends Component<typeof component_arguments> {
} }
toHTML({ toHTML({
args: { tiles, bleed }, args: { tiles, bleed, style },
jdd_context, jdd_context,
classes, classes,
index, index,
}: ComponentToHTMLArgs<typeof component_arguments>): FlatTemplatable { }: ComponentToHTMLArgs<typeof component_arguments>): FlatTemplatable {
return ( return (
<div <div
class={["dynamic-grid", `dynamic-grid--bleed-${bleed}`, ...classes]} class={[
"dynamic-grid",
`dynamic-grid--bleed-${bleed}`,
`dynamic-grid--style-${style}`,
...classes,
]}
style={`--jdd-index: ${index}`} style={`--jdd-index: ${index}`}
> >
<div class="tiles-container"> <div class="tiles-container">