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 11<template >
22 <div class =" intro-container" >
33 <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 >
49 <router-link
510 class =" button button-large button-basic"
611 v-if =" data.actionText && data.actionLink"
@@ -47,6 +52,22 @@ export default {
4752 ? link
4853 : ` https://github.com/${ link} ` ;
4954 },
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+ },
5071 },
5172};
5273 </script >
@@ -66,12 +87,22 @@ export default {
6687 width auto
6788
6889 > p
69- margin 0 0 40 px
90+ margin 0
7091 color $c-basic-light
7192
7293 @media (max-width $mq-mobile)
7394 line-height 1.28
7495
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+
75106 .button
76107 white-space nowrap
77108
@@ -88,7 +119,7 @@ export default {
88119 .feat-list
89120 list-style none
90121 display flex
91- margin-top 60 px
122+ margin-top 50 px
92123 padding 0
93124
94125 @media (max-width $mq-mobile)
Original file line number Diff line number Diff line change 157157 #logo
158158 position absolute
159159 z-index 21
160- top 100 px
160+ top 90 px
161161 left $s-home-divide-ratio
162162 display inline-block
163163 margin-left 216px + $s-home-middle-gap
181181 + h1
182182 position absolute
183183 z-index 21
184- top 280 px
184+ top 260 px
185185 left $s-home-divide-ratio
186186 margin-left 164px + $s-home-middle-gap
187187 color $c-basic
207207 .intro-container
208208 position absolute
209209 z-index 1
210- top 346 px
210+ top 316 px
211211 left $s-home-divide-ratio
212212 margin-left $s-home-middle-gap
213213 transition all 0.3s
You can’t perform that action at this time.
0 commit comments