| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  | <template> | 
					
						
							|  |  |  |   <div> | 
					
						
							|  |  |  |     <div class="d-flex justify-end flex-wrap align-stretch"> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       <RecipePageInfoCardImage | 
					
						
							|  |  |  |         v-if="landscape" | 
					
						
							|  |  |  |         :recipe="recipe" | 
					
						
							|  |  |  |       /> | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |       <v-card | 
					
						
							|  |  |  |         :width="landscape ? '100%' : '50%'" | 
					
						
							|  |  |  |         flat | 
					
						
							|  |  |  |         class="d-flex flex-column justify-center align-center" | 
					
						
							|  |  |  |       > | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |         <v-card-text class="w-100"> | 
					
						
							| 
									
										
										
										
											2025-06-28 15:59:58 +02:00
										 |  |  |           <div class="d-flex flex-column align-center"> | 
					
						
							|  |  |  |           <v-card-title class="text-h5 font-weight-regular pa-0 text-wrap text-center opacity-80"> | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |             {{ recipe.name }} | 
					
						
							| 
									
										
										
										
											2025-06-28 15:59:58 +02:00
										 |  |  |           </v-card-title> | 
					
						
							|  |  |  |           <RecipeRating | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |               :key="recipe.slug" | 
					
						
							|  |  |  |               :value="recipe.rating" | 
					
						
							|  |  |  |               :recipe-id="recipe.id" | 
					
						
							|  |  |  |               :slug="recipe.slug" | 
					
						
							|  |  |  |             /> | 
					
						
							| 
									
										
										
										
											2025-06-28 15:59:58 +02:00
										 |  |  |           </div> | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |           <v-divider class="my-2" /> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |           <SafeMarkdown :source="recipe.description" class="my-3" /> | 
					
						
							| 
									
										
										
										
											2025-02-26 17:07:12 +01:00
										 |  |  |           <v-divider v-if="recipe.description" /> | 
					
						
							| 
									
										
										
										
											2025-02-27 14:48:29 +01:00
										 |  |  |           <v-container class="d-flex flex-row flex-wrap justify-center"> | 
					
						
							| 
									
										
										
										
											2025-02-26 17:07:12 +01:00
										 |  |  |             <div class="mx-6"> | 
					
						
							| 
									
										
										
										
											2025-02-27 14:48:29 +01:00
										 |  |  |               <v-row no-gutters> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |                 <v-col | 
					
						
							|  |  |  |                   v-if="recipe.recipeYieldQuantity || recipe.recipeYield" | 
					
						
							|  |  |  |                   cols="12" | 
					
						
							|  |  |  |                   class="d-flex flex-wrap justify-center" | 
					
						
							|  |  |  |                 > | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |                   <RecipeYield | 
					
						
							|  |  |  |                     :yield-quantity="recipe.recipeYieldQuantity" | 
					
						
							| 
									
										
										
										
											2025-07-29 15:33:44 -05:00
										 |  |  |                     :yield-text="recipe.recipeYield" | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |                     :scale="recipeScale" | 
					
						
							| 
									
										
										
										
											2025-02-26 17:07:12 +01:00
										 |  |  |                     class="mb-4" | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |                   /> | 
					
						
							|  |  |  |                 </v-col> | 
					
						
							|  |  |  |               </v-row> | 
					
						
							|  |  |  |               <v-row no-gutters> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |                 <v-col | 
					
						
							|  |  |  |                   cols="12" | 
					
						
							|  |  |  |                   class="d-flex flex-wrap justify-center" | 
					
						
							|  |  |  |                 > | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |                   <RecipeLastMade | 
					
						
							|  |  |  |                     v-if="isOwnGroup" | 
					
						
							|  |  |  |                     :recipe="recipe" | 
					
						
							| 
									
										
										
										
											2025-02-26 17:07:12 +01:00
										 |  |  |                     class="mb-4" | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |                   /> | 
					
						
							|  |  |  |                 </v-col> | 
					
						
							|  |  |  |               </v-row> | 
					
						
							|  |  |  |             </div> | 
					
						
							| 
									
										
										
										
											2025-06-28 15:59:58 +02:00
										 |  |  |             <div v-if="recipe.prepTime || recipe.totalTime || recipe.performTime" class="mx-6"> | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |               <RecipeTimeCard | 
					
						
							|  |  |  |                 container-class="d-flex flex-wrap justify-center" | 
					
						
							|  |  |  |                 :prep-time="recipe.prepTime" | 
					
						
							|  |  |  |                 :total-time="recipe.totalTime" | 
					
						
							|  |  |  |                 :perform-time="recipe.performTime" | 
					
						
							| 
									
										
										
										
											2025-02-26 17:07:12 +01:00
										 |  |  |                 class="mb-4" | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |               /> | 
					
						
							|  |  |  |             </div> | 
					
						
							|  |  |  |           </v-container> | 
					
						
							|  |  |  |         </v-card-text> | 
					
						
							|  |  |  |       </v-card> | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |       <RecipePageInfoCardImage | 
					
						
							|  |  |  |         v-if="!landscape" | 
					
						
							|  |  |  |         :recipe="recipe" | 
					
						
							|  |  |  |         max-width="50%" | 
					
						
							|  |  |  |         class="my-auto" | 
					
						
							|  |  |  |       /> | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |     </div> | 
					
						
							|  |  |  |   </div> | 
					
						
							|  |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <script lang="ts"> | 
					
						
							|  |  |  | import { useLoggedInState } from "~/composables/use-logged-in-state"; | 
					
						
							|  |  |  | import RecipeRating from "~/components/Domain/Recipe/RecipeRating.vue"; | 
					
						
							|  |  |  | import RecipeLastMade from "~/components/Domain/Recipe/RecipeLastMade.vue"; | 
					
						
							|  |  |  | import RecipeTimeCard from "~/components/Domain/Recipe/RecipeTimeCard.vue"; | 
					
						
							|  |  |  | import RecipeYield from "~/components/Domain/Recipe/RecipeYield.vue"; | 
					
						
							|  |  |  | import RecipePageInfoCardImage from "~/components/Domain/Recipe/RecipePage/RecipePageParts/RecipePageInfoCardImage.vue"; | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  | import type { Recipe } from "~/lib/api/types/recipe"; | 
					
						
							|  |  |  | import type { NoUndefinedField } from "~/lib/api/types/non-generated"; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default defineNuxtComponent({ | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  |   components: { | 
					
						
							|  |  |  |     RecipeRating, | 
					
						
							|  |  |  |     RecipeLastMade, | 
					
						
							|  |  |  |     RecipeTimeCard, | 
					
						
							|  |  |  |     RecipeYield, | 
					
						
							|  |  |  |     RecipePageInfoCardImage, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   props: { | 
					
						
							|  |  |  |     recipe: { | 
					
						
							|  |  |  |       type: Object as () => NoUndefinedField<Recipe>, | 
					
						
							|  |  |  |       required: true, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     recipeScale: { | 
					
						
							|  |  |  |       type: Number, | 
					
						
							|  |  |  |       default: 1, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |     landscape: { | 
					
						
							|  |  |  |       type: Boolean, | 
					
						
							|  |  |  |       required: true, | 
					
						
							|  |  |  |     }, | 
					
						
							|  |  |  |   }, | 
					
						
							|  |  |  |   setup() { | 
					
						
							|  |  |  |     const { isOwnGroup } = useLoggedInState(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     return { | 
					
						
							|  |  |  |       isOwnGroup, | 
					
						
							|  |  |  |     }; | 
					
						
							| 
									
										
										
										
											2025-06-20 00:09:12 +07:00
										 |  |  |   }, | 
					
						
							| 
									
										
										
										
											2024-11-20 08:46:27 -06:00
										 |  |  | }); | 
					
						
							|  |  |  | </script> |