-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($plugin-nprogress): allow nprogress use different color and add …
…docs (#1366)
- Loading branch information
Showing
4 changed files
with
85 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: nprogress | ||
metaTitle: Nprogress Plugin | VuePress | ||
--- | ||
|
||
# [@vuepress/plugin-nprogress](https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/plugin-nprogress) | ||
|
||
> Nprogress plugin | ||
## Install | ||
|
||
```bash | ||
yarn add -D @vuepress/plugin-nprogress | ||
# OR npm install -D @vuepress/plugin-nprogress | ||
``` | ||
|
||
## Usage | ||
|
||
```javascript | ||
module.exports = { | ||
plugins: ['@vuepress/nprogress'] | ||
} | ||
``` | ||
|
||
## Custom color | ||
|
||
Set `$nprogressColor` in your __site__ or __theme__ `palette.styl` file to change the color of the progress bar (default is `$accentColor`). | ||
|
||
```stylus | ||
// .vuepress/styles/palette.styl | ||
// or | ||
// .vuepress/theme/styles/palette.styl | ||
$nprogressColor = red | ||
``` | ||
|
||
**Also see:** | ||
|
||
- [Config Reference > Styling](../../config/#styling) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: nprogress | ||
metaTitle: Nprogress 插件 | VuePress | ||
--- | ||
|
||
# [@vuepress/plugin-nprogress](https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/plugin-nprogress) | ||
|
||
> Nprogress plugin | ||
## 安装 | ||
|
||
```bash | ||
yarn add -D @vuepress/plugin-nprogress | ||
# 或者 npm install -D @vuepress/plugin-nprogress | ||
``` | ||
|
||
## 使用 | ||
|
||
```javascript | ||
module.exports = { | ||
plugins: ['@vuepress/nprogress'] | ||
} | ||
``` | ||
|
||
## 自定义颜色 | ||
|
||
在你的 __site__ 或 __theme__ 的 `palette.styl` 文件中设置 `$nprogressColor` 来改变进度条的颜色(默认使用 `$accentColor`)。 | ||
|
||
```stylus | ||
// .vuepress/styles/palette.styl | ||
// 或者 | ||
// .vuepress/theme/styles/palette.styl | ||
$nprogressColor = red | ||
``` | ||
|
||
**参考:** | ||
|
||
- [配置 > Styling](../../config/#styling) |