mirror of
https://github.com/rjNemo/meal_planner
synced 2026-06-06 02:26:49 +00:00
ref: use slots to prevent repeating menu
This commit is contained in:
parent
7c4f6419cd
commit
55d857e658
2 changed files with 7 additions and 3 deletions
6
app.vue
6
app.vue
|
|
@ -1,6 +1,10 @@
|
|||
<template>
|
||||
<div data-theme="cupcake" class="flex flex-col h-screen">
|
||||
<app-navbar />
|
||||
<app-navbar>
|
||||
<template #menu>
|
||||
<li><nuxt-link to="/categories">Categories</nuxt-link></li>
|
||||
</template>
|
||||
</app-navbar>
|
||||
<main class="flex-grow">
|
||||
<nuxt-page />
|
||||
</main>
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ if (route.path === "/search") {
|
|||
tabindex="0"
|
||||
class="menu menu-sm dropdown-content mt-3 z-[1] p-2 shadow bg-base-200 rounded-box w-52"
|
||||
>
|
||||
<li><nuxt-link to="/categories">Categories</nuxt-link></li>
|
||||
<slot name="menu" />
|
||||
</ul>
|
||||
</div>
|
||||
<nuxt-link to="/" class="btn btn-ghost text-xl">
|
||||
|
|
@ -77,7 +77,7 @@ if (route.path === "/search") {
|
|||
</div>
|
||||
<div class="navbar-center hidden lg:flex">
|
||||
<ul class="menu menu-horizontal px-1">
|
||||
<li><nuxt-link to="/categories">Categories</nuxt-link></li>
|
||||
<slot name="menu" />
|
||||
</ul>
|
||||
</div>
|
||||
<div class="navbar-end gap-2">
|
||||
|
|
|
|||
Loading…
Reference in a new issue