Use SVGs in pantry list
Some checks failed
Build and Deploy / build-and-push (push) Failing after 1m17s
Some checks failed
Build and Deploy / build-and-push (push) Failing after 1m17s
This commit is contained in:
@@ -162,7 +162,7 @@ export function getIngredientCardHTML({
|
||||
<div id="${idBase}" class="${cardClass}" style="${cardStyle}">
|
||||
<div class="relative px-4 pt-4 pb-2">
|
||||
<div class="flex items-start gap-3 pr-10">
|
||||
<div id="${idBase}-hero" class="relative w-16 h-16 rounded-2xl flex items-center justify-center shrink-0 overflow-hidden" style="background:#393937;">
|
||||
<div id="${idBase}-hero" class="relative w-20 h-20 rounded-2xl flex items-center justify-center shrink-0 overflow-hidden" style="background:#393937;">
|
||||
<img id="${idBase}-img" class="w-full h-full hidden" alt="" />
|
||||
<div id="${idBase}-fallback" class="absolute inset-0 flex items-center justify-center">
|
||||
<i id="${idBase}-fallback-icon" class="fas fa-box-open text-2xl" style="color:#6d6c67;"></i>
|
||||
@@ -254,7 +254,7 @@ export function createIngredientCardController({ idBase, defaultSourceNote = 'Ze
|
||||
const isSvg = image.endsWith('.svg');
|
||||
img.classList.toggle('object-contain', isSvg);
|
||||
img.classList.toggle('object-cover', !isSvg);
|
||||
img.style.padding = isSvg ? '6px' : '';
|
||||
img.style.padding = isSvg ? '4px' : '';
|
||||
img.classList.remove('hidden');
|
||||
fallback.classList.add('hidden');
|
||||
} else {
|
||||
|
||||
@@ -24,7 +24,7 @@ import {
|
||||
renderCalendarGrid,
|
||||
syncCalendarTodayButton,
|
||||
} from './mealCalendar.js?v=11';
|
||||
import { createIngredientCardController, getIngredientCardHTML } from './ingredientCard.js?v=20260417-115';
|
||||
import { createIngredientCardController, getIngredientCardHTML } from './ingredientCard.js?v=20260417-116';
|
||||
|
||||
function esc(s) {
|
||||
return String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
||||
|
||||
Reference in New Issue
Block a user