Add routing for convenience

This commit is contained in:
Ramon Wenger 2018-08-14 11:45:59 +02:00
parent d6ee3a290f
commit ae3f794071
5 changed files with 15 additions and 17 deletions

View File

@ -7,6 +7,7 @@
<link href='https://fonts.googleapis.com/css?family=Material+Icons' rel="stylesheet" type="text/css"> <link href='https://fonts.googleapis.com/css?family=Material+Icons' rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:500,800" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Montserrat:500,800" rel="stylesheet">
<link href="https://use.typekit.net/tck7ptw.css" rel="stylesheet">
</head> </head>
<body> <body>
<div id="app"> <div id="app">

View File

@ -1,9 +1,7 @@
<template> <template>
<div class="container"> <div class="container">
<header class="header"> <header class="header">
<span class="header__logo"> <router-link to="/" class="header__logo">skillBox</router-link>
skillBox
</span>
</header> </header>
<router-view></router-view> <router-view></router-view>
<footer>Footer</footer> <footer>Footer</footer>

View File

@ -2,15 +2,7 @@
<aside> <aside>
<h2>Themen</h2> <h2>Themen</h2>
<ul> <ul>
<li v-for="topic in topics" :key="id">{{topic.id}}. {{topic.title}}</li> <li v-for="topic in topics" :key="topic.id">{{topic.id}}. {{topic.title}}</li>
<li></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> </ul>
<h2>Basiswissen</h2> <h2>Basiswissen</h2>
<h2>ABU News</h2> <h2>ABU News</h2>
@ -18,7 +10,6 @@
</template> </template>
<script> <script>
export default { export default {
data: () => { data: () => {
@ -32,7 +23,7 @@
{id: 6, title: 'Geld und Kauf'}, {id: 6, title: 'Geld und Kauf'},
{id: 7, title: 'Geld und Kauf'}, {id: 7, title: 'Geld und Kauf'},
{id: 8, title: 'Geld und Kauf'}, {id: 8, title: 'Geld und Kauf'},
{id: 9, title: 'Geld und Kauf'}, {id: 9, title: 'Geld und Kauf'}
] ]
} }
} }

View File

@ -1,9 +1,15 @@
<template> <template>
<div> <div>
<h3>Modules</h3> <h3>Pages</h3>
<ul> <ul>
<li v-for="module in modules" :key="module.id"> <li>
{{module.title}} <router-link to="/book">Book</router-link>
</li>
<li>
<router-link to="/book/topic">Topic</router-link>
</li>
<li>
<router-link to="/module">Modul</router-link>
</li> </li>
</ul> </ul>
</div> </div>

View File

@ -3,10 +3,12 @@ import Router from 'vue-router'
import index from '@/pages/index' import index from '@/pages/index'
import topic from '@/pages/topic' import topic from '@/pages/topic'
import book from '@/pages/book' import book from '@/pages/book'
import module from '@/pages/module'
import p404 from '@/pages/p404' import p404 from '@/pages/p404'
const routes = [ const routes = [
{path: '/', name: 'index', component: index}, {path: '/', name: 'index', component: index},
{path: '/module', name: 'module', component: module},
{ {
path: '/book', path: '/book',
name: 'book', name: 'book',