Skip to content
App.vue 769 B
Newer Older
<template>
  <div id="app" v-if="model">
    <TopMenu v-bind:user="model.user" />
    <div class="container">
      <Main v-bind:model="model" />
    </div>
  </div>
</template>

<script>
import TopMenu from './components/TopMenu.vue'
import Main from './components/Main.vue'
import client from 'api-client'

export default {
  name: 'app',
  components: {
    TopMenu,
    Main
  },
  data: function() {
    return {
      model: null
    }
  },
  mounted: function() {
    client
      .fetchMainModel()
      .then(model => this.$data.model = model);
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
</style>