11<template >
2- <div class =" home" :class = " recoShow?'reco-show': 'reco-hide' " >
2+ <div class =" home" >
33 <div class =" hero" >
4- <img
5- v-if =" data.isShowHeroImage !== false"
6- :style =" heroImageStyle"
7- :src =" data.heroImage ? $withBase(data.heroImage) : require('../images/icon_vuepress_reco.png')"
8- alt =" hero" >
9-
10- <h1 v-if =" data.isShowTitleInHome !== false" >{{ data.heroText || $title || '午后南杂' }}</h1 >
11-
12- <p class =" description" >{{ $description || 'Welcome to your vuePress-theme-reco site' }}</p >
13- <p class =" huawei" v-if =" $themeConfig.huawei === true" >
14- <i class =" iconfont reco-huawei" style =" color : #fc2d38 " ></i >
15-   ;  ;  ; 华为,为中华而为之!
16- </p >
17-
18- <p class =" action" v-if =" data.actionText && data.actionLink" >
19- <NavLink class =" action-button" :item =" actionLink" />
20- </p >
4+ <ModuleTransition delay =" 0.08" >
5+ <img
6+ v-if =" data.isShowHeroImage !== false && recoShowMoudle"
7+ :style =" heroImageStyle"
8+ :src =" data.heroImage ? $withBase(data.heroImage) : require('../images/icon_vuepress_reco.png')"
9+ alt =" hero" >
10+ </ModuleTransition >
11+ <ModuleTransition delay =" 0.16" >
12+ <h1 v-if =" data.isShowTitleInHome !== false && recoShowMoudle" >{{ data.heroText || $title || '午后南杂' }}</h1 >
13+ </ModuleTransition >
14+ <ModuleTransition delay =" 0.24" >
15+ <p v-if =" recoShowMoudle" class =" description" >{{ $description || 'Welcome to your vuePress-theme-reco site' }}</p >
16+ </ModuleTransition >
17+ <ModuleTransition delay =" 0.32" >
18+ <p class =" huawei" v-if =" $themeConfig.huawei === true && recoShowMoudle" >
19+ <i class =" iconfont reco-huawei" style =" color : #fc2d38 " ></i >
20+   ;  ;  ; 华为,为中华而为之!
21+ </p >
22+ </ModuleTransition >
23+ <ModuleTransition delay =" 0.4" >
24+ <p class =" action" v-if =" data.actionText && data.actionLink && recoShowMoudle" >
25+ <NavLink class =" action-button" :item =" actionLink" />
26+ </p >
27+ </ModuleTransition >
2128 </div >
2229
23- <div class =" features" v-if =" data.features && data.features.length" >
24- <div v-for =" (feature, index) in data.features" :key =" index" class =" feature" >
25- <h2 >{{ feature.title }}</h2 >
26- <p >{{ feature.details }}</p >
30+ <ModuleTransition delay =" 0.4" >
31+ <div class =" features" v-if =" data.features && data.features.length && recoShowMoudle" >
32+ <div v-for =" (feature, index) in data.features" :key =" index" class =" feature" >
33+ <h2 >{{ feature.title }}</h2 >
34+ <p >{{ feature.details }}</p >
35+ </div >
2736 </div >
28- </div >
29-
30- <Content class =" home-center" custom />
37+ </ModuleTransition >
38+ <ModuleTransition delay =" 0.48" >
39+ <Content class =" home-center" v-if =" recoShowMoudle" custom />
40+ </ModuleTransition >
3141 </div >
3242</template >
3343
3444<script >
3545import NavLink from ' @theme/components/NavLink.vue'
46+ import ModuleTransition from ' @theme/components/ModuleTransition.vue'
3647
3748export default {
38- components: { NavLink },
39- data () {
40- return {
41- recoShow: false
42- }
43- },
49+ components: { NavLink, ModuleTransition },
4450 computed: {
4551 data () {
4652 return this .$frontmatter
@@ -59,16 +65,12 @@ export default {
5965 margin: ' 6rem auto 1.5rem'
6066 }
6167 }
62- },
63- mounted () {
64- this .recoShow = true
6568 }
6669}
6770 </script >
6871
6972<style lang="stylus">
7073@require '../styles/mode.styl'
71- @require '../styles/loadMixin.styl'
7274
7375.home {
7476 padding : $navbarHeight 2rem 0 ;
@@ -138,58 +140,58 @@ export default {
138140 }
139141 }
140142
141- & .reco-hide {
142- .hero {
143- img {
144- load-start ()
145- }
146- .h1 {
147- load-start ()
148- }
149- .description {
150- load-start ()
151- }
152- .huawei {
153- load-start ()
154- }
155- .action-button {
156- load-start ()
157- }
158- }
159- .features {
160- load-start ()
161- }
162- .home-center {
163- load-start ()
164- padding 0
165- }
166- }
167-
168- & .reco-show {
169- .hero {
170- img {
171- load-end (0.08s )
172- }
173- .h1 {
174- load-end (0.16s )
175- }
176- .description {
177- load-end (0.24s )
178- }
179- .huawei {
180- load-end (0.32s )
181- }
182- .action-button {
183- load-end (0.4s )
184- }
185- }
186- .features {
187- load-end (0.40s )
188- }
189- .home-center {
190- load-end (0.48s )
191- }
192- }
143+ // &.reco-hide {
144+ // .hero {
145+ // img {
146+ // load-start()
147+ // }
148+ // .h1 {
149+ // load-start()
150+ // }
151+ // .description {
152+ // load-start()
153+ // }
154+ // .huawei {
155+ // load-start()
156+ // }
157+ // .action-button {
158+ // load-start()
159+ // }
160+ // }
161+ // .features {
162+ // load-start()
163+ // }
164+ // .home-center {
165+ // load-start()
166+ // padding 0
167+ // }
168+ // }
169+
170+ // &.reco-show {
171+ // .hero {
172+ // img {
173+ // load-end(0.08s)
174+ // }
175+ // .h1 {
176+ // load-end(0.16s)
177+ // }
178+ // .description {
179+ // load-end(0.24s)
180+ // }
181+ // .huawei {
182+ // load-end(0.32s)
183+ // }
184+ // .action-button {
185+ // load-end(0.4s)
186+ // }
187+ // }
188+ // .features {
189+ // load-end(0.40s)
190+ // }
191+ // .home-center {
192+ // load-end(0.48s)
193+ // }
194+ // }
193195}
194196
195197@media (max-width : $MQMobile) {
0 commit comments