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 11import { defineUserConfig , defaultTheme } from 'vuepress'
2+ import { getDirname , path } from '@vuepress/utils'
3+ import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
24import { prismjsPlugin } from '@vuepress/plugin-prismjs'
35import { sidebarConfig } from './configs/sidebar'
46import { navbarConfig } from './configs/navbar'
57import Prism from 'prismjs' ;
68import definePrismOwnLang from '../../../editors/prismjs/own-language.js'
9+
710definePrismOwnLang ( Prism )
11+ const __dirname = getDirname ( import . meta. url )
812
913export default defineUserConfig ( {
1014 locales : {
@@ -44,5 +48,8 @@ export default defineUserConfig({
4448 prismjsPlugin ( {
4549 preloadLanguages : [ 'own' , 'json' ]
4650 } ) ,
51+ registerComponentsPlugin ( {
52+ componentsDir : path . resolve ( __dirname , './components' ) ,
53+ } )
4754 ] ,
4855} )
Original file line number Diff line number Diff line change 33 --c-brand-light : #ff9562 ;
44 --c-badge-danger : #f63f3f ;
55 --c-badge-warning : #d0af01 ;
6+
7+ --usc-since : var (--c-badge-warning );
8+ --usc-scope : var (--c-brand );
69}
710html .dark {
811 --c-brand : #e1792d ;
Original file line number Diff line number Diff line change 1111 "author" : " aNNiMON" ,
1212 "license" : " MIT" ,
1313 "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" ,
1418 "prismjs" : " ^1.29.0" ,
15- "@vuepress/client" : " 2.0.0-beta.68" ,
16- "@vuepress/plugin-prismjs" : " 2.0.0-beta.68" ,
1719 "vue" : " ^3.3.8" ,
18- "vuepress" : " 2.0.0-beta.68 "
20+ "vuepress" : " 2.0.0-rc.0 "
1921 }
2022}
You can’t perform that action at this time.
0 commit comments