@varlet/cli 1.27.8-alpha.1651665460392 → 1.27.9
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/base/varlet.config.js +2 -0
- package/lib/commands/compile.js +4 -0
- package/lib/commands/create.js +1 -1
- package/lib/compiler/compileSiteEntry.d.ts +3 -0
- package/lib/compiler/compileSiteEntry.js +86 -9
- package/lib/shared/constant.d.ts +4 -2
- package/lib/shared/constant.js +5 -3
- package/package.json +6 -5
- package/site/components/button/Button.vue +1 -1
- package/site/index.html +8 -0
- package/site/mobile/App.vue +32 -7
- package/site/mobile/components/AppHome.vue +17 -13
- package/site/{components → mobile/components}/app-bar/AppBar.vue +0 -0
- package/site/{components → mobile/components}/app-bar/appBar.less +0 -0
- package/site/{components → mobile/components}/app-bar/index.ts +0 -0
- package/site/{components → mobile/components}/app-bar/props.ts +0 -0
- package/site/mobile/components/styles/common.less +64 -0
- package/site/mobile/components/styles/elevation.less +126 -0
- package/site/mobile/components/styles/var.less +27 -0
- package/site/mobile/main.ts +1 -1
- package/site/pc/App.vue +14 -376
- package/site/pc/Layout.vue +397 -0
- package/site/pc/components/AnimationBox.vue +45 -0
- package/site/pc/components/AppHeader.vue +95 -35
- package/site/pc/components/AppSidebar.vue +2 -2
- package/site/pc/components/LogoAnimation.vue +119 -0
- package/site/pc/floating.ts +9 -0
- package/site/pc/pages/index/index.less +194 -0
- package/site/pc/pages/index/index.vue +125 -0
- package/site/pc/pages/index/locale/en-US.ts +5 -0
- package/site/pc/pages/index/locale/zh-CN.ts +5 -0
- package/varlet.default.config.js +16 -3
|
@@ -28,7 +28,7 @@ import config from '@config'
|
|
|
28
28
|
import { MenuTypes } from '../../utils'
|
|
29
29
|
import { reactive, ref, defineComponent } from 'vue'
|
|
30
30
|
import type { PropType } from 'vue'
|
|
31
|
-
import type { Menu } from '../
|
|
31
|
+
import type { Menu } from '../Layout.vue'
|
|
32
32
|
import { get } from 'lodash-es'
|
|
33
33
|
|
|
34
34
|
export default defineComponent({
|
|
@@ -74,7 +74,7 @@ export default defineComponent({
|
|
|
74
74
|
top: 60px;
|
|
75
75
|
bottom: 0;
|
|
76
76
|
left: 0;
|
|
77
|
-
z-index:
|
|
77
|
+
z-index: 6;
|
|
78
78
|
overflow-y: scroll;
|
|
79
79
|
box-shadow: 0 8px 12px var(--site-config-color-shadow);
|
|
80
80
|
background: var(--site-config-color-bar);
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import config from '@config'
|
|
3
|
+
import { get } from 'lodash-es'
|
|
4
|
+
import { computed, defineComponent, onMounted, onBeforeUnmount, ref, watch, nextTick } from 'vue'
|
|
5
|
+
import { animationBoxData, animationEl, animationElClientRect } from '../floating'
|
|
6
|
+
import type { Ref, StyleValue } from 'vue'
|
|
7
|
+
import { useRouter } from 'vue-router'
|
|
8
|
+
|
|
9
|
+
export default defineComponent({
|
|
10
|
+
name: 'LogoAnimation',
|
|
11
|
+
setup() {
|
|
12
|
+
const logo: Ref<string> = get(config, 'logo')
|
|
13
|
+
const proxyRect: Ref<DOMRect | undefined> = ref<DOMRect>()
|
|
14
|
+
const floatingState: Ref<boolean> = ref<boolean>(false)
|
|
15
|
+
|
|
16
|
+
watch(animationElClientRect, async (newClientRect) => {
|
|
17
|
+
if (newClientRect) {
|
|
18
|
+
proxyRect.value = newClientRect
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const styles: Ref<StyleValue | undefined> = computed(() => ({
|
|
23
|
+
width: `${proxyRect.value?.width}px`,
|
|
24
|
+
height: `${proxyRect.value?.height}px`,
|
|
25
|
+
top: `${proxyRect.value?.top}px`,
|
|
26
|
+
left: `${proxyRect.value?.left}px`,
|
|
27
|
+
}))
|
|
28
|
+
|
|
29
|
+
const router = useRouter()
|
|
30
|
+
router.beforeEach(async (to: any, from: any) => {
|
|
31
|
+
if (!floatingState.value && from.path !== '/') {
|
|
32
|
+
floatingState.value = true
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
onMounted(() => {
|
|
37
|
+
window.addEventListener('resize', resetPosition, false)
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
onBeforeUnmount(() => {
|
|
41
|
+
resetTimer && clearTimeout(resetTimer)
|
|
42
|
+
window.removeEventListener('resize', resetPosition)
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
const land = () => {
|
|
46
|
+
floatingState.value = false
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
let resetTimer: number
|
|
50
|
+
|
|
51
|
+
const resetPosition = async () => {
|
|
52
|
+
if (floatingState.value) {
|
|
53
|
+
floatingState.value = false
|
|
54
|
+
await nextTick()
|
|
55
|
+
}
|
|
56
|
+
clearTimeout(resetTimer)
|
|
57
|
+
const newBRect = animationEl.value?.getBoundingClientRect()
|
|
58
|
+
if (newBRect) {
|
|
59
|
+
resetTimer = window.setTimeout(() => {
|
|
60
|
+
proxyRect.value = newBRect
|
|
61
|
+
}, 200)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
logo,
|
|
67
|
+
animationBoxData,
|
|
68
|
+
styles,
|
|
69
|
+
animationEl,
|
|
70
|
+
floatingState,
|
|
71
|
+
land,
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
})
|
|
75
|
+
</script>
|
|
76
|
+
|
|
77
|
+
<template>
|
|
78
|
+
<Teleport :to="animationEl || 'body'">
|
|
79
|
+
<img
|
|
80
|
+
v-show="!floatingState"
|
|
81
|
+
v-bind="animationBoxData.attrs"
|
|
82
|
+
:style="styles"
|
|
83
|
+
:src="logo"
|
|
84
|
+
alt="logo"
|
|
85
|
+
v-if="logo && animationEl"
|
|
86
|
+
class="varlet-cli-logo-animation"
|
|
87
|
+
:class="{ 'varlet-cli-logo-position': !animationEl }"
|
|
88
|
+
/>
|
|
89
|
+
</Teleport>
|
|
90
|
+
<div v-show="floatingState">
|
|
91
|
+
<img
|
|
92
|
+
@transitionend="land"
|
|
93
|
+
v-bind="animationBoxData.attrs"
|
|
94
|
+
:style="styles"
|
|
95
|
+
:src="logo"
|
|
96
|
+
alt="logo"
|
|
97
|
+
v-if="logo && animationEl"
|
|
98
|
+
class="varlet-cli-logo-animation varlet-cli-logo-position varlet-cli-logo-transition"
|
|
99
|
+
/>
|
|
100
|
+
</div>
|
|
101
|
+
</template>
|
|
102
|
+
|
|
103
|
+
<style lang="less">
|
|
104
|
+
.varlet-cli-logo-transition {
|
|
105
|
+
transition: 0.5s all ease-in-out;
|
|
106
|
+
width: 100%;
|
|
107
|
+
height: 100%;
|
|
108
|
+
display: block;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.varlet-cli-logo-animation {
|
|
112
|
+
z-index: 10;
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.varlet-cli-logo-position {
|
|
117
|
+
position: fixed;
|
|
118
|
+
}
|
|
119
|
+
</style>
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
.home-page {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100vw;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
min-width: 1200px;
|
|
7
|
+
background: var(--site-config-color-home-page-background);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@keyframes fade-in {
|
|
14
|
+
0% {
|
|
15
|
+
opacity: 0;
|
|
16
|
+
transform: translateX(-100%);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
to {
|
|
21
|
+
opacity: 1;
|
|
22
|
+
transform: translateX(0%);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes slash-1 {
|
|
27
|
+
from {
|
|
28
|
+
transform: rotate(90deg);
|
|
29
|
+
;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
to {
|
|
33
|
+
transform: rotate(10deg);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@keyframes slash-2 {
|
|
38
|
+
from {
|
|
39
|
+
transform: rotate(90deg);
|
|
40
|
+
;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
to {
|
|
44
|
+
transform: rotate(20deg);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes slash-3 {
|
|
49
|
+
from {
|
|
50
|
+
transform: rotate(90deg);
|
|
51
|
+
;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
to {
|
|
55
|
+
transform: rotate(30deg);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes slash-4 {
|
|
60
|
+
from {
|
|
61
|
+
transform: rotate(90deg);
|
|
62
|
+
;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
to {
|
|
66
|
+
transform: rotate(40deg);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@keyframes slash-5 {
|
|
71
|
+
from {
|
|
72
|
+
transform: rotate(90deg);
|
|
73
|
+
;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
to {
|
|
77
|
+
transform: rotate(50deg);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.slash-box {
|
|
82
|
+
position: absolute;
|
|
83
|
+
width: 30px;
|
|
84
|
+
bottom: -70%;
|
|
85
|
+
top: -130%;
|
|
86
|
+
right: 52%;
|
|
87
|
+
transform-origin: bottom right;
|
|
88
|
+
transition: box-shadow 0.5s;
|
|
89
|
+
box-shadow: -20px 0 20px var(--site-config-color-home-page-slash);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.box-1 {
|
|
93
|
+
animation: slash-1 .75s forwards;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.box-2 {
|
|
97
|
+
animation: slash-2 .75s forwards;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.box-3 {
|
|
101
|
+
animation: slash-3 .75s forwards;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.box-4 {
|
|
105
|
+
animation: slash-4 .75s forwards;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.box-5 {
|
|
109
|
+
animation: slash-5 .75s forwards;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.profile-container {
|
|
113
|
+
height: 100vh;
|
|
114
|
+
padding-left: 10vw;
|
|
115
|
+
display: flex;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
align-items: center;
|
|
118
|
+
|
|
119
|
+
.container-box {
|
|
120
|
+
width: 35vw;
|
|
121
|
+
min-width: 500px;
|
|
122
|
+
|
|
123
|
+
.description-container {
|
|
124
|
+
display: flex;
|
|
125
|
+
margin-bottom: 35px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.logo-container {
|
|
129
|
+
margin-right: 20px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.button-group {
|
|
133
|
+
display: flex;
|
|
134
|
+
margin-top: 25px;
|
|
135
|
+
align-items: center;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.block-button-content {
|
|
139
|
+
display: flex;
|
|
140
|
+
align-items: center;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.common-button {
|
|
144
|
+
height: 52px;
|
|
145
|
+
font-size: 18px;
|
|
146
|
+
transition: all .25s;
|
|
147
|
+
animation: fade-in .75s forwards;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.extra-button {
|
|
151
|
+
flex-shrink: 0;
|
|
152
|
+
background-color: var(--site-config-color-home-page-extra-button-background);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.github-button {
|
|
156
|
+
background-color: var(--site-config-color-home-page-github-button-background);
|
|
157
|
+
color: #fff;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.primary-button {
|
|
161
|
+
background-color: var(--site-config-color-home-page-primary-button-background);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.margin-left {
|
|
165
|
+
margin-left: 10px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.base-title {
|
|
169
|
+
font-size: 84px;
|
|
170
|
+
line-height: 72px;
|
|
171
|
+
font-weight: 500;
|
|
172
|
+
margin-top: 8px;
|
|
173
|
+
animation: fade-in .75s forwards;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.base-description {
|
|
177
|
+
font-size: 16px;
|
|
178
|
+
line-height: 28px;
|
|
179
|
+
padding-left: 4px;
|
|
180
|
+
font-weight: 500;
|
|
181
|
+
margin-bottom: 45px;
|
|
182
|
+
letter-spacing: 1px;
|
|
183
|
+
animation: fade-in .75s forwards;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.logo {
|
|
187
|
+
width: 90px;
|
|
188
|
+
height: 90px;
|
|
189
|
+
flex-shrink: 0;
|
|
190
|
+
margin-right: 25px;
|
|
191
|
+
z-index: 2;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import AnimationBox from '../../components/AnimationBox.vue'
|
|
3
|
+
import config from '@config'
|
|
4
|
+
import VarSiteButton from '../../../components/button'
|
|
5
|
+
import VarSiteIcon from '../../../components/icon'
|
|
6
|
+
import { get } from 'lodash-es'
|
|
7
|
+
import { ref, watch } from 'vue'
|
|
8
|
+
import { useRoute, useRouter } from 'vue-router'
|
|
9
|
+
import { getBrowserThemes, setThemes } from '../../../utils'
|
|
10
|
+
import { getPCLocationInfo, watchThemes } from '@varlet/cli/site/utils'
|
|
11
|
+
import en_US from './locale/en-US'
|
|
12
|
+
import zh_CN from './locale/zh-CN'
|
|
13
|
+
import type { Ref } from 'vue'
|
|
14
|
+
|
|
15
|
+
const route = useRoute()
|
|
16
|
+
const router = useRouter()
|
|
17
|
+
const packs = {
|
|
18
|
+
'zh-CN': zh_CN,
|
|
19
|
+
'en-US': en_US
|
|
20
|
+
} as any
|
|
21
|
+
|
|
22
|
+
const github = get(config, 'pc.header.github')
|
|
23
|
+
const themesKey = get(config, 'themesKey')
|
|
24
|
+
const currentThemes = ref(getBrowserThemes(themesKey))
|
|
25
|
+
const darkMode: Ref<boolean> = ref(get(config, 'pc.header.darkMode'))
|
|
26
|
+
const title: Ref<string> = ref(get(config, 'title'))
|
|
27
|
+
const languages: Ref<Record<string, string>> = ref(get(config, 'pc.header.i18n'))
|
|
28
|
+
const pack: Ref<Record<string, string>> = ref({})
|
|
29
|
+
|
|
30
|
+
const goGithub = () => {
|
|
31
|
+
window.open(github)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const getStar = () => {
|
|
35
|
+
const { language: lang } = getPCLocationInfo()
|
|
36
|
+
router.push(`/${lang}/home`)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const getThemesMessage = () => ({ action: 'themesChange', from: 'pc', data: currentThemes.value })
|
|
40
|
+
|
|
41
|
+
const setCurrentThemes = (themes: 'themes' | 'darkThemes') => {
|
|
42
|
+
currentThemes.value = themes
|
|
43
|
+
setThemes(config, currentThemes.value)
|
|
44
|
+
window.localStorage.setItem(themesKey, currentThemes.value)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const toggleTheme = () => {
|
|
48
|
+
setCurrentThemes(currentThemes.value === 'darkThemes' ? 'themes' : 'darkThemes')
|
|
49
|
+
window.postMessage(getThemesMessage(), '*')
|
|
50
|
+
; (document.getElementById('mobile') as HTMLIFrameElement)?.contentWindow!.postMessage(getThemesMessage(), '*')
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const setLocale = () => {
|
|
54
|
+
const { language: lang } = getPCLocationInfo()
|
|
55
|
+
if (!lang) return
|
|
56
|
+
|
|
57
|
+
pack.value = packs[lang]
|
|
58
|
+
document.title = get(config, 'pc.title')[lang] as string
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const toggleLanguages = () => {
|
|
62
|
+
const { language: lang } = getPCLocationInfo()
|
|
63
|
+
|
|
64
|
+
const { menuName } = getPCLocationInfo()
|
|
65
|
+
const replaceStr = `/${lang === 'zh-CN' ? 'en-US' : 'zh-CN'}/${menuName}`
|
|
66
|
+
router.replace(replaceStr)
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
setThemes(config, currentThemes.value)
|
|
70
|
+
|
|
71
|
+
window.postMessage(getThemesMessage(), '*')
|
|
72
|
+
|
|
73
|
+
watchThemes((themes, from) => {
|
|
74
|
+
from === 'mobile' && setCurrentThemes(themes)
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
watch(() => route.path, setLocale, { immediate: true })
|
|
78
|
+
</script>
|
|
79
|
+
|
|
80
|
+
<template>
|
|
81
|
+
<div class="home-page">
|
|
82
|
+
<div class="slash-box box-1"></div>
|
|
83
|
+
<div class="slash-box box-2"></div>
|
|
84
|
+
<div class="slash-box box-3"></div>
|
|
85
|
+
<div class="slash-box box-4"></div>
|
|
86
|
+
<div class="slash-box box-5"></div>
|
|
87
|
+
<div class="profile-container">
|
|
88
|
+
<div class="container-box">
|
|
89
|
+
<div class="description-container">
|
|
90
|
+
<animation-box class="logo" />
|
|
91
|
+
<div class="base-title">{{ title }}</div>
|
|
92
|
+
</div>
|
|
93
|
+
<div class="base-description">{{ pack.description }}</div>
|
|
94
|
+
|
|
95
|
+
<div class="button-group">
|
|
96
|
+
<var-site-button class="common-button github-button" block @click="goGithub">
|
|
97
|
+
<div class="block-button-content">
|
|
98
|
+
<span>GITHUB</span>
|
|
99
|
+
<var-site-icon style="margin-left: 10px;" name="github" size="24px" />
|
|
100
|
+
</div>
|
|
101
|
+
</var-site-button>
|
|
102
|
+
<var-site-button class="common-button extra-button margin-left" text v-if="darkMode" @click="toggleTheme">
|
|
103
|
+
<var-site-icon size="24px" :name="currentThemes === 'themes' ? 'white-balance-sunny' : 'weather-night'" />
|
|
104
|
+
</var-site-button>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<div class="button-group">
|
|
108
|
+
<var-site-button type="primary" class="common-button primary-button" block @click="getStar">
|
|
109
|
+
<div class="block-button-content">
|
|
110
|
+
<span>{{ pack.started }}</span>
|
|
111
|
+
<var-site-icon style="margin-left: 10px; transform: rotate(-90deg)" name="arrow-down" size="24px" />
|
|
112
|
+
</div>
|
|
113
|
+
</var-site-button>
|
|
114
|
+
<var-site-button class="common-button extra-button margin-left" text v-if="languages" @click="toggleLanguages">
|
|
115
|
+
<var-site-icon name="translate" size="24px" />
|
|
116
|
+
</var-site-button>
|
|
117
|
+
</div>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
</template>
|
|
122
|
+
|
|
123
|
+
<style lang="less" scoped>
|
|
124
|
+
@import "./index";
|
|
125
|
+
</style>
|
|
@@ -0,0 +1,5 @@
|
|
|
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
|
@@ -19,7 +19,7 @@ module.exports = {
|
|
|
19
19
|
useMobile: false,
|
|
20
20
|
pc: {
|
|
21
21
|
menu: [],
|
|
22
|
-
redirect: '/
|
|
22
|
+
redirect: '/index',
|
|
23
23
|
title: {
|
|
24
24
|
'zh-CN': '面向 Vue3 的 Material 风格移动端组件库',
|
|
25
25
|
'en-US': 'Material design mobile components built for Vue3',
|
|
@@ -29,6 +29,7 @@ module.exports = {
|
|
|
29
29
|
'zh-CN': '中文',
|
|
30
30
|
'en-US': 'English',
|
|
31
31
|
},
|
|
32
|
+
versions: null,
|
|
32
33
|
github: 'https://github.com/varletjs/varlet',
|
|
33
34
|
playground: 'https://varlet-ui-playground.vercel.app',
|
|
34
35
|
darkMode: true,
|
|
@@ -59,6 +60,11 @@ module.exports = {
|
|
|
59
60
|
},
|
|
60
61
|
themes: {
|
|
61
62
|
'color-body': '#fff',
|
|
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',
|
|
62
68
|
'color-bar': '#fff',
|
|
63
69
|
'color-sub-bar': '#f5f5f5',
|
|
64
70
|
'color-text': '#555',
|
|
@@ -70,7 +76,7 @@ module.exports = {
|
|
|
70
76
|
'color-link': '#00c48f',
|
|
71
77
|
'color-type': '#00c48f',
|
|
72
78
|
'color-progress': '#1d92e9',
|
|
73
|
-
'color-progress-track': '
|
|
79
|
+
'color-progress-track': 'transparent',
|
|
74
80
|
'color-side-bar': '#3a7afe',
|
|
75
81
|
'color-side-bar-active-background': '#3a7afe1a',
|
|
76
82
|
'color-app-bar': '#3a7afe',
|
|
@@ -78,6 +84,7 @@ module.exports = {
|
|
|
78
84
|
'color-mobile-cell-hover': '#3a7afe',
|
|
79
85
|
'color-pc-language-active': '#3a7afe',
|
|
80
86
|
'color-pc-language-active-background': '#edf5ff',
|
|
87
|
+
'color-pc-github-active-background': '#212121',
|
|
81
88
|
'color-mobile-language-active': '#3a7afe',
|
|
82
89
|
'color-mobile-language-active-background': '#edf5ff',
|
|
83
90
|
'color-hl-background': '#fafafa',
|
|
@@ -95,6 +102,11 @@ module.exports = {
|
|
|
95
102
|
},
|
|
96
103
|
darkThemes: {
|
|
97
104
|
'color-body': '#121212',
|
|
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',
|
|
98
110
|
'color-bar': '#1e1e1e',
|
|
99
111
|
'color-sub-bar': '#272727',
|
|
100
112
|
'color-text': '#fff',
|
|
@@ -106,7 +118,7 @@ module.exports = {
|
|
|
106
118
|
'color-link': '#A8FFC4',
|
|
107
119
|
'color-type': '#A8FFC4',
|
|
108
120
|
'color-progress': '#5580f8',
|
|
109
|
-
'color-progress-track': '
|
|
121
|
+
'color-progress-track': 'transparent',
|
|
110
122
|
'color-side-bar': '#4a7afe',
|
|
111
123
|
'color-side-bar-active-background': '#4a7afe1a',
|
|
112
124
|
'color-app-bar': '#272727',
|
|
@@ -114,6 +126,7 @@ module.exports = {
|
|
|
114
126
|
'color-mobile-cell-hover': '#4a7afe',
|
|
115
127
|
'color-pc-language-active': '#4a7afe',
|
|
116
128
|
'color-pc-language-active-background': '#4a7afe20',
|
|
129
|
+
'color-pc-github-active-background': '#303030',
|
|
117
130
|
'color-mobile-language-active': '#4a7afe',
|
|
118
131
|
'color-mobile-language-active-background': '#4a7afe20',
|
|
119
132
|
'color-hl-background': '#272727',
|