@varlet/cli 1.27.20-alpha.1660211980346 → 1.27.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators/config/default/base/package.json +1 -1
- package/generators/config/i18n/base/package.json +1 -1
- package/lib/commands/commitLint.js +1 -1
- package/lib/config/vite.config.js +1 -1
- package/package.json +9 -9
- package/site/pc/pages/index/index.less +199 -92
- package/site/pc/pages/index/index.vue +63 -38
- package/site/pc/pages/index/locale/en-US.ts +5 -1
- package/site/pc/pages/index/locale/zh-CN.ts +5 -1
- package/varlet.default.config.js +10 -83
|
@@ -11,7 +11,7 @@ function isVersion(message) {
|
|
|
11
11
|
}
|
|
12
12
|
function commitLint(gitParams) {
|
|
13
13
|
var message = require('fs').readFileSync(gitParams, 'utf-8').trim();
|
|
14
|
-
var COMMIT_MESSAGE_RE = /^(revert|fix|feat|docs|perf|test|types|style|build|chore|release|refactor)(\(.+\))
|
|
14
|
+
var COMMIT_MESSAGE_RE = /^(revert|fix|feat|docs|perf|test|types|style|build|chore|release|refactor)(\(.+\))?: (.|\n)+/;
|
|
15
15
|
if (!isVersion(message) && !COMMIT_MESSAGE_RE.test(message)) {
|
|
16
16
|
logger_1.default.error("Commit message invalid");
|
|
17
17
|
logger_1.default.warning("The rules for commit messages are as follows\n\nExample:\n\nfeat: add a new feature\nfeat(ui/button): add a new feature in the ui/button scope\n\nfix: fix a bug\nfix(ui/button): fix a bug in the ui/button scope\n\ndocs: fix an error in the documentation\ndocs(ui/button): fix a documentation error in the ui/button scope\n\nAllowed types:\n- fix\n- feat\n- docs\n- perf\n- test\n- types\n- style\n- build\n- chore\n- release\n- refactor\n- revert\n\nCommit message reference: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y\n\u53C2\u8003\u962E\u4E00\u5CF0Commit message\u7F16\u5199\u6307\u5357: https://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html");
|
|
@@ -64,7 +64,7 @@ function getBuildConfig(varletConfig) {
|
|
|
64
64
|
var devConfig = getDevConfig(varletConfig);
|
|
65
65
|
return __assign(__assign({}, devConfig), { base: './', build: {
|
|
66
66
|
outDir: constant_1.SITE_OUTPUT_PATH,
|
|
67
|
-
|
|
67
|
+
brotliSize: false,
|
|
68
68
|
emptyOutDir: true,
|
|
69
69
|
cssTarget: 'chrome61',
|
|
70
70
|
rollupOptions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@varlet/cli",
|
|
3
|
-
"version": "1.27.20
|
|
3
|
+
"version": "1.27.20",
|
|
4
4
|
"description": "cli of varlet",
|
|
5
5
|
"bin": {
|
|
6
6
|
"varlet-cli": "./lib/index.js"
|
|
@@ -28,16 +28,16 @@
|
|
|
28
28
|
"url": "https://github.com/varletjs/varlet/issues"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@varlet/icons": "1.27.20
|
|
32
|
-
"@varlet/shared": "1.27.20
|
|
33
|
-
"@varlet/markdown-vite-plugin": "1.27.20
|
|
34
|
-
"@varlet/touch-emulator": "1.27.20
|
|
31
|
+
"@varlet/icons": "1.27.20",
|
|
32
|
+
"@varlet/shared": "1.27.20",
|
|
33
|
+
"@varlet/markdown-vite-plugin": "1.27.20",
|
|
34
|
+
"@varlet/touch-emulator": "1.27.20",
|
|
35
35
|
"@babel/core": "^7.14.8",
|
|
36
36
|
"@babel/helper-plugin-utils": "^7.14.5",
|
|
37
37
|
"@babel/preset-env": "^7.14.8",
|
|
38
38
|
"@babel/preset-typescript": "^7.14.5",
|
|
39
|
-
"@vitejs/plugin-vue": "
|
|
40
|
-
"@vitejs/plugin-vue-jsx": "
|
|
39
|
+
"@vitejs/plugin-vue": "2.2.0",
|
|
40
|
+
"@vitejs/plugin-vue-jsx": "1.3.5",
|
|
41
41
|
"@vue/babel-plugin-jsx": "1.1.1",
|
|
42
42
|
"@vue/compiler-sfc": "3.2.25",
|
|
43
43
|
"@vue/runtime-core": "3.2.25",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"slash": "^3.0.0",
|
|
61
61
|
"ts-jest": "^26.5.1",
|
|
62
62
|
"typescript": "^4.4.4",
|
|
63
|
-
"vite": "
|
|
63
|
+
"vite": "2.9.14",
|
|
64
64
|
"vite-plugin-html": "^2.1.0",
|
|
65
65
|
"vue": "3.2.25",
|
|
66
66
|
"vue-jest": "^5.0.0-alpha.8"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@types/semver": "^7.3.9"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@varlet/touch-emulator": "1.27.20
|
|
79
|
+
"@varlet/touch-emulator": "1.27.20",
|
|
80
80
|
"@vue/test-utils": "^2.0.0-rc.6",
|
|
81
81
|
"clipboard": "^2.0.6",
|
|
82
82
|
"live-server": "^1.2.1",
|
|
@@ -1,124 +1,231 @@
|
|
|
1
|
-
|
|
1
|
+
.home-page {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100vw;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
min-width: 1200px;
|
|
7
|
+
min-height: 460px;
|
|
8
|
+
background: var(--site-config-color-home-page-background);
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@keyframes fade-in {
|
|
2
15
|
0% {
|
|
3
|
-
|
|
16
|
+
opacity: 0;
|
|
17
|
+
transform: translateX(-100%);
|
|
4
18
|
}
|
|
5
19
|
|
|
6
|
-
|
|
7
|
-
|
|
20
|
+
|
|
21
|
+
to {
|
|
22
|
+
opacity: 1;
|
|
23
|
+
transform: translateX(0%);
|
|
8
24
|
}
|
|
25
|
+
}
|
|
9
26
|
|
|
10
|
-
|
|
11
|
-
|
|
27
|
+
@keyframes slash-1 {
|
|
28
|
+
from {
|
|
29
|
+
transform: rotate(90deg);
|
|
30
|
+
;
|
|
12
31
|
}
|
|
13
32
|
|
|
14
|
-
|
|
15
|
-
transform:
|
|
33
|
+
to {
|
|
34
|
+
transform: rotate(10deg);
|
|
16
35
|
}
|
|
36
|
+
}
|
|
17
37
|
|
|
18
|
-
|
|
19
|
-
|
|
38
|
+
@keyframes slash-2 {
|
|
39
|
+
from {
|
|
40
|
+
transform: rotate(90deg);
|
|
41
|
+
;
|
|
20
42
|
}
|
|
21
43
|
|
|
22
|
-
|
|
23
|
-
transform:
|
|
44
|
+
to {
|
|
45
|
+
transform: rotate(20deg);
|
|
24
46
|
}
|
|
25
47
|
}
|
|
26
48
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
min-height: 100vh;
|
|
32
|
-
box-sizing: border-box;
|
|
33
|
-
background: var(--site-config-color-index-page-background);
|
|
34
|
-
|
|
35
|
-
&__layout {
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
align-items: center;
|
|
39
|
-
padding: 100px;
|
|
40
|
-
max-width: 1200px;
|
|
49
|
+
@keyframes slash-3 {
|
|
50
|
+
from {
|
|
51
|
+
transform: rotate(90deg);
|
|
52
|
+
;
|
|
41
53
|
}
|
|
42
54
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
height: 100%;
|
|
46
|
-
flex-shrink: 0;
|
|
47
|
-
z-index: 2;
|
|
55
|
+
to {
|
|
56
|
+
transform: rotate(30deg);
|
|
48
57
|
}
|
|
58
|
+
}
|
|
49
59
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
width: 160px;
|
|
55
|
-
height: 160px;
|
|
60
|
+
@keyframes slash-4 {
|
|
61
|
+
from {
|
|
62
|
+
transform: rotate(90deg);
|
|
63
|
+
;
|
|
56
64
|
}
|
|
57
65
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
left: -40px;
|
|
61
|
-
top: -40px;
|
|
62
|
-
bottom: -40px;
|
|
63
|
-
right: -40px;
|
|
64
|
-
background: var(--site-config-color-index-page-logo-mask-background);
|
|
65
|
-
transition: background-color .2s;
|
|
66
|
-
filter: blur(45px);
|
|
67
|
-
border-radius: 50%;
|
|
68
|
-
animation: logo-wave 6s infinite linear;
|
|
66
|
+
to {
|
|
67
|
+
transform: rotate(40deg);
|
|
69
68
|
}
|
|
69
|
+
}
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
@keyframes slash-5 {
|
|
72
|
+
from {
|
|
73
|
+
transform: rotate(90deg);
|
|
74
|
+
;
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
font-size: 16px;
|
|
79
|
-
line-height: 28px;
|
|
80
|
-
letter-spacing: 1px;
|
|
81
|
-
margin-top: 30px;
|
|
82
|
-
text-align: center;
|
|
83
|
-
color: var(--site-config-color-index-page-second-text-color);
|
|
77
|
+
to {
|
|
78
|
+
transform: rotate(50deg);
|
|
84
79
|
}
|
|
80
|
+
}
|
|
85
81
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
82
|
+
.slash-box {
|
|
83
|
+
position: absolute;
|
|
84
|
+
width: 30px;
|
|
85
|
+
bottom: -70%;
|
|
86
|
+
top: -130%;
|
|
87
|
+
right: 52%;
|
|
88
|
+
transform-origin: bottom right;
|
|
89
|
+
transition: box-shadow 0.5s;
|
|
90
|
+
box-shadow: -20px 0 20px var(--site-config-color-home-page-slash);
|
|
91
|
+
}
|
|
91
92
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
transition: all .25s;
|
|
96
|
-
margin: 0 10px;
|
|
97
|
-
}
|
|
93
|
+
.box-1 {
|
|
94
|
+
animation: slash-1 .75s forwards;
|
|
95
|
+
}
|
|
98
96
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
97
|
+
.box-2 {
|
|
98
|
+
animation: slash-2 .75s forwards;
|
|
99
|
+
}
|
|
102
100
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
flex-wrap: wrap;
|
|
107
|
-
margin-top: 60px;
|
|
108
|
-
}
|
|
101
|
+
.box-3 {
|
|
102
|
+
animation: slash-3 .75s forwards;
|
|
103
|
+
}
|
|
109
104
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
padding: 20px;
|
|
114
|
-
border-radius: 4px;
|
|
115
|
-
background: var(--site-config-color-index-page-feature-background);
|
|
116
|
-
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
|
|
117
|
-
}
|
|
105
|
+
.box-4 {
|
|
106
|
+
animation: slash-4 .75s forwards;
|
|
107
|
+
}
|
|
118
108
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
font-size: 14px;
|
|
122
|
-
margin-top: 10px;
|
|
123
|
-
}
|
|
109
|
+
.box-5 {
|
|
110
|
+
animation: slash-5 .75s forwards;
|
|
124
111
|
}
|
|
112
|
+
|
|
113
|
+
.profile-container {
|
|
114
|
+
height: 100vh;
|
|
115
|
+
padding-left: 10vw;
|
|
116
|
+
display: flex;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
align-items: center;
|
|
119
|
+
|
|
120
|
+
.container-box {
|
|
121
|
+
width: 35vw;
|
|
122
|
+
min-width: 500px;
|
|
123
|
+
|
|
124
|
+
.logo-container {
|
|
125
|
+
margin-right: 20px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.button-group {
|
|
129
|
+
display: flex;
|
|
130
|
+
margin-top: 25px;
|
|
131
|
+
align-items: center;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.block-button-content {
|
|
135
|
+
display: flex;
|
|
136
|
+
align-items: center;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.common-button {
|
|
140
|
+
height: 52px;
|
|
141
|
+
font-size: 18px;
|
|
142
|
+
transition: all .25s;
|
|
143
|
+
animation: fade-in .75s forwards;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.extra-button {
|
|
147
|
+
flex-shrink: 0;
|
|
148
|
+
background-color: var(--site-config-color-home-page-extra-button-background);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.github-button {
|
|
152
|
+
background-color: var(--site-config-color-home-page-github-button-background);
|
|
153
|
+
color: #fff;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.primary-button {
|
|
157
|
+
background-color: var(--site-config-color-home-page-primary-button-background);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.margin-left {
|
|
161
|
+
margin-left: 10px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@media all and (max-width: 2560px) {
|
|
165
|
+
.description-container {
|
|
166
|
+
display: flex;
|
|
167
|
+
margin-bottom: 40px;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.base-title {
|
|
171
|
+
font-size: 110px;
|
|
172
|
+
line-height: 72px;
|
|
173
|
+
font-weight: 500;
|
|
174
|
+
margin-top: 21px;
|
|
175
|
+
animation: fade-in .75s forwards;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.base-description {
|
|
179
|
+
font-size: 20px;
|
|
180
|
+
line-height: 38px;
|
|
181
|
+
padding-left: 4px;
|
|
182
|
+
font-weight: 500;
|
|
183
|
+
margin-bottom: 43px;
|
|
184
|
+
letter-spacing: 1px;
|
|
185
|
+
animation: fade-in .75s forwards;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.logo-box {
|
|
189
|
+
width: 120px;
|
|
190
|
+
height: 120px;
|
|
191
|
+
flex-shrink: 0;
|
|
192
|
+
margin-right: 30px;
|
|
193
|
+
z-index: 2;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
@media all and (max-width: 1920px) {
|
|
198
|
+
|
|
199
|
+
.description-container {
|
|
200
|
+
display: flex;
|
|
201
|
+
margin-bottom: 35px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.base-title {
|
|
205
|
+
font-size: 84px;
|
|
206
|
+
line-height: 72px;
|
|
207
|
+
font-weight: 500;
|
|
208
|
+
margin-top: 8px;
|
|
209
|
+
animation: fade-in .75s forwards;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.base-description {
|
|
213
|
+
font-size: 16px;
|
|
214
|
+
line-height: 28px;
|
|
215
|
+
padding-left: 4px;
|
|
216
|
+
font-weight: 500;
|
|
217
|
+
margin-bottom: 45px;
|
|
218
|
+
letter-spacing: 1px;
|
|
219
|
+
animation: fade-in .75s forwards;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.logo-box {
|
|
223
|
+
width: 90px;
|
|
224
|
+
height: 90px;
|
|
225
|
+
flex-shrink: 0;
|
|
226
|
+
margin-right: 25px;
|
|
227
|
+
z-index: 2;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
@@ -4,14 +4,20 @@ import config from '@config'
|
|
|
4
4
|
import VarSiteButton from '../../../components/button'
|
|
5
5
|
import VarSiteIcon from '../../../components/icon'
|
|
6
6
|
import { get } from 'lodash-es'
|
|
7
|
-
import { ref, watch } from 'vue'
|
|
7
|
+
import { ref, watch, computed } from 'vue'
|
|
8
8
|
import { useRoute, useRouter } from 'vue-router'
|
|
9
9
|
import { getBrowserThemes, setThemes } from '../../../utils'
|
|
10
10
|
import { getPCLocationInfo, watchThemes } from '@varlet/cli/site/utils'
|
|
11
|
-
import
|
|
11
|
+
import en_US from './locale/en-US'
|
|
12
|
+
import zh_CN from './locale/zh-CN'
|
|
13
|
+
import type { Ref, ComputedRef } from 'vue'
|
|
12
14
|
|
|
13
15
|
const route = useRoute()
|
|
14
16
|
const router = useRouter()
|
|
17
|
+
const packs = {
|
|
18
|
+
'zh-CN': zh_CN,
|
|
19
|
+
'en-US': en_US,
|
|
20
|
+
} as any
|
|
15
21
|
|
|
16
22
|
const github = get(config, 'pc.header.github')
|
|
17
23
|
const themesKey = get(config, 'themesKey')
|
|
@@ -20,7 +26,19 @@ const darkMode: Ref<boolean> = ref(get(config, 'pc.header.darkMode'))
|
|
|
20
26
|
const title: Ref<string> = ref(get(config, 'title'))
|
|
21
27
|
const language: Ref<string> = ref(get(config, 'defaultLanguage'))
|
|
22
28
|
const languages: Ref<Record<string, string>> = ref(get(config, 'pc.header.i18n'))
|
|
23
|
-
const
|
|
29
|
+
const pack: Ref<Record<string, string>> = ref({})
|
|
30
|
+
|
|
31
|
+
const description: ComputedRef<string> = computed(() => {
|
|
32
|
+
const { indexPage = {} } = get(config, 'pc')
|
|
33
|
+
|
|
34
|
+
return indexPage?.description?.[language.value] || pack.value.description
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
const started: ComputedRef<string> = computed(() => {
|
|
38
|
+
const { indexPage = {} } = get(config, 'pc')
|
|
39
|
+
|
|
40
|
+
return indexPage?.started?.[language.value] || pack.value.started
|
|
41
|
+
})
|
|
24
42
|
|
|
25
43
|
const goGithub = () => {
|
|
26
44
|
window.open(github)
|
|
@@ -41,7 +59,7 @@ const setCurrentThemes = (themes: 'themes' | 'darkThemes') => {
|
|
|
41
59
|
const toggleTheme = () => {
|
|
42
60
|
setCurrentThemes(currentThemes.value === 'darkThemes' ? 'themes' : 'darkThemes')
|
|
43
61
|
window.postMessage(getThemesMessage(), '*')
|
|
44
|
-
|
|
62
|
+
; (document.getElementById('mobile') as HTMLIFrameElement)?.contentWindow!.postMessage(getThemesMessage(), '*')
|
|
45
63
|
}
|
|
46
64
|
|
|
47
65
|
const setLocale = () => {
|
|
@@ -49,6 +67,7 @@ const setLocale = () => {
|
|
|
49
67
|
if (!lang) return
|
|
50
68
|
|
|
51
69
|
language.value = lang
|
|
70
|
+
pack.value = packs[lang]
|
|
52
71
|
document.title = get(config, 'pc.title')[lang] as string
|
|
53
72
|
}
|
|
54
73
|
|
|
@@ -74,41 +93,47 @@ watch(() => route.path, setLocale, { immediate: true })
|
|
|
74
93
|
</script>
|
|
75
94
|
|
|
76
95
|
<template>
|
|
77
|
-
<div class="
|
|
78
|
-
<div class="
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<div class="
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
@click="
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
</
|
|
102
|
-
<var-site-button class="varlet-doc-index__link-button" type="primary" @click="getStar">
|
|
103
|
-
<span class="varlet-doc-index__link-button-text">{{ indexPage.started[language] }}</span>
|
|
104
|
-
<var-site-icon style="transform: rotate(-90deg)" name="arrow-down" size="24px" />
|
|
105
|
-
</var-site-button>
|
|
106
|
-
</div>
|
|
96
|
+
<div class="home-page">
|
|
97
|
+
<div class="slash-box box-1"></div>
|
|
98
|
+
<div class="slash-box box-2"></div>
|
|
99
|
+
<div class="slash-box box-3"></div>
|
|
100
|
+
<div class="slash-box box-4"></div>
|
|
101
|
+
<div class="slash-box box-5"></div>
|
|
102
|
+
<div class="profile-container">
|
|
103
|
+
<div class="container-box">
|
|
104
|
+
<div class="description-container">
|
|
105
|
+
<animation-box class="logo-box" />
|
|
106
|
+
<div class="base-title">{{ title }}</div>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="base-description">{{ description }}</div>
|
|
109
|
+
|
|
110
|
+
<div class="button-group">
|
|
111
|
+
<var-site-button class="common-button github-button" block @click="goGithub">
|
|
112
|
+
<div class="block-button-content">
|
|
113
|
+
<span>GITHUB</span>
|
|
114
|
+
<var-site-icon style="margin-left: 10px" name="github" size="24px" />
|
|
115
|
+
</div>
|
|
116
|
+
</var-site-button>
|
|
117
|
+
<var-site-button class="common-button extra-button margin-left" text v-if="darkMode" @click="toggleTheme">
|
|
118
|
+
<var-site-icon size="24px" :name="currentThemes === 'themes' ? 'white-balance-sunny' : 'weather-night'" />
|
|
119
|
+
</var-site-button>
|
|
120
|
+
</div>
|
|
107
121
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
122
|
+
<div class="button-group">
|
|
123
|
+
<var-site-button type="primary" class="common-button primary-button" block @click="getStar">
|
|
124
|
+
<div class="block-button-content">
|
|
125
|
+
<span>{{ started }}</span>
|
|
126
|
+
<var-site-icon style="margin-left: 10px; transform: rotate(-90deg)" name="arrow-down" size="24px" />
|
|
127
|
+
</div>
|
|
128
|
+
</var-site-button>
|
|
129
|
+
<var-site-button
|
|
130
|
+
class="common-button extra-button margin-left"
|
|
131
|
+
text
|
|
132
|
+
v-if="languages"
|
|
133
|
+
@click="toggleLanguages"
|
|
134
|
+
>
|
|
135
|
+
<var-site-icon name="translate" size="24px" />
|
|
136
|
+
</var-site-button>
|
|
112
137
|
</div>
|
|
113
138
|
</div>
|
|
114
139
|
</div>
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export default {
|
|
2
|
+
started: 'GET STARTED',
|
|
3
|
+
description: 'Varlet is a Material design mobile component library developed based on Vue3, developed and maintained by partners in the community. ' +
|
|
4
|
+
'Support Typescript, import on demand, dark mode, theme customization, internationalization, and provide VSCode plugin to ensure a good development experience',
|
|
5
|
+
}
|
package/varlet.default.config.js
CHANGED
|
@@ -20,81 +20,6 @@ module.exports = {
|
|
|
20
20
|
pc: {
|
|
21
21
|
menu: [],
|
|
22
22
|
redirect: '/index',
|
|
23
|
-
indexPage: {
|
|
24
|
-
description: {
|
|
25
|
-
'zh-CN':
|
|
26
|
-
'Varlet 是一个基于 Vue3 开发的 Material 风格移动端组件库,全面拥抱 Vue3 生态,由社区团队维护。支持 Typescript、按需引入、暗黑模式、主题定制、国际化,并提供 VSCode 插件保障良好的开发体验',
|
|
27
|
-
'en-US':
|
|
28
|
-
'Varlet is a Material design mobile component library developed based on Vue3, developed and maintained by partners in the community. Support Typescript, import on demand, dark mode, theme customization, internationalization, and provide VSCode plugin to ensure a good development experience',
|
|
29
|
-
},
|
|
30
|
-
started: {
|
|
31
|
-
'zh-CN': '起步',
|
|
32
|
-
'en-US': 'GET STARTED',
|
|
33
|
-
},
|
|
34
|
-
features: [
|
|
35
|
-
{
|
|
36
|
-
name: {
|
|
37
|
-
'zh-CN': '组件丰富',
|
|
38
|
-
'en-US': 'Rich components',
|
|
39
|
-
},
|
|
40
|
-
description: {
|
|
41
|
-
'zh-CN': '提供50个高质量通用组件',
|
|
42
|
-
'en-US': 'Provide 50 high quality general purpose components',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: {
|
|
47
|
-
'zh-CN': '按需引入',
|
|
48
|
-
'en-US': 'On-Demand',
|
|
49
|
-
},
|
|
50
|
-
description: {
|
|
51
|
-
'zh-CN': '每一个组件都可单独引入,并有着良好的 tree-shaking 优化',
|
|
52
|
-
'en-US': 'Each component can be imported separately and has good tree-shaking optimization',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: {
|
|
57
|
-
'zh-CN': '国人开发',
|
|
58
|
-
'en-US': 'Developed by Chinese',
|
|
59
|
-
},
|
|
60
|
-
description: {
|
|
61
|
-
'zh-CN': '由国人开发,完善的中英文文档和后勤保障',
|
|
62
|
-
'en-US': 'Complete Chinese and English documentation and logistics support',
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
name: {
|
|
67
|
-
'zh-CN': '国际化',
|
|
68
|
-
'en-US': 'Locale',
|
|
69
|
-
},
|
|
70
|
-
description: {
|
|
71
|
-
'zh-CN': '内置国际化 API,默认支持中英两国语言',
|
|
72
|
-
'en-US': 'Built-in i18n API, which supports both Chinese and English languages by default',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
name: {
|
|
77
|
-
'zh-CN': '开发工具支持',
|
|
78
|
-
'en-US': 'IDE Code Support',
|
|
79
|
-
},
|
|
80
|
-
description: {
|
|
81
|
-
'zh-CN': '支持 webstorm,vscode 组件属性高亮, 提供vscode插件为开发提升效率',
|
|
82
|
-
'en-US':
|
|
83
|
-
'Supports to highlight the component syntax for webstorm and vscode, and provides a separate helper plugin for vscode',
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: {
|
|
88
|
-
'zh-CN': 'Typescript + SSR',
|
|
89
|
-
'en-US': 'Typescript + SSR',
|
|
90
|
-
},
|
|
91
|
-
description: {
|
|
92
|
-
'zh-CN': '对 TypeScript 使用者十分友好,并且支持服务端渲染',
|
|
93
|
-
'en-US': 'Develop with TypeScript, and support SSR',
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
},
|
|
98
23
|
title: {
|
|
99
24
|
'zh-CN': '面向 Vue3 的 Material 风格移动端组件库',
|
|
100
25
|
'en-US': 'Material design mobile components built for Vue3',
|
|
@@ -135,10 +60,11 @@ module.exports = {
|
|
|
135
60
|
},
|
|
136
61
|
themes: {
|
|
137
62
|
'color-body': '#fff',
|
|
138
|
-
'color-
|
|
139
|
-
'color-
|
|
140
|
-
'color-
|
|
141
|
-
'color-
|
|
63
|
+
'color-home-page-background': '#fff',
|
|
64
|
+
'color-home-page-slash': '#ccc',
|
|
65
|
+
'color-home-page-primary-button-background': '#3a7afe',
|
|
66
|
+
'color-home-page-extra-button-background': '#f5f5f5',
|
|
67
|
+
'color-home-page-github-button-background': '#212121',
|
|
142
68
|
'color-bar': '#fff',
|
|
143
69
|
'color-sub-bar': '#f5f5f5',
|
|
144
70
|
'color-text': '#555',
|
|
@@ -176,10 +102,11 @@ module.exports = {
|
|
|
176
102
|
},
|
|
177
103
|
darkThemes: {
|
|
178
104
|
'color-body': '#121212',
|
|
179
|
-
'color-
|
|
180
|
-
'color-
|
|
181
|
-
'color-
|
|
182
|
-
'color-
|
|
105
|
+
'color-home-page-background': 'linear-gradient(to right, #1e1e1e, #272727)',
|
|
106
|
+
'color-home-page-slash': '#111',
|
|
107
|
+
'color-home-page-primary-button-background': '#4a7afe',
|
|
108
|
+
'color-home-page-extra-button-background': '#303030',
|
|
109
|
+
'color-home-page-github-button-background': '#303030',
|
|
183
110
|
'color-bar': '#1e1e1e',
|
|
184
111
|
'color-sub-bar': '#272727',
|
|
185
112
|
'color-text': '#fff',
|