diff --git a/docs/.vuepress/style.styl b/docs/.vuepress/style.styl index de6fb8800..54dd2b7c7 100644 --- a/docs/.vuepress/style.styl +++ b/docs/.vuepress/style.styl @@ -12,3 +12,36 @@ margin-left 15px img, span vertical-align middle + +.vueschool + background-color #e7ecf3 + padding 1em 1.25em + border-radius 2px + color #486491 + position relative + display flex + a + color #486491 !important + position relative + padding-left 36px + &:before + content '' + position absolute + display block + width 30px + height 30px + top calc(50% - 15px); + left -4px + border-radius 50% + background-color #73abfe + &:after + content '' + position absolute + display block + width 0 + height 0 + top calc(50% - 5px) + left 8px + border-top 5px solid transparent + border-bottom 5px solid transparent + border-left 8px solid #fff diff --git a/docs/README.md b/docs/README.md index 0fb596fdf..51a4932d7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -4,6 +4,8 @@ For TypeScript users, `vue-router@3.0+` requires `vue@2.5+`, and vice versa. ::: +
+ Vue Router is the official router for [Vue.js](http://vuejs.org). It deeply integrates with Vue.js core to make building Single Page Applications with Vue.js a breeze. Features include: - Nested route/view mapping diff --git a/docs/guide/README.md b/docs/guide/README.md index 00c537027..18c455010 100644 --- a/docs/guide/README.md +++ b/docs/guide/README.md @@ -6,6 +6,8 @@ We will be using [ES2015](https://github.com/lukehoban/es6features) in the code Also, all examples will be using the full version of Vue to make on-the-fly template compilation possible. See more details [here](https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only). ::: + + Creating a Single-page Application with Vue + Vue Router is dead simple. With Vue.js, we are already composing our application with components. When adding Vue Router to the mix, all we need to do is map our components to the routes and let Vue Router know where to render them. Here's a basic example: ## HTML diff --git a/docs/guide/advanced/lazy-loading.md b/docs/guide/advanced/lazy-loading.md index 7735a471b..803155b00 100644 --- a/docs/guide/advanced/lazy-loading.md +++ b/docs/guide/advanced/lazy-loading.md @@ -1,5 +1,7 @@ # Lazy Loading Routes + + When building apps with a bundler, the JavaScript bundle can become quite large, and thus affect the page load time. It would be more efficient if we can split each route's components into a separate chunk, and only load them when the route is visited. Combining Vue's [async component feature](https://vuejs.org/guide/components.html#Async-Components) and webpack's [code splitting feature](https://webpack.js.org/guides/code-splitting-async/), it's trivially easy to lazy-load route components. diff --git a/docs/guide/advanced/navigation-guards.md b/docs/guide/advanced/navigation-guards.md index 61d9bf13c..af4b58ddc 100644 --- a/docs/guide/advanced/navigation-guards.md +++ b/docs/guide/advanced/navigation-guards.md @@ -6,6 +6,8 @@ Remember that **params or query changes won't trigger enter/leave navigation gua ## Global Before Guards + + You can register global before guards using `router.beforeEach`: ```js diff --git a/docs/guide/advanced/scroll-behavior.md b/docs/guide/advanced/scroll-behavior.md index d58d797b2..485abc9f1 100644 --- a/docs/guide/advanced/scroll-behavior.md +++ b/docs/guide/advanced/scroll-behavior.md @@ -1,5 +1,7 @@ # Scroll Behavior + + When using client-side routing, we may want to scroll to top when navigating to a new route, or preserve the scrolling position of history entries just like real page reload does. `vue-router` allows you to achieve these and even better, allows you to completely customize the scroll behavior on route navigation. **Note: this feature only works if the browser supports `history.pushState`.** diff --git a/docs/guide/advanced/transitions.md b/docs/guide/advanced/transitions.md index 269d3cc23..a963da736 100644 --- a/docs/guide/advanced/transitions.md +++ b/docs/guide/advanced/transitions.md @@ -1,5 +1,7 @@ # Transitions + + Since the `