traxxx/assets/components/container/container.vue

60 lines
954 B
Vue
Raw Normal View History

<template>
2020-03-23 00:43:49 +00:00
<div
class="container"
:class="theme"
>
<Header />
<div class="content">
<!-- key forces rerender when new and old path use same component -->
<router-view :key="$route.fullPath" />
</div>
</div>
</template>
<script>
2020-03-23 00:43:49 +00:00
import { mapState } from 'vuex';
import Header from '../header/header.vue';
2020-03-23 00:43:49 +00:00
function theme(state) {
return state.ui.theme;
}
export default {
components: {
Header,
},
2020-03-23 00:43:49 +00:00
computed: {
...mapState({
theme,
}),
},
};
</script>
<style lang="scss">
2019-11-14 00:18:19 +00:00
@import 'theme';
.container {
2020-03-23 00:43:49 +00:00
background: var(--background-dim);
height: 100%;
display: flex;
flex-direction: column;
overflow: hidden;
}
.content {
display: flex;
flex-direction: column;
flex-grow: 1;
2019-11-14 00:18:19 +00:00
overflow-y: auto;
}
.content-inner {
flex-grow: 1;
padding: 1rem;
overflow-y: auto;
}
</style>