File tree Expand file tree Collapse file tree 7 files changed +424
-220
lines changed Expand file tree Collapse file tree 7 files changed +424
-220
lines changed Original file line number Diff line number Diff line change
1
+ <template >
2
+ <span
3
+ class =" badge scope"
4
+ :class =" scope"
5
+ >
6
+ <slot >{{ scope }}</slot >
7
+ </span >
8
+ </template >
9
+
10
+ <script setup>
11
+ defineProps ({
12
+ scope: {
13
+ type: String ,
14
+ required: true
15
+ }
16
+ })
17
+ </script >
18
+
19
+ <style scoped>
20
+ .badge.scope {
21
+ vertical-align : middle ;
22
+ text-transform : capitalize ;
23
+ }
24
+ .badge.android {
25
+ background-color : var (--c-badge-tip );
26
+ }
27
+ .badge.desktop {
28
+ background-color : var (--usc-scope );
29
+ }
30
+ </style >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <span class =" since" >{{ text }} <b >{{ version }}</b ></span >
3
+ </template >
4
+
5
+ <script >
6
+ export default {
7
+ props: {
8
+ text: {
9
+ type: String ,
10
+ required: false ,
11
+ default: ' '
12
+ },
13
+ version: {
14
+ type: String ,
15
+ required: true
16
+ }
17
+ }
18
+ }
19
+ </script >
20
+
21
+ <style scoped>
22
+ .since {
23
+ display : inline-block ;
24
+ font-size : 13px ;
25
+ height : 18px ;
26
+ line-height : 18px ;
27
+ border-radius : 3px ;
28
+ padding : 0 4px ;
29
+ color : var (--c-bg );
30
+ background-color : var (--usc-since );
31
+ }
32
+ </style >
Original file line number Diff line number Diff line change 1
1
import { defineUserConfig , defaultTheme } from 'vuepress'
2
+ import { getDirname , path } from '@vuepress/utils'
3
+ import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
2
4
import { prismjsPlugin } from '@vuepress/plugin-prismjs'
3
5
import { sidebarConfig } from './configs/sidebar'
4
6
import { navbarConfig } from './configs/navbar'
5
7
import Prism from 'prismjs' ;
6
8
import definePrismOwnLang from '../../../editors/prismjs/own-language.js'
9
+
7
10
definePrismOwnLang ( Prism )
11
+ const __dirname = getDirname ( import . meta. url )
8
12
9
13
export default defineUserConfig ( {
10
14
locales : {
@@ -44,5 +48,8 @@ export default defineUserConfig({
44
48
prismjsPlugin ( {
45
49
preloadLanguages : [ 'own' , 'json' ]
46
50
} ) ,
51
+ registerComponentsPlugin ( {
52
+ componentsDir : path . resolve ( __dirname , './components' ) ,
53
+ } )
47
54
] ,
48
55
} )
Original file line number Diff line number Diff line change 3
3
--c-brand-light : #ff9562 ;
4
4
--c-badge-danger : #f63f3f ;
5
5
--c-badge-warning : #d0af01 ;
6
+
7
+ --usc-since : var (--c-badge-warning );
8
+ --usc-scope : var (--c-brand );
6
9
}
7
10
html .dark {
8
11
--c-brand : #e1792d ;
Original file line number Diff line number Diff line change 11
11
"author" : " aNNiMON" ,
12
12
"license" : " MIT" ,
13
13
"devDependencies" : {
14
+ "@vuepress/client" : " 2.0.0-rc.0" ,
15
+ "@vuepress/plugin-prismjs" : " 2.0.0-rc.0" ,
16
+ "@vuepress/plugin-register-components" : " 2.0.0-rc.0" ,
17
+ "@vuepress/utils" : " 2.0.0-rc.0" ,
14
18
"prismjs" : " ^1.29.0" ,
15
- "@vuepress/client" : " 2.0.0-beta.68" ,
16
- "@vuepress/plugin-prismjs" : " 2.0.0-beta.68" ,
17
19
"vue" : " ^3.3.8" ,
18
- "vuepress" : " 2.0.0-beta.68 "
20
+ "vuepress" : " 2.0.0-rc.0 "
19
21
}
20
22
}
You can’t perform that action at this time.
0 commit comments