aboutsummaryrefslogtreecommitdiff
path: root/components/Navbar.vue
blob: 9e14274f9e1acf0e120f39108e22761b7885d0de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<template>
    <div>
        <v-app-bar>
          <v-toolbar-title>Andrew Lee</v-toolbar-title>
          <v-spacer/>

          <!-- Mobile Only -->
          <span class="hidden-sm-and-up">
          <v-btn @click.stop="drawer = !drawer">Menu</v-btn>
          </span>
          <!-- Desktop + Tablets Only -->
          <v-toolbar-items class="hidden-xs-only">
          <v-btn v-for="item in items" :key="item.title" :to="item.link" text>{{ item.title }}</v-btn>
          </v-toolbar-items>
        </v-app-bar>

        <!-- Mobile Only -->
        <v-navigation-drawer v-model="drawer" absolute temporary left>
          <v-list dense>
          <v-list-item v-for="item in items" :key="item.title" :to="item.link" link>
          <v-list-item-icon>
            <v-icon>mdi-{{ item.icon }}</v-icon>
          </v-list-item-icon>

          <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>
    </div>
</template>

<script>
export default {
  name: 'Navbar',
  data () {
    return {
      drawer: false,
      items: [
        { title: 'Home', link: '/', icon: 'home' },
        { title: 'Blog', link: 'blog', icon: 'blog' },
        { title: 'Projects', link: 'projects', icon: 'projects' }
      ]
    }
  }
}
</script>

<style scoped>
</style>