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 { RECIPES } from '../data/catalog.js?v=8';
import { RECIPES } from '../data/catalog.js?v=9';
import { MEAL_SLOTS } from '../planner/mealSlots.js';
import { applyFilters, getFilterState } from './RecipeList.js';

View File

@@ -1,4 +1,4 @@
import { INGREDIENTS, RECIPES } from '../data/catalog.js?v=8';
import { INGREDIENTS, RECIPES } from '../data/catalog.js?v=9';
import { MEAL_SLOTS } from '../planner/mealSlots.js';
import {
addMonths,

View File

@@ -1,7 +1,7 @@
import {
INGREDIENTS,
CATEGORY_LABELS,
} from '../data/catalog.js?v=8';
} from '../data/catalog.js?v=9';
import { loadPantry, getPantryTotal } from '../services/pantryShopping.js?v=2';
import { loadPlans } from '../services/planStore.js?v=2';
import { addDays, addMonths, sameDay, sameMonth, startOfDay, startOfMonth } from '../services/dateUtils.js';
@@ -13,7 +13,7 @@ import {
renderCalendarGrid,
syncCalendarTodayButton,
} from '../ui/mealCalendar.js?v=11';
import { createIngredientCardController, getIngredientCardHTML } from '../ui/ingredientCard.js?v=20260417-113';
import { createIngredientCardController, getIngredientCardHTML } from '../ui/ingredientCard.js?v=20260417-115';
/* ── helpers ── */

View File

@@ -1,5 +1,5 @@
import { RECIPES, INGREDIENTS, PRODUCTS } from '../data/catalog.js?v=8';
import { createIngredientCardController, getIngredientCardHTML } from '../ui/ingredientCard.js?v=20260417-113';
import { RECIPES, INGREDIENTS, PRODUCTS } from '../data/catalog.js?v=9';
import { createIngredientCardController, getIngredientCardHTML } from '../ui/ingredientCard.js?v=20260417-115';
function escapeHtml(s) {
return String(s)

View File

@@ -1,4 +1,4 @@
import { RECIPES } from '../data/catalog.js?v=8';
import { RECIPES } from '../data/catalog.js?v=9';
import { getRecipeGridSectionHTML, renderRecipeGrid } from '../ui/recipeGrid.js';
const DEFAULT_MIN_MINUTES = 5;

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 `