div
nav.bg-green-800(class="dark:bg-gray-900")
.mx-auto.max-w-7xl.px-2(class="sm:px-6 lg:px-8 dark:border-b-1 dark:border-green-300")
.relative.flex.h-16.items-center.justify-between
.absolute.inset-y-0.left-0.flex.items-center(class="sm:hidden")
button.inline-flex.items-center.justify-center.rounded-md.p-2.text-gray-400(
type="button" class="hover:bg-green-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white" aria-controls="mobile-menu" aria-expanded="false"
@click="boxInfo = !boxInfo"
)
span.sr-only Open main menu
svg.block.h-6.w-6(xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true")
path(stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5")
.flex.flex-1.items-center.justify-center(class="sm:items-stretch sm:justify-start")
.flex.flex-shrink-0.items-center
.hidden(class="sm:ml-6 sm:block")
.flex.space-x-4
nuxt-link.text-white.px-3.py-2.rounded-md.text-sm.font-medium(:class="[routeName == 'index' ? 'bg-green-900': 'text-gray-300']" to="/" aria-current="page") Home
.absolute.inset-y-0.right-0.flex.items-center.pr-2(class="sm:static sm:inset-auto sm:ml-6 sm:pr-0" v-if="isLogged")
nuxt-link.leading-6.text-white.px-3.py-2.rounded-md.text-sm.font-medium(:class="['hidden sm:flex', routeName == 'create-model' ? 'bg-green-900': 'text-gray-300']" to="/create" aria-current="page")
| Create
.relative.ml-3
div
button#user-menu-button.flex.rounded-full.bg-green-800.text-sm(
type="button" class="focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-green-800" aria-expanded="false" aria-haspopup="true"
@click="boxUserInfo = !boxUserInfo"
)
span.sr-only Open user menu
user-avatar(:data="me")
.absolute.right-0.z-10.mt-2.w-48.origin-top-right.rounded-md.bg-white.py-1.shadow-lg.ring-1.ring-black.ring-opacity-5(
class="focus:outline-none dark:bg-gray-800" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button" tabindex="-1"
v-if="boxUserInfo && me"
)
nuxt-link.flex.leading-6.block.px-4.py-2.text-sm.text-gray-700(class="dark:text-white sm:hidden" to="/create" role="menuitem" tabindex="-1")
| Create
nuxt-link.flex.leading-6.block.px-4.py-2.text-sm.text-gray-700(class="dark:text-white" :to="'/user/'+me.id" role="menuitem" tabindex="-1")
| Your Profile
nuxt-link.flex.leading-6.block.px-4.py-2.text-sm.text-gray-700(class="dark:text-white" to="/admin" role="menuitem" tabindex="-1" v-if="me.is_staff")
| Admin
nuxt-link.flex.leanding-6.block.px-4.py-2.text-sm.text-gray-700(class="dark:text-white" to="/settings" role="menuitem" tabindex="-1")
| Settings
nuxt-link.flex.leading-6.block.px-4.py-2.text-sm.text-gray-700(class="dark:text-white" to="#" role="menuitem" tabindex="-1" @click="logout")
| Sign out
.absolute.inset-y-0.right-0.flex.items-center.pr-2(class="sm:static sm:inset-auto sm:ml-6 sm:pr-0" v-else)
nuxt-link(to="/signin")
button.text-white.flex.leading-6
| Sign
#mobile-menu(class="sm:hidden" v-if="boxInfo")
.space-y-1.px-2.pt-2.pb-3
nuxt-link.text-white.block.px-3.py-2.rounded-md.text-base.font-medium(:class="[routeName == 'index' ? 'bg-green-900': 'text-gray-300']" to="/" aria-current="page") Home
header.bg-white.shadow(v-if="pageName")
.mx-auto.max-w-7xl.py-6.px-4(class="sm:px-6 lg:px-8")
h1.text-3xl.font-bold.tracking-tight.text-gray-900 {{ pageName }}