change: huawei text hidden by default

This commit is contained in:
reco_luan 2019-07-20 19:00:36 +08:00
parent c3087a94a2
commit 944b0a0aad
9 changed files with 19 additions and 19 deletions

View File

@ -96,7 +96,7 @@ export default {
}, },
pageClasses () { pageClasses () {
const userPageClass = this.$page.frontmatter.pageClass const userPageClass = this.$frontmatter.pageClass
return [ return [
{ {
'no-navbar': !this.shouldShowNavbar, 'no-navbar': !this.shouldShowNavbar,

View File

@ -6,7 +6,7 @@
<h1 v-if="data.isShowTitleInHome !== false">{{ data.heroText || $title || '午后南杂' }}</h1> <h1 v-if="data.isShowTitleInHome !== false">{{ data.heroText || $title || '午后南杂' }}</h1>
<p class="description">{{ data.tagline || $description || 'Welcome to your vuePress-theme-reco site' }}</p> <p class="description">{{ data.tagline || $description || 'Welcome to your vuePress-theme-reco site' }}</p>
<p class="huawei" v-if="$themeConfig.huawei !== false"><i class="iconfont reco-huawei" style="color: #fc2d38"></i>&nbsp;&nbsp;&nbsp;华为为中华而为之</p> <p class="huawei" v-if="$themeConfig.huawei === true"><i class="iconfont reco-huawei" style="color: #fc2d38"></i>&nbsp;&nbsp;&nbsp;华为为中华而为之</p>
<p class="action" v-if="data.actionText && data.actionLink"> <p class="action" v-if="data.actionText && data.actionLink">
<NavLink class="action-button" :item="actionLink"/> <NavLink class="action-button" :item="actionLink"/>
@ -67,7 +67,7 @@ export default {
return new Date().getFullYear() return new Date().getFullYear()
}, },
data() { data() {
return this.$page.frontmatter; return this.$frontmatter;
}, },
actionLink() { actionLink() {

View File

@ -1,10 +1,10 @@
<template> <template>
<div class="home-blog" :class="recoShow?'reco-show': 'reco-hide'"> <div class="home-blog" :class="recoShow?'reco-show': 'reco-hide'">
<div class="hero" :style="{background: `url(${$page.frontmatter.bgImage || require('../images/home-bg.jpg')}) center/cover no-repeat`, ...bgImageStyle}"> <div class="hero" :style="{background: `url(${$frontmatter.bgImage || require('../images/home-bg.jpg')}) center/cover no-repeat`, ...bgImageStyle}">
<h1>{{ data.heroText || $title || '午后南杂' }}</h1> <h1>{{ data.heroText || $title || '午后南杂' }}</h1>
<p class="description">{{ data.tagline || $description || 'Welcome to your vuePress-theme-reco site' }}</p> <p class="description">{{ data.tagline || $description || 'Welcome to your vuePress-theme-reco site' }}</p>
<p class="huawei" v-if="$themeConfig.huawei !== false"><i class="iconfont reco-huawei" style="color: #fc2d38"></i>&nbsp;&nbsp;&nbsp;华为为中华而为之</p> <p class="huawei" v-if="$themeConfig.huawei === true"><i class="iconfont reco-huawei" style="color: #fc2d38"></i>&nbsp;&nbsp;&nbsp;华为为中华而为之</p>
</div> </div>
<div class="home-blog-wrapper"> <div class="home-blog-wrapper">
@ -15,7 +15,7 @@
:data="posts" :data="posts"
:currentPage="1"></note-abstract> :currentPage="1"></note-abstract>
<div class="info-wrapper"> <div class="info-wrapper">
<img class="personal-img" :src="$page.frontmatter.faceImage || $themeConfig.logo" alt="hero"> <img class="personal-img" :src="$frontmatter.faceImage || $themeConfig.logo" alt="hero">
<h3 class="name" v-if="$themeConfig.author || $site.title">{{ $themeConfig.author || $site.title }}</h3> <h3 class="name" v-if="$themeConfig.author || $site.title">{{ $themeConfig.author || $site.title }}</h3>
<div class="num"> <div class="num">
<div> <div>
@ -117,7 +117,7 @@ export default {
return new Date().getFullYear() return new Date().getFullYear()
}, },
data() { data() {
return this.$page.frontmatter; return this.$frontmatter;
}, },
actionLink() { actionLink() {
@ -200,9 +200,9 @@ export default {
} }
h1 { h1 {
margin: 4rem auto 1.8rem ; margin:10% auto 1.8rem ;
font-size: 2.5rem; font-size: 2.5rem;
color #fff color #fff;
} }
h1, .description, .action, .huawei { h1, .description, .action, .huawei {

View File

@ -25,7 +25,7 @@
<AlgoliaSearchBox <AlgoliaSearchBox
v-if="isAlgoliaSearch" v-if="isAlgoliaSearch"
:options="algolia"/> :options="algolia"/>
<SearchBox v-else-if="$themeConfig.search !== false && $page.frontmatter.search !== false"/> <SearchBox v-else-if="$themeConfig.search !== false && $frontmatter.search !== false"/>
<NavLinks class="can-hide"/> <NavLinks class="can-hide"/>
</div> </div>
</header> </header>

View File

@ -87,7 +87,7 @@ export default {
computed: { computed: {
isTimeLine () { isTimeLine () {
return this.$page.frontmatter.isTimeLine return this.$frontmatter.isTimeLine
}, },
lastUpdated () { lastUpdated () {
return this.$page.lastUpdated return this.$page.lastUpdated
@ -104,7 +104,7 @@ export default {
}, },
prev () { prev () {
const prev = this.$page.frontmatter.prev const prev = this.$frontmatter.prev
if (prev === false) { if (prev === false) {
return return
} else if (prev) { } else if (prev) {
@ -115,7 +115,7 @@ export default {
}, },
next () { next () {
const next = this.$page.frontmatter.next const next = this.$frontmatter.next
if (next === false) { if (next === false) {
return return
} else if (next) { } else if (next) {
@ -126,7 +126,7 @@ export default {
}, },
editLink () { editLink () {
if (this.$page.frontmatter.editLink === false) { if (this.$frontmatter.editLink === false) {
return return
} }
const { const {

View File

@ -30,7 +30,7 @@ export default {
: selfActive : selfActive
const link = renderLink(h, item.path, item.title || item.path, active) const link = renderLink(h, item.path, item.title || item.path, active)
const configDepth = $page.frontmatter.sidebarDepth const configDepth = $frontmatter.sidebarDepth
|| sidebarDepth || sidebarDepth
|| $themeLocaleConfig.sidebarDepth || $themeLocaleConfig.sidebarDepth
|| $themeConfig.sidebarDepth || $themeConfig.sidebarDepth

View File

@ -12,7 +12,7 @@ export default {
computed: { computed: {
// //
isShowComment () { isShowComment () {
const frontmatter = this.$page.frontmatter const frontmatter = this.$frontmatter
return this.isComment == false || frontmatter.isComment == false || frontmatter.home == true ? false : true return this.isComment == false || frontmatter.isComment == false || frontmatter.home == true ? false : true
} }
}, },

View File

@ -47,7 +47,7 @@ export default {
}, },
// //
title () { title () {
return this.$page.frontmatter.title.split('|')[0] return this.$frontmatter.title.split('|')[0]
} }
}, },

View File

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<Common> <Common>
<Home v-if="$page.frontmatter.home && $themeConfig.type !== 'blog'"/> <Home v-if="$frontmatter.home && $themeConfig.type !== 'blog'"/>
<HomeBlog v-else-if="$page.frontmatter.home && $themeConfig.type === 'blog'"/> <HomeBlog v-else-if="$frontmatter.home && $themeConfig.type === 'blog'"/>
<Page <Page
v-else v-else
:sidebar-items="sidebarItems"> :sidebar-items="sidebarItems">