Replace ingredients images with SVGs
This commit is contained in:
@@ -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 `
|
||||
|
||||
Reference in New Issue
Block a user