File tree Expand file tree Collapse file tree 2 files changed +36
-5
lines changed Expand file tree Collapse file tree 2 files changed +36
-5
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" intro-container" >
3
3
<p v-text =" $description || 'Welcome to your VuePress site'" ></p >
4
+ <p v-if =" languages.length" >
5
+ <template v-for =" (lang , $index ) in languages " >
6
+ <router-link :to =" lang.path" v-text =" lang.name" ></router-link ><span v-if =" $index < languages.length - 1" > | </span >
7
+ </template >
8
+ </p >
4
9
<router-link
5
10
class =" button button-large button-basic"
6
11
v-if =" data.actionText && data.actionLink"
@@ -47,6 +52,22 @@ export default {
47
52
? link
48
53
: ` https://github.com/${ link} ` ;
49
54
},
55
+ languages () {
56
+ const locales = this .$themeConfig .$locales || this .$site .locales || [];
57
+ const localeMapping = {
58
+ ' /' : ' EN' ,
59
+ ' en-US' : ' EN' ,
60
+ ' /zh/' : ' 中文' ,
61
+ ' zh-CN' : ' 中文' ,
62
+ };
63
+
64
+ return Object .keys (locales).map ((path ) => {
65
+ return {
66
+ name: localeMapping[locales[path].lang ] || localeMapping[path] || path .replace (/ \/ / g ).toUpperCase (),
67
+ path: path,
68
+ };
69
+ });
70
+ },
50
71
},
51
72
};
52
73
</script >
@@ -66,12 +87,22 @@ export default {
66
87
width auto
67
88
68
89
> p
69
- margin 0 0 40 px
90
+ margin 0
70
91
color $c-basic-light
71
92
72
93
@media (max-width $mq-mobile)
73
94
line-height 1.28
74
95
96
+ + p
97
+ margin-bottom 40px
98
+
99
+ a :not (.router-link-exact-active )
100
+ font-weight 400
101
+ color #a a a
102
+
103
+ span
104
+ color #d d d
105
+
75
106
.button
76
107
white-space nowrap
77
108
@@ -88,7 +119,7 @@ export default {
88
119
.feat-list
89
120
list-style none
90
121
display flex
91
- margin-top 60 px
122
+ margin-top 50 px
92
123
padding 0
93
124
94
125
@media (max-width $mq-mobile)
Original file line number Diff line number Diff line change 157
157
#logo
158
158
position absolute
159
159
z-index 21
160
- top 100 px
160
+ top 90 px
161
161
left $s-home-divide-ratio
162
162
display inline-block
163
163
margin-left 216px + $s-home-middle-gap
181
181
+ h1
182
182
position absolute
183
183
z-index 21
184
- top 280 px
184
+ top 260 px
185
185
left $s-home-divide-ratio
186
186
margin-left 164px + $s-home-middle-gap
187
187
color $c-basic
207
207
.intro-container
208
208
position absolute
209
209
z-index 1
210
- top 346 px
210
+ top 316 px
211
211
left $s-home-divide-ratio
212
212
margin-left $s-home-middle-gap
213
213
transition all 0.3s
You can’t perform that action at this time.
0 commit comments