Add book route
This commit is contained in:
parent
a2484b9d6f
commit
955f6d7fc0
|
|
@ -0,0 +1,33 @@
|
|||
<template>
|
||||
<div class="book">
|
||||
<aside>
|
||||
<h2>Themen</h2>
|
||||
<ul>
|
||||
<li>1. Berufliche Grundbildung</li>
|
||||
<li>2. Geld und Kauf</li>
|
||||
<li>3. Geld und Kauf</li>
|
||||
<li>4. Geld und Kauf</li>
|
||||
<li>5. Geld und Kauf</li>
|
||||
<li>6. Geld und Kauf</li>
|
||||
<li>7. Geld und Kauf</li>
|
||||
<li>8. Geld und Kauf</li>
|
||||
<li>9. Geld und Kauf</li>
|
||||
</ul>
|
||||
<h2>Basiswissen</h2>
|
||||
<h2>ABU News</h2>
|
||||
|
||||
</aside>
|
||||
<main>
|
||||
<router-view></router-view>
|
||||
</main>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.book {
|
||||
display: grid;
|
||||
grid-template-columns: 305px 1fr;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,19 +2,28 @@ import Vue from 'vue'
|
|||
import Router from 'vue-router'
|
||||
import index from '@/pages/index'
|
||||
import topic from '@/pages/topic'
|
||||
import book from '@/pages/book'
|
||||
import p404 from '@/pages/p404'
|
||||
|
||||
const routerOptions = [
|
||||
const routes = [
|
||||
{path: '/', name: 'index', component: index},
|
||||
{path: '/topic', name: 'topic', component: topic},
|
||||
{
|
||||
path: '/book',
|
||||
name: 'book',
|
||||
component: book,
|
||||
children: [
|
||||
{path: 'topic', component: topic}
|
||||
]
|
||||
|
||||
},
|
||||
{path: '*', component: p404}
|
||||
]
|
||||
|
||||
const routes = routerOptions.map(route => {
|
||||
return {
|
||||
...route
|
||||
}
|
||||
})
|
||||
// const routes = routerOptions.map(route => {
|
||||
// return {
|
||||
// ...route
|
||||
// }
|
||||
// })
|
||||
|
||||
Vue.use(Router)
|
||||
export default new Router({
|
||||
|
|
|
|||
Loading…
Reference in New Issue