diff --git a/frontend/src/components/RecipeBrowserPanel.vue b/frontend/src/components/RecipeBrowserPanel.vue index 3ba2f87..a0cdb28 100644 --- a/frontend/src/components/RecipeBrowserPanel.vue +++ b/frontend/src/components/RecipeBrowserPanel.vue @@ -15,7 +15,7 @@
Loading…
- +
+
@@ -93,10 +101,10 @@ -
Select a category above to browse recipes.
+
Loading recipes…
-
Select a domain to start browsing.
+
Loading…
0) { + const top = categories.value.reduce((best, c) => + c.recipe_count > best.recipe_count ? c : best, categories.value[0]!) + selectCategory(top.category) + } +} + +function surpriseMe() { + if (categories.value.length === 0) return + const pick = categories.value[Math.floor(Math.random() * categories.value.length)]! + selectCategory(pick.category) } async function selectCategory(category: string) { @@ -250,6 +270,15 @@ async function doUnsave(recipeId: number) { color: white; } +.surprise-btn { + opacity: 0.75; + font-style: italic; +} + +.surprise-btn:hover { + opacity: 1; +} + .recipe-grid { display: flex; flex-direction: column;