default.vue 2.82 KB
<template>
  <v-app id="keep">
    <v-app-bar
      app
      clipped-left
      color="amber"
    >
      <v-app-bar-nav-icon @click="drawer = !drawer"/>
      <span class="title ml-3 mr-5">KHUloud&nbsp;</span>
      <v-text-field
        solo-inverted
        flat
        hide-details
        label="Search"
        prepend-inner-icon="search"
      />
      <v-spacer/>
      <v-btn
        icon
        to="/inspire">
        <v-icon>account_circle</v-icon>
      </v-btn>
    </v-app-bar>

    <v-navigation-drawer
      v-model="drawer"
      app
      clipped
      color="grey lighten-4"
    >
      <v-list
        dense
        class="grey lighten-4"
      >
        <template v-for="(item, i) in items">
          <v-row
            v-if="item.heading"
            :key="i"
            align="center"
          >
            <v-col cols="6">
              <v-subheader v-if="item.heading">
                {{ item.heading }}
              </v-subheader>
            </v-col>
            <v-col
              cols="6"
              class="text-right"
            >
              <v-btn
                small
                text
              >edit
              </v-btn>
            </v-col>
          </v-row>
          <v-divider
            v-else-if="item.divider"
            :key="i"
            dark
            class="my-4"
          />
          <v-list-item
            v-else
            :key="i"
            link
          >
            <v-list-item-action>
              <v-icon>{{ item.icon }}</v-icon>
            </v-list-item-action>
            <v-list-item-content>
              <v-list-item-title class="grey--text">
                {{ item.text }}
              </v-list-item-title>
            </v-list-item-content>
          </v-list-item>
        </template>
      </v-list>
    </v-navigation-drawer>

    <v-content>
        <nuxt/>
    </v-content>
  </v-app>
</template>

<script>
  import 'material-design-icons-iconfont/dist/material-design-icons.css'

  export default {
    props: {
      source: String,
    },
    data: () => ({
      drawer: false,
      items: [
        {icon: 'lightbulb_outline', text: 'Notes'},
        {icon: 'touch_app', text: 'Reminders'},
        {divider: true},
        {heading: 'Labels'},
        {icon: 'add', text: 'Create new folder'},
        {divider: true},
        {icon: 'archive', text: 'Archive'},
        {icon: 'delete', text: 'Trash'},
        {divider: true},
        {icon: 'settings', text: 'Settings'},
        {icon: 'chat_bubble', text: 'Trash'},
        {icon: 'help', text: 'Help'},
        {icon: 'phonelink', text: 'App downloads'},
        {icon: 'keyboard', text: 'Keyboard shortcuts'},
      ],
    }),
    methods: {
      account() {
        this.$router.push('inspire');
      }
    }
  }
</script>

<style>
  #keep .v-navigation-drawer__border {
    display: none
  }
</style>