Skip to content

Commit 944b0a0

Browse files
committed
change: huawei text hidden by default
1 parent c3087a9 commit 944b0a0

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

components/Common.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export default {
9696
},
9797
9898
pageClasses () {
99-
const userPageClass = this.$page.frontmatter.pageClass
99+
const userPageClass = this.$frontmatter.pageClass
100100
return [
101101
{
102102
'no-navbar': !this.shouldShowNavbar,

components/Home.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<h1 v-if="data.isShowTitleInHome !== false">{{ data.heroText || $title || '午后南杂' }}</h1>
77

88
<p class="description">{{ data.tagline || $description || 'Welcome to your vuePress-theme-reco site' }}</p>
9-
<p class="huawei" v-if="$themeConfig.huawei !== false"><i class="iconfont reco-huawei" style="color: #fc2d38"></i>&nbsp;&nbsp;&nbsp;华为,为中华而为之!</p>
9+
<p class="huawei" v-if="$themeConfig.huawei === true"><i class="iconfont reco-huawei" style="color: #fc2d38"></i>&nbsp;&nbsp;&nbsp;华为,为中华而为之!</p>
1010

1111
<p class="action" v-if="data.actionText && data.actionLink">
1212
<NavLink class="action-button" :item="actionLink"/>
@@ -67,7 +67,7 @@ export default {
6767
return new Date().getFullYear()
6868
},
6969
data() {
70-
return this.$page.frontmatter;
70+
return this.$frontmatter;
7171
},
7272
7373
actionLink() {

components/HomeBlog.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<template>
22
<div class="home-blog" :class="recoShow?'reco-show': 'reco-hide'">
3-
<div class="hero" :style="{background: `url(${$page.frontmatter.bgImage || require('../images/home-bg.jpg')}) center/cover no-repeat`, ...bgImageStyle}">
3+
<div class="hero" :style="{background: `url(${$frontmatter.bgImage || require('../images/home-bg.jpg')}) center/cover no-repeat`, ...bgImageStyle}">
44
<h1>{{ data.heroText || $title || '午后南杂' }}</h1>
55

66
<p class="description">{{ data.tagline || $description || 'Welcome to your vuePress-theme-reco site' }}</p>
7-
<p class="huawei" v-if="$themeConfig.huawei !== false"><i class="iconfont reco-huawei" style="color: #fc2d38"></i>&nbsp;&nbsp;&nbsp;华为,为中华而为之!</p>
7+
<p class="huawei" v-if="$themeConfig.huawei === true"><i class="iconfont reco-huawei" style="color: #fc2d38"></i>&nbsp;&nbsp;&nbsp;华为,为中华而为之!</p>
88
</div>
99

1010
<div class="home-blog-wrapper">
@@ -15,7 +15,7 @@
1515
:data="posts"
1616
:currentPage="1"></note-abstract>
1717
<div class="info-wrapper">
18-
<img class="personal-img" :src="$page.frontmatter.faceImage || $themeConfig.logo" alt="hero">
18+
<img class="personal-img" :src="$frontmatter.faceImage || $themeConfig.logo" alt="hero">
1919
<h3 class="name" v-if="$themeConfig.author || $site.title">{{ $themeConfig.author || $site.title }}</h3>
2020
<div class="num">
2121
<div>
@@ -117,7 +117,7 @@ export default {
117117
return new Date().getFullYear()
118118
},
119119
data() {
120-
return this.$page.frontmatter;
120+
return this.$frontmatter;
121121
},
122122
123123
actionLink() {
@@ -200,9 +200,9 @@ export default {
200200
}
201201
202202
h1 {
203-
margin: 4rem auto 1.8rem ;
203+
margin:10% auto 1.8rem ;
204204
font-size: 2.5rem;
205-
color #fff
205+
color #fff;
206206
}
207207
208208
h1, .description, .action, .huawei {

components/Navbar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<AlgoliaSearchBox
2626
v-if="isAlgoliaSearch"
2727
:options="algolia"/>
28-
<SearchBox v-else-if="$themeConfig.search !== false && $page.frontmatter.search !== false"/>
28+
<SearchBox v-else-if="$themeConfig.search !== false && $frontmatter.search !== false"/>
2929
<NavLinks class="can-hide"/>
3030
</div>
3131
</header>

components/Page.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export default {
8787
8888
computed: {
8989
isTimeLine () {
90-
return this.$page.frontmatter.isTimeLine
90+
return this.$frontmatter.isTimeLine
9191
},
9292
lastUpdated () {
9393
return this.$page.lastUpdated
@@ -104,7 +104,7 @@ export default {
104104
},
105105
106106
prev () {
107-
const prev = this.$page.frontmatter.prev
107+
const prev = this.$frontmatter.prev
108108
if (prev === false) {
109109
return
110110
} else if (prev) {
@@ -115,7 +115,7 @@ export default {
115115
},
116116
117117
next () {
118-
const next = this.$page.frontmatter.next
118+
const next = this.$frontmatter.next
119119
if (next === false) {
120120
return
121121
} else if (next) {
@@ -126,7 +126,7 @@ export default {
126126
},
127127
128128
editLink () {
129-
if (this.$page.frontmatter.editLink === false) {
129+
if (this.$frontmatter.editLink === false) {
130130
return
131131
}
132132
const {

components/SidebarLink.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
: selfActive
3131
const link = renderLink(h, item.path, item.title || item.path, active)
3232
33-
const configDepth = $page.frontmatter.sidebarDepth
33+
const configDepth = $frontmatter.sidebarDepth
3434
|| sidebarDepth
3535
|| $themeLocaleConfig.sidebarDepth
3636
|| $themeConfig.sidebarDepth

components/Valine/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
computed: {
1313
// 是否显示评论
1414
isShowComment () {
15-
const frontmatter = this.$page.frontmatter
15+
const frontmatter = this.$frontmatter
1616
return this.isComment == false || frontmatter.isComment == false || frontmatter.home == true ? false : true
1717
}
1818
},

layouts/Category.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export default {
4747
},
4848
// 标题只显示分类名称
4949
title () {
50-
return this.$page.frontmatter.title.split('|')[0]
50+
return this.$frontmatter.title.split('|')[0]
5151
}
5252
},
5353

layouts/Layout.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<template>
22
<div>
33
<Common>
4-
<Home v-if="$page.frontmatter.home && $themeConfig.type !== 'blog'"/>
5-
<HomeBlog v-else-if="$page.frontmatter.home && $themeConfig.type === 'blog'"/>
4+
<Home v-if="$frontmatter.home && $themeConfig.type !== 'blog'"/>
5+
<HomeBlog v-else-if="$frontmatter.home && $themeConfig.type === 'blog'"/>
66
<Page
77
v-else
88
:sidebar-items="sidebarItems">

0 commit comments

Comments
 (0)