Add pop-out style to dynamic grid
This commit is contained in:
parent
970a7892a1
commit
6631bd7980
@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user