From d879aa1955cb8e07e0d584a470b986c6f4c3dc51 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Mon, 8 Apr 2019 17:16:35 +0200 Subject: [PATCH] Add mobile navigation --- client/src/App.vue | 20 +++- client/src/components/HeaderBar.vue | 10 +- client/src/components/MobileHeader.vue | 55 ++++++++++ client/src/components/MobileNavigation.vue | 118 +++++++++++++++++++++ client/src/components/TopNavigation.vue | 26 ++++- client/src/components/icons/Hamburger.vue | 7 ++ client/src/components/icons/Logo.vue | 37 +++++++ client/src/layouts/DefaultLayout.vue | 10 +- client/src/pages/start.vue | 7 +- client/src/router/index.js | 18 +++- client/src/store/index.js | 16 ++- 11 files changed, 306 insertions(+), 18 deletions(-) create mode 100644 client/src/components/MobileHeader.vue create mode 100644 client/src/components/MobileNavigation.vue create mode 100644 client/src/components/icons/Hamburger.vue create mode 100644 client/src/components/icons/Logo.vue diff --git a/client/src/App.vue b/client/src/App.vue index 87c0b32c..1c73926d 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -1,7 +1,8 @@ @@ -10,6 +11,7 @@ import SimpleLayout from '@/layouts/SimpleLayout'; import BlankLayout from '@/layouts/BlankLayout'; import Modal from '@/components/Modal'; + import MobileNavigation from '@/components/MobileNavigation'; import NewContentBlockWizard from '@/components/content-block-form/NewContentBlockWizard'; import EditContentBlockWizard from '@/components/content-block-form/EditContentBlockWizard'; import NewRoomEntryWizard from '@/components/rooms/room-entries/NewRoomEntryWizard'; @@ -21,6 +23,8 @@ import FullscreenInfographic from '@/components/FullscreenInfographic'; import FullscreenVideo from '@/components/FullscreenVideo'; + import {mapGetters} from 'vuex'; + export default { name: 'App', @@ -29,6 +33,7 @@ SimpleLayout, BlankLayout, Modal, + MobileNavigation, NewContentBlockWizard, EditContentBlockWizard, NewRoomEntryWizard, @@ -45,9 +50,7 @@ layout() { return (this.$route.meta.layout || 'default') + '-layout'; }, - showModal() { - return this.$store.state.showModal - } + ...mapGetters(['showModal', 'showMobileNavigation']) }, mounted() { @@ -58,9 +61,16 @@ diff --git a/client/src/components/MobileNavigation.vue b/client/src/components/MobileNavigation.vue new file mode 100644 index 00000000..482b2b63 --- /dev/null +++ b/client/src/components/MobileNavigation.vue @@ -0,0 +1,118 @@ + + + + + diff --git a/client/src/components/TopNavigation.vue b/client/src/components/TopNavigation.vue index 0d278098..de7c5e67 100644 --- a/client/src/components/TopNavigation.vue +++ b/client/src/components/TopNavigation.vue @@ -1,5 +1,5 @@