From f883bf361ab039974d811cbd260ebd7b39a8718d Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Fri, 25 Sep 2026 17:30:20 +0200 Subject: [PATCH] Update cookcli-recipe-strategy.js --- .../cookcli/www/cookcli-recipe-strategy.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/custom_components/cookcli/www/cookcli-recipe-strategy.js b/custom_components/cookcli/www/cookcli-recipe-strategy.js index 19bc228..fd8289a 100644 --- a/custom_components/cookcli/www/cookcli-recipe-strategy.js +++ b/custom_components/cookcli/www/cookcli-recipe-strategy.js @@ -433,6 +433,10 @@ class CookCliRecipeViewStrategy extends HTMLElement { : `Étape ${tabIndex}`; const leftCards = []; + const rightCards = []; + + rightCards.push({ type: "markdown", content: `## ${stepLabel}\n\n${stepMarkdown}` }) + const stepIngredients = (step.items || []).filter((item) => item.type === "ingredient"); if (stepIngredients.length) { leftCards.push({ @@ -470,7 +474,7 @@ class CookCliRecipeViewStrategy extends HTMLElement { if (buttons.length) { leftCards.push({ type: "custom:circular-timer-card", entity: config.timer_entity }); - leftCards.push({ + rightCards.push({ type: "grid", columns: Math.min(2, buttons.length), square: false, @@ -480,12 +484,12 @@ class CookCliRecipeViewStrategy extends HTMLElement { } if (!leftCards.length) { - leftCards.push({ type: "markdown", content: " " }); + leftCards.push({ type: "markdown", content: " ", text_only: true }); } const columns = this._responsiveColumns( { type: "vertical-stack", cards: leftCards }, - { type: "markdown", content: `## ${stepLabel}\n\n${stepMarkdown}` } + { type: "vertical-stack", cards: rightCards }, ); const cards = [columns];