Skip to content

Instantly share code, notes, and snippets.

@lefuturiste
Created October 18, 2018 11:22
Show Gist options
  • Save lefuturiste/f1c868110350a5b971d78e7d6713de08 to your computer and use it in GitHub Desktop.
Save lefuturiste/f1c868110350a5b971d78e7d6713de08 to your computer and use it in GitHub Desktop.
random tmp gist
<template>
<div id="app">
<no-ssr>
<drawer-menu
:isOpen="$store.state.drawerEnabled"
right>
<a
id="home"
href="#">
<span>Home</span>
</a>
</drawer-menu>
</no-ssr>
<!--<div
:class="{ 'drawer-enabled' : $store.state.drawerEnabled }"
class="drawer-container">
<div class="drawer-content">
</div>
<div
v-if="$store.state.drawerEnabled"
class="drawer-menu">
hello world
</div>
</div>-->
<main id="page-wrap">
<header-container />
<nuxt class="content-container"/>
<footer-container />
</main>
</div>
</template>
<script>
import HeaderContainer from '~/components/HeaderContainer.vue'
import FooterContainer from '~/components/FooterContainer.vue'
import { ScaleRotate } from 'vue-burger-menu'
export default {
components: {
'header-container': HeaderContainer,
'footer-container': FooterContainer,
'drawer-menu': ScaleRotate
},
data () {
return {
}
},
mounted () {
let locale = navigator.language;
if (this.$ls.get('locale') === undefined || this.$ls.get('locale') === null){
this.$ls.set('locale', locale);
this.$i18n.locale = locale
} else {
this.$i18n.locale = this.$ls.get('locale')
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment