Added compact sidebar. Added tag sections and posters.
This commit is contained in:
@@ -3,7 +3,12 @@
|
||||
class="container"
|
||||
:class="theme"
|
||||
>
|
||||
<Header />
|
||||
<Sidebar
|
||||
v-if="showSidebar"
|
||||
:toggle-sidebar="toggleSidebar"
|
||||
/>
|
||||
|
||||
<Header :toggle-sidebar="toggleSidebar" />
|
||||
|
||||
<div class="content">
|
||||
<!-- key forces rerender when new and old path use same component -->
|
||||
@@ -15,21 +20,45 @@
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
|
||||
import EventBus from '../../js/event-bus';
|
||||
|
||||
import Header from '../header/header.vue';
|
||||
import Sidebar from '../sidebar/sidebar.vue';
|
||||
|
||||
function theme(state) {
|
||||
return state.ui.theme;
|
||||
}
|
||||
|
||||
function toggleSidebar(state) {
|
||||
this.showSidebar = typeof state === 'boolean' ? state : !this.showSidebar;
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
document.addEventListener('click', () => {
|
||||
EventBus.$emit('blur');
|
||||
this.showSidebar = false;
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Header,
|
||||
Sidebar,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showSidebar: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
theme,
|
||||
}),
|
||||
},
|
||||
mounted,
|
||||
methods: {
|
||||
toggleSidebar,
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -37,11 +66,12 @@ export default {
|
||||
@import 'theme';
|
||||
|
||||
.container {
|
||||
background: var(--background-dim);
|
||||
position: relative;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
background: var(--background-dim);
|
||||
}
|
||||
|
||||
.content {
|
||||
|
||||
Reference in New Issue
Block a user