aboutsummaryrefslogtreecommitdiff
path: root/components/Navbar.vue
blob: 6795752c00b87dda02c30d45489792ac54f6d5a9 (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
52
53
54
55
56
57
<template>
    <div>
        <v-app-bar>
            <v-toolbar-title>Andrew Lee</v-toolbar-title>
            <v-spacer/>

            <span class="hidden-sm-and-up">
            <v-btn @click.stop="drawer = !drawer">Menu</v-btn>
            </span>

            <v-toolbar-items class="hidden-xs-only">
            <v-btn to="/" text>
                Home
            </v-btn>
            <v-btn to="/blog" text>
                Blog
            </v-btn>
            <v-btn to="/projects" text>
                Projects
            </v-btn>
            </v-toolbar-items>
        </v-app-bar>

        <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>