From a0d8b078ac40daf689b96cb880091dc92d536fe1 Mon Sep 17 00:00:00 2001 From: Jake Runyan Date: Fri, 13 Feb 2026 12:31:56 -0800 Subject: [PATCH] Add RecipePageLaout --- components/RecipePageLayout.tsx | 120 ++++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 components/RecipePageLayout.tsx diff --git a/components/RecipePageLayout.tsx b/components/RecipePageLayout.tsx new file mode 100644 index 0000000..5351d14 --- /dev/null +++ b/components/RecipePageLayout.tsx @@ -0,0 +1,120 @@ +import Link from 'next/link'; +import type { Recipe } from '@/lib/recipes'; + +interface RecipePageLayoutProps { + recipe: Recipe; + children: React.ReactNode; +} + +export default function RecipePageLayout({ recipe, children }: RecipePageLayoutProps) { + return ( +
+
+ {/* Back navigation */} + + +
+
+ + {recipe.category} + + + + {recipe.lastUpdated !== recipe.date && ( + <> + + + + )} +
+ +

+ {recipe.title} +

+ +

+ {recipe.description} +

+ +
+
+ Prep: + {recipe.prepTime} min +
+
+ Cook: + {recipe.cookTime} min +
+
+ Servings: + {recipe.servings} +
+
+ +
+ {recipe.tags.map((tag) => ( + + {tag} + + ))} +
+
+ + {/* MDX content: intro prose + RecipeCard + outro prose */} +
+ {children} +
+
+
+ ); +}