fix: fix style

Fix style

Add @vuepress-reco/vuepress-plugin-extract-code
This commit is contained in:
reco_luan 2019-11-01 19:32:52 +08:00
parent 9b17b57990
commit 1eb7517329
4 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="home-blog" :class="recoShow?'reco-show': 'reco-hide'">
<div class="hero" :style="{background: `url(${$frontmatter.bgImage ? $withBase($frontmatter.bgImage) : require('../images/home-bg.jpg')}) center/cover no-repeat`, ...bgImageStyle}">
<h1>{{ homeFrontmatter.heroText || $title || '午后南杂' }}</h1>
<h1>{{ $frontmatter.heroText || $title || '午后南杂' }}</h1>
<p class="description">{{ $description || 'Welcome to your vuePress-theme-reco site' }}</p>
<p class="huawei" v-if="$themeConfig.huawei === true"><i class="iconfont reco-huawei" style="color: #fc2d38"></i>&nbsp;&nbsp;&nbsp;华为为中华而为之</p>
@ -88,14 +88,11 @@ export default {
getPagesLength () {
return this.posts.length
},
homeFrontmatter () {
return this.$frontmatter
},
actionLink () {
const {
actionLink: link,
actionText: text
} = this.homeFrontmatter
} = this.$frontmatter
return {
link,
@ -103,7 +100,7 @@ export default {
}
},
heroImageStyle () {
return this.homeFrontmatter.heroImageStyle || {
return this.$frontmatter.heroImageStyle || {
maxHeight: '200px',
margin: '6rem auto 1.5rem'
}
@ -116,7 +113,7 @@ export default {
}
const {
bgImageStyle
} = this.homeFrontmatter
} = this.$frontmatter
return bgImageStyle ? { ...initBgImageStyle, ...bgImageStyle } : initBgImageStyle
},

View File

@ -19,6 +19,7 @@ module.exports = (options, ctx) => ({
plugins: [
'@vuepress-reco/back-to-top',
'@vuepress-reco/extract-code',
'@vuepress-reco/loading-page',
'@vuepress-reco/pagation',
'@vuepress-reco/screenfull',

View File

@ -27,6 +27,7 @@
"_resolved": "http://registry.npm.taobao.org/vuepress-theme-reco/download/vuepress-theme-reco-0.2.1.tgz",
"dependencies": {
"@vuepress-reco/vuepress-plugin-back-to-top": "^1.0.3",
"@vuepress-reco/vuepress-plugin-extract-code": "1.0.1",
"@vuepress-reco/vuepress-plugin-loading-page": "^1.0.0",
"@vuepress-reco/vuepress-plugin-pagation": "^1.0.3",
"@vuepress-reco/vuepress-plugin-screenfull": "^1.0.0",

View File

@ -19,6 +19,7 @@ body
background-color #fff
.page
overflow-x: hidden
padding-left $sidebarWidth
.navbar