@@ -7,6 +7,7 @@ import NavBar from './components/NavBar.vue';
7
7
import SideBar from ' ./components/SideBar.vue' ;
8
8
import Page from ' ./components/Page.vue' ;
9
9
import HomeFooter from ' ./components/HomeFooter.vue' ;
10
+ import DevuiFooter from ' ./components/DevuiFooter.vue' ;
10
11
import { CONTRIBUTORS_MAP } from ' ./components/PageContributorConfig' ;
11
12
import PageContributor from ' ./components/PageContributor.vue' ;
12
13
import { Button } from ' @devui/button' ;
@@ -73,6 +74,13 @@ const pageClasses = computed(() => {
73
74
},
74
75
];
75
76
});
77
+ const homeContainerClass = computed (() => {
78
+ return [
79
+ {
80
+ ' home-page-bg' : enableHome .value ,
81
+ },
82
+ ];
83
+ });
76
84
const initLanguageConfig = () => {
77
85
// layout组件加载,初始化国际化语言.
78
86
const result = location .pathname .match (/ [a-zA-Z ] * -[A-Z ] * / );
@@ -135,73 +143,76 @@ const contributors = computed(() => {
135
143
</script >
136
144
137
145
<template >
138
- <div class =" theme" :class =" pageClasses" >
139
- <NavBar v-if =" showNavbar" @toggle =" toggleSidebar" >
140
- <template #search >
141
- <slot name =" navbar-search" > </slot >
142
- </template >
143
- </NavBar >
144
-
145
- <SideBar :open =" openSideBar" >
146
- <template #sidebar-top >
147
- <slot name =" sidebar-top" />
148
- <AlgoliaSearchBox v-if =" theme.algolia" :options =" theme.algolia" :multilang =" isMultiLang" :key =" site.lang" />
149
- </template >
150
- <template #sidebar-bottom >
151
- <slot name =" sidebar-bottom" />
152
- </template >
153
- </SideBar >
154
- <!-- TODO: make this button accessible -->
155
- <div class =" sidebar-mask" @click =" toggleSidebar(false)" />
156
-
157
- <Content v-if =" isCustomLayout" />
158
-
159
- <Home v-else-if =" enableHome" >
160
- <template #hero >
161
- <slot name =" home-hero" />
162
- </template >
163
- <template #features >
164
- <slot name =" home-features" />
165
- </template >
166
- <template #footer >
167
- <slot name =" home-footer" />
168
- </template >
169
- </Home >
170
-
171
- <Page v-else >
172
- <template #top >
173
- <slot name =" page-top-ads" >
174
- <div id =" ads-container" v-if =" theme.carbonAds && theme.carbonAds.carbon" >
175
- <CarbonAds :key =" 'carbon' + page.relativePath" :code =" theme.carbonAds.carbon" :placement =" theme.carbonAds.placement" />
176
- </div >
177
- </slot >
178
- <slot name =" page-top" />
179
- </template >
180
- <template #bottom >
181
- <slot name =" page-bottom" />
182
- <slot name =" page-bottom-ads" >
183
- <BuySellAds
184
- v-if =" theme.carbonAds && theme.carbonAds.custom"
185
- :key =" 'custom' + page.relativePath"
186
- :code =" theme.carbonAds.custom"
187
- :placement =" theme.carbonAds.placement"
188
- />
189
- </slot >
190
- </template >
191
- </Page >
192
- </div >
193
-
194
- <div class =" container-contributors" v-if =" enableHome" >
195
- <div class =" contributors-inner" >
196
- <h2 >✨贡献者✨</h2 >
197
- <PageContributor v-if =" contributors && contributors.length > 0" :contributors =" contributors" :spacing =" 20" :avatarSize =" 48" />
198
- <a href =" /contributing/" ><Button class =" btn-become-contributor" variant =" solid" color =" primary" >成为贡献者</Button ></a >
146
+ <div :class =" homeContainerClass" >
147
+ <div class =" content-container" >
148
+ <div class =" theme" :class =" pageClasses" >
149
+ <NavBar v-if =" showNavbar" @toggle =" toggleSidebar" >
150
+ <template #search >
151
+ <slot name =" navbar-search" > </slot >
152
+ </template >
153
+ </NavBar >
154
+
155
+ <SideBar :open =" openSideBar" >
156
+ <template #sidebar-top >
157
+ <slot name =" sidebar-top" />
158
+ <AlgoliaSearchBox v-if =" theme.algolia" :options =" theme.algolia" :multilang =" isMultiLang" :key =" site.lang" />
159
+ </template >
160
+ <template #sidebar-bottom >
161
+ <slot name =" sidebar-bottom" />
162
+ </template >
163
+ </SideBar >
164
+ <!-- TODO: make this button accessible -->
165
+ <div class =" sidebar-mask" @click =" toggleSidebar(false)" />
166
+
167
+ <Content v-if =" isCustomLayout" />
168
+
169
+ <Home v-else-if =" enableHome" >
170
+ <template #hero >
171
+ <slot name =" home-hero" />
172
+ </template >
173
+ <template #features >
174
+ <slot name =" home-features" />
175
+ </template >
176
+ <template #footer >
177
+ <slot name =" home-footer" />
178
+ </template >
179
+ </Home >
180
+
181
+ <Page v-else >
182
+ <template #top >
183
+ <slot name =" page-top-ads" >
184
+ <div id =" ads-container" v-if =" theme.carbonAds && theme.carbonAds.carbon" >
185
+ <CarbonAds :key =" 'carbon' + page.relativePath" :code =" theme.carbonAds.carbon" :placement =" theme.carbonAds.placement" />
186
+ </div >
187
+ </slot >
188
+ <slot name =" page-top" />
189
+ </template >
190
+ <template #bottom >
191
+ <slot name =" page-bottom" />
192
+ <slot name =" page-bottom-ads" >
193
+ <BuySellAds
194
+ v-if =" theme.carbonAds && theme.carbonAds.custom"
195
+ :key =" 'custom' + page.relativePath"
196
+ :code =" theme.carbonAds.custom"
197
+ :placement =" theme.carbonAds.placement"
198
+ />
199
+ </slot >
200
+ </template >
201
+ </Page >
202
+ </div >
203
+
204
+ <div class =" container-contributors" v-if =" enableHome" >
205
+ <div class =" contributors-inner" >
206
+ <h2 >✨贡献者✨</h2 >
207
+ <PageContributor v-if =" contributors && contributors.length > 0" :contributors =" contributors" :spacing =" 20" :avatarSize =" 48" />
208
+ <a href =" /contributing/" ><Button class =" btn-become-contributor" variant =" solid" color =" primary" >成为贡献者</Button ></a >
209
+ </div >
210
+ </div >
199
211
</div >
200
- </div >
201
-
202
- <HomeFooter />
203
212
204
- <Debug v-if =" false" />
213
+ <DevuiFooter class =" footer" v-if =" enableHome" />
214
+ <Debug v-if =" false" />
215
+ </div >
205
216
</template >
206
217
207
218
<style lang="scss">
@@ -238,15 +249,17 @@ const contributors = computed(() => {
238
249
// iPad/PC
239
250
.container-contributors {
240
251
padding : 2rem 0 ;
241
- background : var ( --devui-global-bg , #f3f6f8 ) ;
252
+ margin-bottom : 40 px ;
242
253
243
254
.contributors-inner {
244
- max-width : 564 px ;
255
+ max-width : 1200 px ;
245
256
margin : 0 auto ;
257
+ padding : 20px ;
246
258
display : flex ;
247
259
justify-content : center ;
248
260
align-items : center ;
249
261
flex-direction : column ;
262
+ box-shadow : 0 8px 32px rgba (150 , 180 , 255 , 0.16 );
250
263
251
264
h2 {
252
265
margin-top : 1rem ;
@@ -270,14 +283,28 @@ const contributors = computed(() => {
270
283
271
284
.page-contributor {
272
285
padding : 0 20px ;
273
-
274
- & > a :nth-child (8 n ) > span {
275
- margin : 0 !important ;
276
- }
277
286
}
278
287
}
279
288
}
280
289
290
+ .home-page-bg {
291
+ background-image : url (' ../../assets/banner-bg.png' );
292
+ background-repeat : no-repeat ;
293
+ background-size : 100% 50% ;
294
+ margin-top : 50px ;
295
+ background-color : var (--devui-global-bg-normal );
296
+ }
297
+
298
+ body [ui-theme = ' galaxy-theme' ] {
299
+ .home-page-bg {
300
+ background-image : url (' ../../assets/banner-bg-dark.png' );
301
+ }
302
+ }
303
+
304
+ .content-container {
305
+ min-height : calc (100vh - 214px );
306
+ }
307
+
281
308
// iPhone 6/7/8 Plus(414) Nexus 5X/6/6P(412)
282
309
@media (max-width : 420px ) {
283
310
.container-contributors .contributors-inner {
@@ -336,4 +363,8 @@ const contributors = computed(() => {
336
363
}
337
364
}
338
365
}
366
+
367
+ .footer {
368
+ max-width : 1200px !important ;
369
+ }
339
370
</style >
0 commit comments