Replace ingredients images with SVGs

This commit is contained in:
2026-04-17 20:38:57 +02:00
parent 9bd6627fe2
commit 35b8babd0c
91 changed files with 112 additions and 53 deletions

View File

@@ -1,4 +1,4 @@
import { INGREDIENTS, CATEGORY_LABELS } from '../data/catalog.js?v=8';
import { INGREDIENTS, CATEGORY_LABELS } from '../data/catalog.js?v=9';
import {
KITCHEN_LIST_ID,
loadShoppingState,
@@ -98,8 +98,9 @@ function itemRowHtml(item) {
const image = def?.image;
const checked = item.checked;
const mediaFit = image && image.endsWith('.svg') ? 'object-contain' : 'object-cover';
const mediaHtml = image
? `<img src="${esc(image)}" alt="" class="w-8 h-8 rounded-lg object-cover shrink-0">`
? `<img src="${esc(image)}" alt="" class="w-8 h-8 rounded-lg ${mediaFit} shrink-0">`
: `<div class="w-8 h-8 rounded-lg flex items-center justify-center shrink-0" style="background:#2f2f2d;"><i class="fas ${icon} text-xs" style="color:#8f8b84;"></i></div>`;
return `