diff --git a/webapp/components/FilterPosts/FilterPosts.vue b/webapp/components/FilterPosts/FilterPosts.vue index bf22ba795..842e3f15e 100644 --- a/webapp/components/FilterPosts/FilterPosts.vue +++ b/webapp/components/FilterPosts/FilterPosts.vue @@ -34,6 +34,7 @@ @@ -245,6 +267,10 @@ export default { flex: 1; } +.main-navigation-right .desktop-view { + float: right; +} + .avatar-menu-trigger { user-select: none; display: flex; @@ -288,4 +314,21 @@ export default { } } } + +@media only screen and (min-width: 960px) { + .mobile-hamburger-menu { + display: none; + } +} + +@media only screen and (max-width: 960px) { + #nav-search-box, + .main-navigation-right { + margin: 10px 0px; + } + + .hide-mobile-menu { + display: none; + } +} diff --git a/webapp/pages/index.vue b/webapp/pages/index.vue index 43a65117a..e39aca567 100644 --- a/webapp/pages/index.vue +++ b/webapp/pages/index.vue @@ -2,10 +2,14 @@
- + tag.name) : '-' + return this.posts ? this.posts.tags.map(tag => tag.name) : '-' }, offset() { return (this.page - 1) * this.pageSize }, }, methods: { + ...mapActions({ + fetchCategories: 'categories/fetchCategories', + }), + ...mapMutations({ + setPosts: 'posts/SET_POSTS', + }), changeFilterBubble(filter) { this.filter = filter this.$apollo.queries.Post.refresh() diff --git a/webapp/store/posts.js b/webapp/store/posts.js new file mode 100644 index 000000000..cecc2a58e --- /dev/null +++ b/webapp/store/posts.js @@ -0,0 +1,17 @@ +export const state = () => { + return { + posts: [], + } +} + +export const mutations = { + SET_POSTS(state, posts) { + state.posts = posts || null + }, +} + +export const getters = { + posts(state) { + return state.posts || [] + }, +}