aboutsummaryrefslogtreecommitdiff
path: root/components/Navbar.vue
blob: f297774850530d5d8f53234ad88bd0c3ca2ac09c (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<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" icon><v-icon>mdi-menu</v-icon></v-btn>
          </span>
          <!-- Desktop + Tablets Only -->
          <v-toolbar-items class="hidden-xs-only">
            <v-btn v-for="item in items" :key="item.title" :to="localePath(item.link)" text>{{ $t(item.title) }}</v-btn>
            <!--<v-btn :to="localePath('#')" text>Alee Logo</v-btn>-->
            <v-divider class="mx-4" vertical></v-divider>
            <v-btn v-for="locale in availableLocales" :key="locale.code" :to="switchLocalePath(locale.code)" text>{{ locale.name }}</v-btn>
          </v-toolbar-items>
        </v-app-bar>
      <!--<v-alert type="info" dismissible>
        Hey there! This is just a temporary message saying that the french option is in beta! If you see some problems with my french, be sure to make a <a href="https://github.com/Alee14/personal-website" target="_blank">pull request or point it out on my issues page</a>!
      </v-alert> -->

        <!-- Mobile Only -->
        <v-navigation-drawer v-model="drawer" absolute temporary left>
          <v-list-item>
          <v-list-item-content>
            <v-list-item-title class="title">Andrew Lee</v-list-item-title>
          </v-list-item-content>
          </v-list-item>
          <v-divider></v-divider>
          <v-list dense>
            <v-list-item v-for="item in items" :key="item.title" :to="localePath(item.link)" link>
              <v-list-item-content>
                <v-list-item-title>{{ $t(item.title) }}</v-list-item-title>
              </v-list-item-content>
            </v-list-item>
            <v-divider class="mx-4"></v-divider>
            <v-list-item v-for="locale in availableLocales" :key="locale.code" :to="switchLocalePath(locale.code)">
              <v-list-item-content>
                <v-list-item-title>{{ locale.name }}</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: 'HomeText', link: '/' },
        { title: 'ProjectsText', link: '/projects' },
        { title: 'DownloadsText', link: '/downloads' }
        // { title: 'VideosText', link: '/videos' }
        // { title: 'AleeLogoText', link: '/alee-logo' }
      ]
    }
  },
  computed: {
    availableLocales () {
      return this.$i18n.locales.filter(i => i.code !== this.$i18n.locale)
    }
  }
}
</script>

<style scoped>
a {
  color: white;
}
</style>