Added compact sidebar. Added tag sections and posters.

This commit is contained in:
2020-03-25 02:48:54 +01:00
parent d724f96728
commit 15a386ad05
48 changed files with 466 additions and 119 deletions

View File

@@ -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 {