From 5bf47995fa24cf429853151867392a3daf0a1f5c Mon Sep 17 00:00:00 2001 From: Ulf Treger Date: Mon, 9 Sep 2024 20:09:04 +0200 Subject: [PATCH] Introducing layerinfo and placeinfo with router setup --- src/components/LayerInfoView.vue | 84 ++++++++++++++++++++++++++++++++ src/components/LeafletMap.vue | 44 ++++++++++++++++- src/components/PlaceView.vue | 72 +++++++++++++++++++++++++++ src/router/index.js | 18 +++++++ src/views/AboutView.vue | 21 ++++++-- 5 files changed, 233 insertions(+), 6 deletions(-) create mode 100644 src/components/LayerInfoView.vue create mode 100644 src/components/PlaceView.vue diff --git a/src/components/LayerInfoView.vue b/src/components/LayerInfoView.vue new file mode 100644 index 0000000..15d35c9 --- /dev/null +++ b/src/components/LayerInfoView.vue @@ -0,0 +1,84 @@ + + + + + \ No newline at end of file diff --git a/src/components/LeafletMap.vue b/src/components/LeafletMap.vue index 275d53a..a67dcf0 100644 --- a/src/components/LeafletMap.vue +++ b/src/components/LeafletMap.vue @@ -26,6 +26,7 @@ + + \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index f346da6..a23eca4 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1,6 +1,8 @@ import { createRouter, createWebHistory } from 'vue-router' import HomeView from '@/views/HomeView.vue' import AboutView from '@/views/AboutView.vue' +import LayerInfoView from '@/components/LayerInfoView.vue'; +import PlaceView from '@/components/PlaceView.vue'; const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -14,6 +16,22 @@ const router = createRouter({ path: '/about', name: 'about', component: AboutView + }, + { path: '/layer/:id', + name: 'layer', + component: LayerInfoView + }, + { + path: '/layer/:layerId', + name: 'layerInfo', + component: LayerInfoView, + props: true + }, + { + path: '/layer/:layerId/place/:placeId', + name: 'placeInfo', + component: PlaceView, + props: true } ] }) diff --git a/src/views/AboutView.vue b/src/views/AboutView.vue index c87547e..97370f5 100644 --- a/src/views/AboutView.vue +++ b/src/views/AboutView.vue @@ -4,15 +4,26 @@

Credits/Impressum?


TODO

-

Was noch gemacht werden muss:

+

Was erledigt ist, in Arbeit oder noch gemacht werden muss:

+ +

Vielleicht einen Tick später

+