mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
clean example
This commit is contained in:
parent
0df05fd633
commit
1916bb6d2f
@ -2,19 +2,17 @@
|
||||
<nuxt-container>
|
||||
<nav class="Navbar clearfix">
|
||||
<h1 class="Navbar__Title">
|
||||
<router-link to="/" class="Navbar__Links__Item__Link">
|
||||
Nuxt Custom Routes
|
||||
</router-link>
|
||||
Nuxt Custom Routes
|
||||
</h1>
|
||||
<ul class="Navbar__Links">
|
||||
<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
|
||||
</router-link>
|
||||
</li>
|
||||
<li class="Navbar__Links__Item">
|
||||
<router-link to="/projects" class="Navbar__Links__Item__Link">
|
||||
Dynamic route
|
||||
Dynamic routes
|
||||
</router-link>
|
||||
</li>
|
||||
<li class="Navbar__Links__Item">
|
||||
|
@ -5,9 +5,9 @@ module.exports = {
|
||||
generate: {
|
||||
routeParams: {
|
||||
'/users/:id': [{id: 1}, {id: 2}, {id: 3}, {id: 4}, {id: 5}],
|
||||
'/posts/:slug': [{slug: 'welcome'}, {slug: 'foo'}, {slug: 'bar'}],
|
||||
'/posts/:slug/comments': [{slug: 'welcome'}, {slug: 'foo'}, {slug: 'bar'}],
|
||||
'/posts/:slug/:name': [{slug: 'welcome', name: 'a'}, {slug: 'foo', name: 'b'}, {slug: 'bar', name: 'a'}],
|
||||
'/posts/:slug': [{slug: 'foo'}, {slug: 'bar'}],
|
||||
'/posts/:slug/comments': [{slug: 'foo'}, {slug: 'bar'}],
|
||||
'/posts/:slug/:name': [{slug: 'foo', name: 'b'}, {slug: 'bar', name: 'a'}],
|
||||
'/projects/:slug': [{slug: 'toto'}, {slug: 'titi'}, {slug: 'tutu'}]
|
||||
}
|
||||
}
|
||||
|
@ -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>
|
5
examples/custom-routes/pages/team/about.vue
Normal file
5
examples/custom-routes/pages/team/about.vue
Normal file
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<h1>About</h1>
|
||||
</div>
|
||||
</template>
|
5
examples/custom-routes/pages/team/index.vue
Normal file
5
examples/custom-routes/pages/team/index.vue
Normal file
@ -0,0 +1,5 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<h1>Team</h1>
|
||||
</div>
|
||||
</template>
|
Loading…
Reference in New Issue
Block a user