| 
									
										
										
										
											2021-08-31 18:51:34 -08:00
										 |  |  | <template> | 
					
						
							|  |  |  |   <v-container v-if="book" fluid> | 
					
						
							|  |  |  |     <v-app-bar color="transparent" flat class="mt-n1 rounded"> | 
					
						
							|  |  |  |       <v-icon large left> {{ $globals.icons.pages }} </v-icon> | 
					
						
							|  |  |  |       <v-toolbar-title class="headline"> {{ book.name }} </v-toolbar-title> | 
					
						
							|  |  |  |     </v-app-bar> | 
					
						
							|  |  |  |     <v-card flat> | 
					
						
							|  |  |  |       <v-card-text class="py-0"> | 
					
						
							|  |  |  |         {{ book.description }} | 
					
						
							|  |  |  |       </v-card-text> | 
					
						
							|  |  |  |     </v-card> | 
					
						
							| 
									
										
										
										
											2022-04-01 09:50:31 -08:00
										 |  |  | 
 | 
					
						
							|  |  |  |     <v-container class="pa-0"> | 
					
						
							|  |  |  |       <RecipeCardSection class="mb-5 mx-1" :recipes="book.recipes" /> | 
					
						
							|  |  |  |     </v-container> | 
					
						
							| 
									
										
										
										
											2021-08-31 18:51:34 -08:00
										 |  |  |   </v-container> | 
					
						
							|  |  |  | </template> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | <script lang="ts"> | 
					
						
							| 
									
										
										
										
											2021-10-07 09:39:47 -08:00
										 |  |  | import { defineComponent, useRoute, ref, useMeta } from "@nuxtjs/composition-api"; | 
					
						
							| 
									
										
										
										
											2021-09-05 22:05:29 -08:00
										 |  |  | import RecipeCardSection from "@/components/Domain/Recipe/RecipeCardSection.vue"; | 
					
						
							| 
									
										
										
										
											2021-09-01 21:39:40 -08:00
										 |  |  | import { useCookbook } from "~/composables/use-group-cookbooks"; | 
					
						
							| 
									
										
										
										
											2022-04-01 09:50:31 -08:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-31 18:51:34 -08:00
										 |  |  | export default defineComponent({ | 
					
						
							|  |  |  |   components: { RecipeCardSection }, | 
					
						
							|  |  |  |   setup() { | 
					
						
							|  |  |  |     const route = useRoute(); | 
					
						
							|  |  |  |     const slug = route.value.params.slug; | 
					
						
							|  |  |  |     const { getOne } = useCookbook(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const tab = ref(null); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const book = getOne(slug); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-10-07 09:39:47 -08:00
										 |  |  |     useMeta(() => { | 
					
						
							|  |  |  |       return { | 
					
						
							|  |  |  |         title: book?.value?.name || "Cookbook", | 
					
						
							|  |  |  |       }; | 
					
						
							|  |  |  |     }); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-08-31 18:51:34 -08:00
										 |  |  |     return { | 
					
						
							|  |  |  |       book, | 
					
						
							|  |  |  |       tab, | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  |   }, | 
					
						
							| 
									
										
										
										
											2021-10-07 09:39:47 -08:00
										 |  |  |   head: {}, // Must include for useMeta
 | 
					
						
							| 
									
										
										
										
											2021-08-31 18:51:34 -08:00
										 |  |  | }); | 
					
						
							|  |  |  | </script> |