From a163ec2d7497acb51612669a83e31e37746c176f Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Mon, 12 Aug 2019 12:16:39 +0200 Subject: Add NavBar --- src/App.vue | 22 +++++++++------- src/components/NavBar.vue | 64 ++++++++++++++++++++++++++++++++++++++++++++++ src/components/NavLink.vue | 24 ++++++++++++++--- src/router/index.js | 19 +++++++++----- 4 files changed, 110 insertions(+), 19 deletions(-) create mode 100644 src/components/NavBar.vue diff --git a/src/App.vue b/src/App.vue index b9c4497..dae6356 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,32 +1,36 @@ diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue new file mode 100644 index 0000000..2486933 --- /dev/null +++ b/src/components/NavBar.vue @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file diff --git a/src/components/NavLink.vue b/src/components/NavLink.vue index 6211333..7ad5088 100644 --- a/src/components/NavLink.vue +++ b/src/components/NavLink.vue @@ -1,6 +1,7 @@ @@ -8,7 +9,22 @@ export default { props: { link: String, - name: String + name: String, + external: { type: Boolean, default: false } } }; - \ No newline at end of file + + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index 8322173..532747a 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -5,14 +5,21 @@ import GalleryView from "../views/GalleryView"; import DownloadView from "../views/DownloadView"; import PageNotFoundView from "../views/PageNotFoundView"; -const routes = [ - { path: "/", component: HomeView }, - { path: "/gallery", component: GalleryView }, - { path: "/download", component: DownloadView }, - { path: "*", component: PageNotFoundView } +export const routes = [ + { path: "/", name: "Home", component: HomeView }, + { path: "/o-nas", name: "O nas" }, + { path: "/download", name: "Do pobrania", component: DownloadView } +]; + +export const externalRoutes = [ + { + path: "https://kronika-puszcza.netlify.com", + name: "Kronika" + }, + { path: "https://kronika-puszcza.netlify.com/galeria", name: "Galeria" } ]; export const router = new VueRouter({ mode: "history", - routes + routes: [...routes, { path: "*", component: PageNotFoundView }] }); -- cgit 1.4.1