File tree Expand file tree Collapse file tree 2 files changed +45
-19
lines changed Expand file tree Collapse file tree 2 files changed +45
-19
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" intro-container" >
3
- <p >An infinite scroll plugin for Vue.js </p >
3
+ <p v-text = " $description || 'Welcome to your VuePress site' " > </p >
4
4
<router-link
5
5
class =" button button-large button-basic"
6
- :to =" '/guide/'"
6
+ v-if =" data.actionText && data.actionLink"
7
+ :to =" data.actionLink"
8
+ v-text =" data.actionText"
7
9
tag =" button" >
8
- Get Started
9
10
</router-link >
10
- <button class =" button button-large" >View GitHub</button >
11
- <ul class =" feat-list" >
12
- <li >
13
- <h3 >Out of the box</h3 >
14
- BalabalaBalabalaBalabalaBalabala
15
- </li >
16
- <li >
17
- <h3 >2-direction support</h3 >
18
- BalabalaBalabalaBalabalaBalabala
19
- </li >
20
- <li >
21
- <h3 >Result display</h3 >
22
- BalabalaBalabalaBalabalaBalabala
11
+ <a :href =" repoLink" class =" button button-large"
12
+ v-if =" data.GitHubText && $themeConfig.repo"
13
+ v-text =" data.GitHubText" >
14
+ </a >
15
+ <ul class =" feat-list"
16
+ v-if =" data.features && data.features" >
17
+ <li v-for =" (feature, index) in data.features" >
18
+ <h3 v-text =" feature.title" ></h3 >
19
+ {{ feature.details }}
23
20
</li >
24
21
</ul >
25
22
</div >
26
23
</template >
27
24
25
+ <script >
26
+ export default {
27
+ data () {
28
+ return { data: {} };
29
+ },
30
+ watch: {
31
+ ' $page.frontmatter' : {
32
+ immediate: true ,
33
+ handler (val ) {
34
+ // only read home data
35
+ if (val && val .home ) {
36
+ this .data = val;
37
+ }
38
+ },
39
+ },
40
+ },
41
+ computed: {
42
+ repoLink () {
43
+ const link = this .$themeConfig .repo ;
44
+
45
+ return / ^ https? :/ .test (link)
46
+ ? link
47
+ : ` https://github.com/${ link} ` ;
48
+ },
49
+ },
50
+ };
51
+ </script >
52
+
53
+
28
54
<style lang="stylus" scoped>
29
55
@require '../styles/config' ;
30
56
Original file line number Diff line number Diff line change 61
61
<Previewer />
62
62
<Intro />
63
63
64
- <footer class =" footer" >
65
- < p >Released under the MIT License</ p >
66
- < p > & copy ; 2016-present Made with ♥ under Vuepress by PeachScript</ p >
64
+ <footer class =" footer"
65
+ v-if = " $themeConfig.footer || $themeLocaleConfig.footer "
66
+ v-html = " $themeConfig.footer || $themeLocaleConfig.footer " >
67
67
</footer >
68
68
</div >
69
69
</template >
You can’t perform that action at this time.
0 commit comments