Skip to content

Commit c8331bd

Browse files
author
weilei
committed
fix(docs): 更新样式
1 parent ca45221 commit c8331bd

File tree

1 file changed

+41
-43
lines changed

1 file changed

+41
-43
lines changed

docs/src/.vuepress/components/Hero.vue

Lines changed: 41 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,18 @@
134134
</script>
135135

136136
<style lang="scss" scoped>
137-
@import '~element-ui/packages/theme-chalk/src/common/var';
138-
139137
#share-banner {
140138
width: 100vw;
141139
min-height: 30px;
142-
background-color: $--color-primary;
143-
color: $--color-text-regular;
140+
background-color: #409eff;
141+
color: #606266;
144142
text-align: center;
145143
font-size: 14px;
146144
position: fixed;
147145
top: 58px;
148146
left: 50%;
149147
transform: translateX(-50%);
150-
border-bottom: 1px solid $--border-color-light;
148+
border-bottom: 1px solid #e4e7ed;
151149
z-index: 9;
152150
line-height: 30px;
153151
color: #eee;
@@ -178,8 +176,8 @@
178176
179177
.container {
180178
margin: 0 auto;
181-
padding: 0 $--size-base * 2;
182-
margin-bottom: $--size-base;
179+
padding: 0 16px;
180+
margin-bottom: 8px;
183181
}
184182
185183
.main {
@@ -188,12 +186,12 @@
188186
}
189187
190188
.heading {
191-
margin-bottom: $--size-base;
189+
margin-bottom: 8px;
192190
193191
.name {
194192
font-size: 32px;
195193
font-weight: 700;
196-
background: linear-gradient(120deg, $--color-primary, #ff2485, #ff951a, #5614f0);
194+
background: linear-gradient(120deg, #409eff, #ff2485, #ff951a, #5614f0);
197195
-webkit-background-clip: text;
198196
-webkit-text-fill-color: transparent;
199197
line-height: 1.2;
@@ -203,24 +201,24 @@
203201
display: block;
204202
font-size: 24px;
205203
font-weight: 400;
206-
color: $--color-text-primary;
204+
color: #303133;
207205
line-height: 1.2;
208206
}
209207
}
210208
211209
.tagline {
212210
font-size: 18px;
213-
color: $--color-text-regular;
214-
margin: $--size-base 0;
211+
color: #606266;
212+
margin: 8px 0;
215213
line-height: 1.6;
216214
}
217215
218216
.actions {
219217
display: flex;
220-
gap: $--size-base;
218+
gap: 8px;
221219
222220
.action {
223-
margin-right: $--size-base;
221+
margin-right: 8px;
224222
}
225223
}
226224
@@ -240,8 +238,8 @@
240238
height: 310px;
241239
background: radial-gradient(
242240
circle,
243-
rgba($--color-primary, 0.1) 0%,
244-
rgba($--color-primary, 0) 60%
241+
rgba(64, 158, 255, 0.1) 0%,
242+
rgba(64, 158, 255, 0) 60%
245243
);
246244
border-radius: 50%;
247245
}
@@ -263,24 +261,24 @@
263261
.items {
264262
display: flex;
265263
flex-direction: column;
266-
gap: $--size-base * 2;
267-
padding: 0 $--size-base;
264+
gap: 16px;
265+
padding: 0 8px;
268266
}
269267
270268
.feature-box {
271-
background-color: $--background-color-base;
272-
border-radius: $--border-radius-base;
273-
padding: $--size-base $--size-base * 2;
269+
background-color: #f5f7fa;
270+
border-radius: 4px;
271+
padding: 8px 16px;
274272
transition: all 0.3s ease;
275273
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
276274
width: 100%;
277275
max-width: 600px;
278276
margin: 0 auto;
279277
280-
@media (max-width: $--sm) {
278+
@media (max-width: 768px) {
281279
max-width: 100%;
282280
margin: 0;
283-
padding: $--size-base;
281+
padding: 8px;
284282
285283
&:hover {
286284
transform: none;
@@ -296,47 +294,47 @@
296294
.title {
297295
font-size: 20px;
298296
font-weight: 600;
299-
color: $--color-text-primary;
300-
margin-bottom: $--size-base * 1.5;
297+
color: #303133;
298+
margin-bottom: 12px;
301299
display: flex;
302300
align-items: center;
303-
gap: $--size-base;
301+
gap: 8px;
304302
305-
@media (max-width: $--sm) {
303+
@media (max-width: 768px) {
306304
font-size: 16px;
307-
margin-bottom: $--size-base;
305+
margin-bottom: 8px;
308306
}
309307
310308
&::before {
311309
content: '';
312310
width: 4px;
313311
height: 20px;
314-
background: $--color-primary;
312+
background: #409eff;
315313
border-radius: 2px;
316314
317-
@media (max-width: $--sm) {
315+
@media (max-width: 768px) {
318316
height: 16px;
319317
}
320318
}
321319
}
322320
323321
.details {
324322
font-size: 14px;
325-
color: $--color-text-regular;
323+
color: #606266;
326324
line-height: 1.8;
327-
padding-left: $--size-base + 4px;
325+
padding-left: 12px;
328326
329-
@media (max-width: $--sm) {
327+
@media (max-width: 768px) {
330328
font-size: 13px;
331329
line-height: 1.6;
332-
padding-left: $--size-base + 2px;
330+
padding-left: 10px;
333331
}
334332
}
335333
}
336334
}
337335
338336
.acknowledgment {
339-
padding-top: $--size-base * 2;
337+
padding-top: 16px;
340338
text-align: center;
341339
342340
.container {
@@ -345,29 +343,29 @@
345343
346344
.thanks-text {
347345
font-size: 14px;
348-
color: $--color-text-regular;
346+
color: #606266;
349347
line-height: 1.6;
350348
351349
.repo-link {
352-
color: $--color-primary;
350+
color: #409eff;
353351
text-decoration: none;
354352
font-weight: 600;
355353
transition: color 0.3s ease;
356354
357355
&:hover {
358-
color: $--color-primary-light-3;
356+
color: #79bbff;
359357
}
360358
}
361359
}
362360
363-
@media (max-width: $--sm) {
364-
padding: $--size-base * 2 0;
361+
@media (max-width: 768px) {
362+
padding: 16px 0;
365363
}
366364
}
367365
}
368366
369367
// 响应式设计
370-
@media (max-width: $--sm) {
368+
@media (max-width: 768px) {
371369
.custom-home {
372370
.custom-hero {
373371
&.has-image {
@@ -392,7 +390,7 @@
392390
}
393391
394392
.image {
395-
margin-top: $--size-base * 4;
393+
margin-top: 32px;
396394
}
397395
}
398396
@@ -404,7 +402,7 @@
404402
}
405403
}
406404
407-
@media (min-width: $--sm) and (max-width: $--lg) {
405+
@media (min-width: 768px) and (max-width: 992px) {
408406
.custom-features {
409407
.items {
410408
grid-template-columns: repeat(2, 1fr);

0 commit comments

Comments
 (0)