File tree 4 files changed +85
-4
lines changed
@vuepress/plugin-nprogress
4 files changed +85
-4
lines changed Original file line number Diff line number Diff line change
1
+ $nprogressColor ?= $accentColor
2
+
1
3
#nprogress
2
4
pointer-events none
3
5
.bar
4
- background $accentColor
6
+ background $nprogressColor
5
7
position fixed
6
8
z-index 1031
7
9
top 0
14
16
right 0px
15
17
width 100px
16
18
height 100%
17
- box-shadow 0 0 10px $accentColor , 0 0 5px $accentColor
19
+ box-shadow 0 0 10px $nprogressColor , 0 0 5px $nprogressColor
18
20
opacity 1.0
19
21
transform rotate (3deg ) translate (0px , - 4px )
20
22
.spinner
28
30
height 18px
29
31
box-sizing border-box
30
32
border solid 2px transparent
31
- border-top-color $accentColor
32
- border-left-color $accentColor
33
+ border-top-color $nprogressColor
34
+ border-left-color $nprogressColor
33
35
border-radius 50%
34
36
animation nprogress-spinner 400ms linear infinite
35
37
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ function getGuideSidebar (groupA, groupB) {
120
120
const officalPlugins = fs
121
121
. readdirSync ( path . resolve ( __dirname , '../plugin/official' ) )
122
122
. map ( filename => 'official/' + filename . slice ( 0 , - 3 ) )
123
+ . sort ( )
123
124
124
125
function getPluginSidebar ( pluginTitle , pluginIntro , officialPluginTitle ) {
125
126
return [
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : nprogress
3
+ metaTitle : Nprogress Plugin | VuePress
4
+ ---
5
+
6
+ # [ @vuepress/plugin-nprogress ] ( https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/plugin-nprogress )
7
+
8
+ > Nprogress plugin
9
+
10
+ ## Install
11
+
12
+ ``` bash
13
+ yarn add -D @vuepress/plugin-nprogress
14
+ # OR npm install -D @vuepress/plugin-nprogress
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ ``` javascript
20
+ module .exports = {
21
+ plugins: [' @vuepress/nprogress' ]
22
+ }
23
+ ```
24
+
25
+ ## Custom color
26
+
27
+ Set ` $nprogressColor ` in your __ site__ or __ theme__ ` palette.styl ` file to change the color of the progress bar (default is ` $accentColor ` ).
28
+
29
+ ``` stylus
30
+ // .vuepress/styles/palette.styl
31
+ // or
32
+ // .vuepress/theme/styles/palette.styl
33
+
34
+ $nprogressColor = red
35
+ ```
36
+
37
+ ** Also see:**
38
+
39
+ - [ Config Reference > Styling] ( ../../config/#styling )
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : nprogress
3
+ metaTitle : Nprogress 插件 | VuePress
4
+ ---
5
+
6
+ # [ @vuepress/plugin-nprogress ] ( https://github.com/vuejs/vuepress/tree/master/packages/%40vuepress/plugin-nprogress )
7
+
8
+ > Nprogress plugin
9
+
10
+ ## 安装
11
+
12
+ ``` bash
13
+ yarn add -D @vuepress/plugin-nprogress
14
+ # 或者 npm install -D @vuepress/plugin-nprogress
15
+ ```
16
+
17
+ ## 使用
18
+
19
+ ``` javascript
20
+ module .exports = {
21
+ plugins: [' @vuepress/nprogress' ]
22
+ }
23
+ ```
24
+
25
+ ## 自定义颜色
26
+
27
+ 在你的 __ site__ 或 __ theme__ 的 ` palette.styl ` 文件中设置 ` $nprogressColor ` 来改变进度条的颜色(默认使用 ` $accentColor ` )。
28
+
29
+ ``` stylus
30
+ // .vuepress/styles/palette.styl
31
+ // 或者
32
+ // .vuepress/theme/styles/palette.styl
33
+
34
+ $nprogressColor = red
35
+ ```
36
+
37
+ ** 参考:**
38
+
39
+ - [ 配置 > Styling] ( ../../config/#styling )
You can’t perform that action at this time.
0 commit comments