Commit 06f32646 authored by TTS Kieu Tuan Anh's avatar TTS Kieu Tuan Anh

Merge branch 'feature/admin-navbar' into 'feature/deploy-to-aws'

fix admin navbar

See merge request !27
parents 2862a9fb 045cf310
<!-- eslint-disable vue/multi-word-component-names --> <!-- eslint-disable vue/multi-word-component-names -->
<template> <template>
<div> <div>
<v-toolbar <v-navigation-drawer
dark v-model="drawer"
prominent :mini-variant="miniVariant"
src="https://cdn.vuetifyjs.com/images/backgrounds/vbanner.jpg" :clipped="clipped"
fixed
app
> >
<v-app-bar-nav-icon /> <v-list>
<v-list-item
v-for="(item, i) in items"
:key="i"
:to="item.to"
router
exact
>
<v-list-item-action>
<v-icon>{{ item.icon }}</v-icon>
</v-list-item-action>
<v-list-item-content>
<v-list-item-title>{{ item.title }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</v-navigation-drawer>
<v-app-bar
class="navbar"
:clipped-left="clipped"
fixed
app
>
<v-app-bar-nav-icon @click.stop="drawer = !drawer" />
<v-btn
icon
@click.stop="miniVariant = !miniVariant"
>
<v-icon>mdi-{{ `chevron-${miniVariant ? 'right' : 'left'}` }}</v-icon>
</v-btn>
<v-toolbar-title> <v-toolbar-title>
<v-btn to="/users"> <router-link class="navbar-title" to="/home-page" target="_blank">
<span>USER</span> {{ title }}
<v-icon dense> </router-link>
mdi-account
</v-icon>
</v-btn>
<v-btn to="/categories">
<span>CATEGORY</span>
<v-icon dense>
mdi-heart
</v-icon>
</v-btn>
<v-btn to="/products">
<span>PRODUCT</span>
<v-icon dense>
mdi-briefcase
</v-icon>
</v-btn>
<v-btn to="/posts">
<span>POST</span>
<v-icon dense>
mdi-newspaper
</v-icon>
</v-btn>
<v-btn to="/home-page">
<span>HOME PAGE</span>
<v-icon dense>
mdi-home
</v-icon>
</v-btn>
</v-toolbar-title> </v-toolbar-title>
<v-spacer /> <v-spacer />
<v-toolbar-title class="profile"> <v-toolbar-title class="profile">
{{ $auth.$storage.getUniversal("userName") }} {{ $auth.$storage.getUniversal("userName") }}
</v-toolbar-title> </v-toolbar-title>
...@@ -82,11 +79,40 @@ ...@@ -82,11 +79,40 @@
</v-list> </v-list>
</v-menu> </v-menu>
</div> </div>
</v-toolbar> </v-app-bar>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
data () {
return {
drawer: false,
items: [
{
icon: 'mdi-account',
title: 'User',
to: '/users'
},
{
icon: 'mdi-heart',
title: 'Categories',
to: '/categories'
},
{
icon: 'mdi-briefcase',
title: 'Products',
to: '/products'
},
{
icon: 'mdi-newspaper',
title: 'Posts',
to: '/posts'
}
],
miniVariant: false,
title: 'Homepage'
}
},
mounted () { mounted () {
console.log('123') console.log('123')
}, },
...@@ -124,4 +150,10 @@ export default { ...@@ -124,4 +150,10 @@ export default {
.v-application--is-ltr .v-list-item__action:first-child, .v-application--is-ltr .v-list-item__icon:first-child { .v-application--is-ltr .v-list-item__action:first-child, .v-application--is-ltr .v-list-item__icon:first-child {
margin-right: 15px; margin-right: 15px;
} }
.navbar {
background: url('https://cdn.vuetifyjs.com/images/backgrounds/vbanner.jpg');
}
.navbar-title {
text-decoration: none;
}
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment