diff --git a/src/back/jdd-components/dynamic-grid-v2/dynamic-grid-v2.css b/src/back/jdd-components/dynamic-grid-v2/dynamic-grid-v2.css index 3929816..87743f3 100644 --- a/src/back/jdd-components/dynamic-grid-v2/dynamic-grid-v2.css +++ b/src/back/jdd-components/dynamic-grid-v2/dynamic-grid-v2.css @@ -51,6 +51,7 @@ display: flex; flex-flow: column; gap: 16px; + .tile-title { font-weight: bold; line-height: 20px; @@ -95,6 +96,7 @@ .tile-image--square { grid-row: 1/2; + picture img { display: block !important; } @@ -119,6 +121,7 @@ .tile-image--horizontal { grid-column: 1/3; + picture img { display: block !important; } @@ -143,6 +146,7 @@ .tile-image--vertical { grid-row: 1/4; + picture img { display: block !important; } @@ -191,7 +195,7 @@ grid-template-columns: repeat(2, 1fr); .tile.vertical { - grid-row: span 1; + grid-row: span 2; grid-column: span 1; .tile-image--vertical { @@ -210,11 +214,6 @@ } } } - - .tile.vertical { - grid-row: span 2; - grid-column: span 1; - } } } diff --git a/src/back/jdd-components/dynamic-grid-v2/dynamic-grid-v2.jdd.tsx b/src/back/jdd-components/dynamic-grid-v2/dynamic-grid-v2.jdd.tsx index 76700ba..af88cdf 100644 --- a/src/back/jdd-components/dynamic-grid-v2/dynamic-grid-v2.jdd.tsx +++ b/src/back/jdd-components/dynamic-grid-v2/dynamic-grid-v2.jdd.tsx @@ -6,14 +6,6 @@ import { getFgColorVariable } from "src/back/colors.js"; type ExtractArray = T extends Array ? X : never; -const generate_id = (function* () { - while (true) { - for (let i = 1; i <= 10000; i++) { - yield i; - } - } -})(); - const component_arguments = { bleed: new ComponentArguments.Enum(["none", "bleed", "screen"]).setDefaultValue( "none" @@ -97,19 +89,12 @@ export class DynamicGridV2 extends Component { ); } - toHTML( - { - args: { tiles, bleed }, - jdd_context, - classes, - index, - }: ComponentToHTMLArgs, - tab_style_when_active = `border-bottom-color: var(--color-brand-canvas); - border-top-color: var(--color-brand-accent-04); - background: var(--color-brand-canvas); - color: var(--color-brand-text-fg);` - ): FlatTemplatable { - const { value: id } = generate_id.next(); + toHTML({ + args: { tiles, bleed }, + jdd_context, + classes, + index, + }: ComponentToHTMLArgs): FlatTemplatable { return (
* { margin-top: 0; margin-bottom: 0;