diff --git a/src/app.css b/src/app.css index c5039b5..d661373 100644 --- a/src/app.css +++ b/src/app.css @@ -344,3 +344,28 @@ a:focus-visible { color: var(--nord0); } } + +/* ============================================ + RECIPE GRID + Responsive card grid used across recipe pages + ============================================ */ + +.recipe-grid { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); + gap: 1.5em; + padding: 0 1.5em; + max-width: 1400px; + margin: 0 auto 2em; +} +@media (min-width: 600px) { + .recipe-grid { + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); + } +} +@media (min-width: 1024px) { + .recipe-grid { + grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); + gap: 1.8em; + } +} diff --git a/src/lib/components/recipes/CompactCard.svelte b/src/lib/components/recipes/CompactCard.svelte index b78b713..53bafc2 100644 --- a/src/lib/components/recipes/CompactCard.svelte +++ b/src/lib/components/recipes/CompactCard.svelte @@ -4,6 +4,7 @@ let { recipe, current_month = 0, + icon_override = false, isFavorite = false, showFavoriteIndicator = false, loading_strat = "lazy", @@ -19,7 +20,7 @@ recipe.images?.[0]?.alt || recipe.name ); - const isInSeason = $derived(recipe.season?.includes(current_month)); + const isInSeason = $derived(icon_override || recipe.season?.includes(current_month));