clean example

This commit is contained in:
Alexandre Chopin 2016-12-13 11:04:48 +01:00
parent 0df05fd633
commit 1916bb6d2f
5 changed files with 16 additions and 27 deletions

View File

@ -2,19 +2,17 @@
<nuxt-container> <nuxt-container>
<nav class="Navbar clearfix"> <nav class="Navbar clearfix">
<h1 class="Navbar__Title"> <h1 class="Navbar__Title">
<router-link to="/" class="Navbar__Links__Item__Link"> Nuxt Custom Routes
Nuxt Custom Routes
</router-link>
</h1> </h1>
<ul class="Navbar__Links"> <ul class="Navbar__Links">
<li class="Navbar__Links__Item"> <li class="Navbar__Links__Item">
<router-link to="/author" class="Navbar__Links__Item__Link"> <router-link to="/team" class="Navbar__Links__Item__Link">
Basic route Basic route
</router-link> </router-link>
</li> </li>
<li class="Navbar__Links__Item"> <li class="Navbar__Links__Item">
<router-link to="/projects" class="Navbar__Links__Item__Link"> <router-link to="/projects" class="Navbar__Links__Item__Link">
Dynamic route Dynamic routes
</router-link> </router-link>
</li> </li>
<li class="Navbar__Links__Item"> <li class="Navbar__Links__Item">

View File

@ -5,9 +5,9 @@ module.exports = {
generate: { generate: {
routeParams: { routeParams: {
'/users/:id': [{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}], '/users/:id': [{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}],
'/posts/:slug': [{slug: 'welcome'}, {slug: 'foo'}, {slug: 'bar'}], '/posts/:slug': [{slug: 'foo'}, {slug: 'bar'}],
'/posts/:slug/comments': [{slug: 'welcome'}, {slug: 'foo'}, {slug: 'bar'}], '/posts/:slug/comments': [{slug: 'foo'}, {slug: 'bar'}],
'/posts/:slug/:name': [{slug: 'welcome', name: 'a'}, {slug: 'foo', name: 'b'}, {slug: 'bar', name: 'a'}], '/posts/:slug/:name': [{slug: 'foo', name: 'b'}, {slug: 'bar', name: 'a'}],
'/projects/:slug': [{slug: 'toto'}, {slug: 'titi'}, {slug: 'tutu'}] '/projects/:slug': [{slug: 'toto'}, {slug: 'titi'}, {slug: 'tutu'}]
} }
} }

View File

@ -1,19 +0,0 @@
<template>
<div class="container">
<h1>Basic route with Alias</h1>
<router-link to="/nuxt" class="Navbar__Links__Item__Link" v-if="$route.path === '/author'">
This route is also available on /nuxt
</router-link>
<router-link to="/author" class="Navbar__Links__Item__Link" v-else>
This route is also available on /author
</router-link>
</div>
</template>
<style scoped>
.container
{
text-align: center;
padding-bottom: 30px;
}
</style>

View File

@ -0,0 +1,5 @@
<template>
<div class="container">
<h1>About</h1>
</div>
</template>

View File

@ -0,0 +1,5 @@
<template>
<div class="container">
<h1>Team</h1>
</div>
</template>