From 5c1afaaaf58a7c5c76341638403b059784b7ad01 Mon Sep 17 00:00:00 2001 From: dadaloop82 Date: Fri, 22 May 2026 21:23:18 +0000 Subject: [PATCH] feat: redesign action-page hero card (match use-page style) --- assets/css/style.css | 16 ++++++++++++++-- assets/js/app.js | 16 +++++++++------- index.html | 2 +- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index 614ed26..7cb35dd 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -3027,14 +3027,24 @@ body.server-offline .bottom-nav { gap: 14px; } -/* Use-page hero card: larger, accent border, more breathing room */ +/* Action and Use page hero card */ +#page-action .product-preview-small, #page-use .product-preview-small { padding: 14px 16px; gap: 14px; border-left: 4px solid var(--primary); align-items: flex-start; + position: relative; } +/* action page: slightly larger name */ +#page-action .use-hero-name { + font-size: 1.15rem; +} + +/* barcode pill on action page */ +.action-pill-barcode { background: #f1f5f9; color: #64748b; } + .use-hero-icon { font-size: 2.4rem; width: 52px; @@ -7575,7 +7585,9 @@ body.cooking-mode-active .app-header { /* ── Use inventory info ── */ [data-theme="dark"] .use-inventory-info { background: #0c2a4e; color: #7dd3fc; } [data-theme="dark"] #use-expiry-hint { background: #2a1e00; border-color: #78350f; color: #fde68a; } -[data-theme="dark"] #page-use .product-preview-small { border-left-color: var(--primary); } +[data-theme="dark"] #page-use .product-preview-small { border-left-color: var(--primary); } +[data-theme="dark"] #page-action .product-preview-small { border-left-color: var(--primary); } +[data-theme="dark"] .action-pill-barcode { background: #1e293b; color: #94a3b8; } [data-theme="dark"] .use-pill-ok { background: #14532d; color: #86efac; } [data-theme="dark"] .use-pill-warn { background: #422006; color: #fde68a; } [data-theme="dark"] .use-pill-soon { background: #431407; color: #fdba74; } diff --git a/assets/js/app.js b/assets/js/app.js index d8d3d71..22dc829 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -7123,17 +7123,19 @@ function showProductAction() { conservationHtml = `
🧊 ${escapeHtml(currentProduct.conservation)}
`; } - // LARGER product preview + // Hero card preview (matches page-use style) document.getElementById('action-product-preview').innerHTML = ` ${currentProduct.image_url ? `` : - `${catIcon}` + `${catIcon}` } -
-

${escapeHtml(currentProduct.name)}

-

${currentProduct.brand ? `${escapeHtml(currentProduct.brand)}` : ''}

- ${currentProduct.weight_info ? `

⚖️ ${escapeHtml(currentProduct.weight_info)}

` : ''} - ${currentProduct.barcode ? `

📊 ${currentProduct.barcode}

` : ''} +
+
${escapeHtml(currentProduct.name)}
+ ${currentProduct.brand ? `
${escapeHtml(currentProduct.brand)}
` : ''} +
+ ${currentProduct.weight_info ? `⚖️ ${escapeHtml(currentProduct.weight_info)}` : ''} + ${currentProduct.barcode ? `📊 ${currentProduct.barcode}` : ''} +
`; diff --git a/index.html b/index.html index db97ea7..5737beb 100644 --- a/index.html +++ b/index.html @@ -331,7 +331,7 @@
-
+