From ebe0c8026d346aac651b1879a307230561712539 Mon Sep 17 00:00:00 2001 From: cristij Date: Tue, 12 Feb 2019 13:53:17 +0200 Subject: [PATCH] Add starter layout for easier development --- src/layout/starter/Content.vue | 16 ++++ src/layout/starter/MobileMenu.vue | 10 +++ src/layout/starter/SampleFooter.vue | 22 +++++ src/layout/starter/SampleLayout.vue | 41 +++++++++ src/layout/starter/SampleNavbar.vue | 125 ++++++++++++++++++++++++++++ src/layout/starter/SamplePage.vue | 12 +++ src/main.js | 1 + src/router/starterRouter.js | 24 ++++++ 8 files changed, 251 insertions(+) create mode 100644 src/layout/starter/Content.vue create mode 100644 src/layout/starter/MobileMenu.vue create mode 100644 src/layout/starter/SampleFooter.vue create mode 100755 src/layout/starter/SampleLayout.vue create mode 100644 src/layout/starter/SampleNavbar.vue create mode 100755 src/layout/starter/SamplePage.vue create mode 100644 src/router/starterRouter.js diff --git a/src/layout/starter/Content.vue b/src/layout/starter/Content.vue new file mode 100644 index 0000000..93032db --- /dev/null +++ b/src/layout/starter/Content.vue @@ -0,0 +1,16 @@ + + diff --git a/src/layout/starter/MobileMenu.vue b/src/layout/starter/MobileMenu.vue new file mode 100644 index 0000000..0917ac9 --- /dev/null +++ b/src/layout/starter/MobileMenu.vue @@ -0,0 +1,10 @@ + + + diff --git a/src/layout/starter/SampleFooter.vue b/src/layout/starter/SampleFooter.vue new file mode 100644 index 0000000..e3e20e3 --- /dev/null +++ b/src/layout/starter/SampleFooter.vue @@ -0,0 +1,22 @@ + + + diff --git a/src/layout/starter/SampleLayout.vue b/src/layout/starter/SampleLayout.vue new file mode 100755 index 0000000..912023b --- /dev/null +++ b/src/layout/starter/SampleLayout.vue @@ -0,0 +1,41 @@ + + + diff --git a/src/layout/starter/SampleNavbar.vue b/src/layout/starter/SampleNavbar.vue new file mode 100644 index 0000000..76cbb25 --- /dev/null +++ b/src/layout/starter/SampleNavbar.vue @@ -0,0 +1,125 @@ + + + diff --git a/src/layout/starter/SamplePage.vue b/src/layout/starter/SamplePage.vue new file mode 100755 index 0000000..e56df8c --- /dev/null +++ b/src/layout/starter/SamplePage.vue @@ -0,0 +1,12 @@ + + + diff --git a/src/main.js b/src/main.js index 46df745..d805b6d 100644 --- a/src/main.js +++ b/src/main.js @@ -1,5 +1,6 @@ import Vue from "vue"; import App from "./App"; +// TIP: change to import router from "./router/starterRouter"; to start with a clean layout import router from "./router/index"; import BlackDashboard from "./plugins/blackDashboard"; diff --git a/src/router/starterRouter.js b/src/router/starterRouter.js new file mode 100644 index 0000000..0cacc83 --- /dev/null +++ b/src/router/starterRouter.js @@ -0,0 +1,24 @@ +import Vue from 'vue'; +import Router from 'vue-router'; +import DashboardLayout from '../layout/starter/SampleLayout.vue'; +import Starter from '../layout/starter/SamplePage.vue'; + +Vue.use(Router); + +export default new Router({ + routes: [ + { + path: '/', + name: 'home', + redirect: '/dashboard', + component: DashboardLayout, + children: [ + { + path: 'dashboard', + name: 'dashboard', + components: { default: Starter } + } + ] + } + ] +});