Remove layouts
This commit is contained in:
parent
65313668cc
commit
49c8148fd2
|
|
@ -1,11 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<AppLayout>
|
<RouterView />
|
||||||
<RouterView />
|
|
||||||
</AppLayout>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import AppLayout from "@/layouts/AppLayout.vue";
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
<template>
|
|
||||||
<component :is="layout">
|
|
||||||
<slot />
|
|
||||||
</component>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import AppLayoutDefault from './AppLayoutDefault.vue'
|
|
||||||
import { markRaw, watch, shallowRef } from 'vue'
|
|
||||||
import { useRoute } from 'vue-router'
|
|
||||||
export default {
|
|
||||||
name: 'AppLayout',
|
|
||||||
setup() {
|
|
||||||
// https://stackoverflow.com/questions/69048657/dynamic-layout-in-vue-3-with-vite
|
|
||||||
const layout = shallowRef(AppLayoutDefault)
|
|
||||||
const route = useRoute()
|
|
||||||
watch(
|
|
||||||
() => route.meta?.layout,
|
|
||||||
async metaLayout => {
|
|
||||||
try {
|
|
||||||
if (metaLayout === undefined) {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
const component = await import(/* @vite-ignore */ `./${metaLayout}.vue`)
|
|
||||||
layout.value = markRaw(component?.default || AppLayoutDefault)
|
|
||||||
} catch (e) {
|
|
||||||
layout.value = markRaw(AppLayoutDefault)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{ immediate: true }
|
|
||||||
)
|
|
||||||
return { layout }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
<template>
|
|
||||||
<VBVNavigationBar />
|
|
||||||
<MainNavigationBar />
|
|
||||||
<div>
|
|
||||||
<slot />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import VBVNavigationBar from '@/components/VBVNavigationBar.vue'
|
|
||||||
import MainNavigationBar from '@/components/MainNavigationBar.vue'
|
|
||||||
</script>
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
<template>
|
|
||||||
<div>
|
|
||||||
<slot />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
const LearningPathOverview = () => import('../views/LearningPathOverview.vue')
|
|
||||||
|
|
||||||
export default [
|
|
||||||
{
|
|
||||||
path: ':id',
|
|
||||||
component: LearningPathOverview,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
<template>
|
||||||
|
<VBVNavigationBar />
|
||||||
|
<MainNavigationBar />
|
||||||
|
<div>
|
||||||
|
Sidebar
|
||||||
|
</div>
|
||||||
|
<main>
|
||||||
|
main
|
||||||
|
</main>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import MainNavigationBar from "../components/MainNavigationBar.vue";
|
||||||
|
import VBVNavigationBar from "../components/VBVNavigationBar.vue";
|
||||||
|
export default {
|
||||||
|
name: "CircleView",
|
||||||
|
components: {MainNavigationBar, VBVNavigationBar}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
<template>
|
|
||||||
<h1>Lernpfad</h1>
|
|
||||||
<router-view></router-view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
export default {
|
|
||||||
name: 'LearningPath'
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
|
|
||||||
</style>
|
|
||||||
Loading…
Reference in New Issue