From 038bc3126bbf40f954b312c72c6b1d4e699d24de Mon Sep 17 00:00:00 2001 From: TheThomaas Date: Thu, 24 Sep 2026 13:33:01 +0200 Subject: [PATCH] Update cookcli-recipe-strategy.js --- .../cookcli/www/cookcli-recipe-strategy.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/custom_components/cookcli/www/cookcli-recipe-strategy.js b/custom_components/cookcli/www/cookcli-recipe-strategy.js index 78162cf..1461d67 100644 --- a/custom_components/cookcli/www/cookcli-recipe-strategy.js +++ b/custom_components/cookcli/www/cookcli-recipe-strategy.js @@ -198,7 +198,14 @@ class CookCliRecipeViewStrategy extends HTMLElement { } } - static _navButton(entity, targetIndex, label, icon) { + static _navButton(entity, targetIndex, label, icon, style = null) { + let card_mod = {}; + if (label == "Précédent") { + card_mod = `style: :host { position:absolute; bottom:0; left:0; }`; + } else { + card_mod = `style: :host { position:absolute; bottom:0; right:0; }`; + } + return { type: "button", name: label, @@ -209,6 +216,7 @@ class CookCliRecipeViewStrategy extends HTMLElement { target: { entity_id: entity }, data: { value: targetIndex }, }, + card_mod }; } @@ -221,7 +229,7 @@ class CookCliRecipeViewStrategy extends HTMLElement { } content += `## ${recipe.title || ""}\n`; if (recipe.cookware && recipe.cookware.length) { - content += `\n TEST \n**Ustensiles** : ${recipe.cookware.map((c) => c.name).join(", ")}\n`; + content += `\n**Ustensiles** : ${recipe.cookware.map((c) => c.name).join(", ")}\n`; } const cards = [{