Skip to content

Commit 1eb7517

Browse files
author
reco_luan
committed
fix: fix style
Fix style Add @vuepress-reco/vuepress-plugin-extract-code
1 parent 9b17b57 commit 1eb7517

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

components/HomeBlog.vue

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

66
<p class="description">{{ $description || 'Welcome to your vuePress-theme-reco site' }}</p>
77
<p class="huawei" v-if="$themeConfig.huawei === true"><i class="iconfont reco-huawei" style="color: #fc2d38"></i>&nbsp;&nbsp;&nbsp;华为,为中华而为之!</p>
@@ -88,22 +88,19 @@ export default {
8888
getPagesLength () {
8989
return this.posts.length
9090
},
91-
homeFrontmatter () {
92-
return this.$frontmatter
93-
},
9491
actionLink () {
9592
const {
9693
actionLink: link,
9794
actionText: text
98-
} = this.homeFrontmatter
95+
} = this.$frontmatter
9996
10097
return {
10198
link,
10299
text
103100
}
104101
},
105102
heroImageStyle () {
106-
return this.homeFrontmatter.heroImageStyle || {
103+
return this.$frontmatter.heroImageStyle || {
107104
maxHeight: '200px',
108105
margin: '6rem auto 1.5rem'
109106
}
@@ -116,7 +113,7 @@ export default {
116113
}
117114
const {
118115
bgImageStyle
119-
} = this.homeFrontmatter
116+
} = this.$frontmatter
120117
121118
return bgImageStyle ? { ...initBgImageStyle, ...bgImageStyle } : initBgImageStyle
122119
},

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ module.exports = (options, ctx) => ({
1919

2020
plugins: [
2121
'@vuepress-reco/back-to-top',
22+
'@vuepress-reco/extract-code',
2223
'@vuepress-reco/loading-page',
2324
'@vuepress-reco/pagation',
2425
'@vuepress-reco/screenfull',

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"_resolved": "http://registry.npm.taobao.org/vuepress-theme-reco/download/vuepress-theme-reco-0.2.1.tgz",
2828
"dependencies": {
2929
"@vuepress-reco/vuepress-plugin-back-to-top": "^1.0.3",
30+
"@vuepress-reco/vuepress-plugin-extract-code": "1.0.1",
3031
"@vuepress-reco/vuepress-plugin-loading-page": "^1.0.0",
3132
"@vuepress-reco/vuepress-plugin-pagation": "^1.0.3",
3233
"@vuepress-reco/vuepress-plugin-screenfull": "^1.0.0",

styles/theme.styl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ body
1919
background-color #fff
2020

2121
.page
22+
overflow-x: hidden
2223
padding-left $sidebarWidth
2324

2425
.navbar
@@ -316,4 +317,4 @@ th, td
316317

317318
.pagation
318319
.jump
319-
background $backgroundColor
320+
background $backgroundColor

0 commit comments

Comments
 (0)