diff --git a/src/lib/components/recipes/CompactCard.svelte b/src/lib/components/recipes/CompactCard.svelte new file mode 100644 index 0000000..9adf31c --- /dev/null +++ b/src/lib/components/recipes/CompactCard.svelte @@ -0,0 +1,134 @@ + + + +
+ + {#if showFavoriteIndicator && isFavorite} + ❤️ + {/if} +
+ {img_alt} +
+
+ {#if isInSeason} + {recipe.icon} + {/if} +

{@html recipe.name}

+ {#if recipe.tags?.length} +
+ {#each recipe.tags as tag (tag)} + {tag} + {/each} +
+ {/if} +
+
diff --git a/src/lib/components/recipes/Search.svelte b/src/lib/components/recipes/Search.svelte index 79a98c8..48eedaf 100644 --- a/src/lib/components/recipes/Search.svelte +++ b/src/lib/components/recipes/Search.svelte @@ -319,15 +319,15 @@ input::placeholder{ } .search { - width: 500px; - max-width: 85vw; + width: 560px; + max-width: 88vw; position: relative; - margin: 2.5rem auto 1.2rem; + margin: 0 auto; font-size: 1.6rem; display: flex; align-items: center; transition: var(--transition-fast); - filter: drop-shadow(0.4em 0.5em 0.4em rgba(0,0,0,0.4)) + filter: drop-shadow(0 4px 12px rgba(0,0,0,0.25)); } .search:hover, diff --git a/src/routes/[recipeLang=recipeLang]/+page.svelte b/src/routes/[recipeLang=recipeLang]/+page.svelte index e341e3c..84126d1 100644 --- a/src/routes/[recipeLang=recipeLang]/+page.svelte +++ b/src/routes/[recipeLang=recipeLang]/+page.svelte @@ -1,20 +1,18 @@ + {labels.metaTitle} @@ -97,42 +362,127 @@ h1{ -

{labels.title}

-

{labels.subheading}

+{#if heroRecipe} +
+
+ +
+
- +
+
+

{labels.title}

+

{labels.subheading}

+ + {heroRecipe.icon} + {@html heroRecipe.name} + + -{#if seasonRecipes.length > 0} - - {#snippet children()} - - {#each seasonRecipes as recipe} - - {/each} - - {/snippet} - -{/if} +
+
+ -{#each categories as category, index} - {@const categoryRecipes = filteredRecipesByCategory.get(category) || []} - {#if categoryRecipes.length > 0} - - {#snippet children()} - - {#each categoryRecipes as recipe} - - {/each} - - {/snippet} - + {#if data.season.length > 0} + + {/if} + + {#each categories as cat (cat)} + {@const count = categoryCounts.get(cat) || 0} + {#if count > 0} + + {/if} + {/each} +
+ +
+ +
+ +
+
+ +
+
+ {#each visibleRecipes as recipe, i (recipe._id)} + + {/each} +
+ + {#if hasMore} +
+ {/if} + + {#if !isEnglish} + + {/if} +
+
+
+{:else} +
+

{labels.title}

+

{labels.subheading}

+
+ + +
+ {#each visibleRecipes as recipe, i (recipe._id)} + + {/each} +
+ + {#if hasMore} +
+ {/if} + + {#if !isEnglish} + {/if} -{/each} -{#if !isEnglish} - {/if}