globalmaintainersummit.gith.../layouts/default.vue

53 строки
936 B
Vue
Исходник Постоянная ссылка Обычный вид История

2021-03-31 10:30:58 +03:00
<template>
2021-05-10 12:21:36 +03:00
<div :class="{ 'open-nav': navActive }">
<TopNav :active="navActive" @toggle="toggleNav" />
<main class="main">
2021-06-08 13:22:13 +03:00
<transition name="fade" mode="out-in">
<Nuxt />
</transition>
</main>
2021-05-03 12:56:32 +03:00
<FollowEvent />
2021-04-07 12:00:43 +03:00
<Footer />
</div>
2021-03-31 10:30:58 +03:00
</template>
2021-05-10 12:21:36 +03:00
<script>
import { mapMutations } from 'vuex'
2021-05-10 12:21:36 +03:00
export default {
data() {
return {
navActive: false,
}
},
2021-06-01 14:55:05 +03:00
mounted() {
this.updateUserTimeZone(this.$timezone())
2021-06-01 14:55:05 +03:00
},
2021-05-10 12:21:36 +03:00
methods: {
...mapMutations(['updateUserTimeZone']),
2021-05-10 13:34:30 +03:00
toggleNav() {
this.navActive = !this.navActive
2021-05-10 12:21:36 +03:00
},
},
}
</script>
<style lang="scss" scoped>
.main {
position: relative;
2021-05-03 17:04:42 +03:00
z-index: var(--z-index-content);
width: 100%;
2021-05-26 14:45:55 +03:00
margin-top: 80px;
overflow: hidden;
2021-05-26 14:45:55 +03:00
@media (min-width: $screen-sm) {
margin-top: 112px;
}
}
2021-05-10 12:21:36 +03:00
.open-nav {
@media screen and (max-width: $screen-sm) {
height: 100vh;
overflow: hidden;
}
}
</style>