Skip to content

Commit

Permalink
fix(vuepress-theme-reco): fix some style problems
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #231
  • Loading branch information
reco_luan committed Aug 16, 2020
1 parent 5efa924 commit 84e9516
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion example/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = {
search: true,
searchMaxSuggestions: 10,
// 自动形成侧边导航
// subSidebar: 'auto',
subSidebar: 'auto',
sidebarDepth: 4,
// 最后更新时间
lastUpdated: 'Last Updated',
Expand Down
4 changes: 1 addition & 3 deletions example/views/sidebargroup/bar1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
---
title: bar1
---
# bar test

bar1
6 changes: 5 additions & 1 deletion packages/vuepress-theme-reco/components/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<main class="page" :style="pageStyle">
<ModuleTransition>
<div v-show="recoShowModule && $page.title" class="page-title">
<h1>{{$page.title}}</h1>
<h1 class="title">{{$page.title}}</h1>
<PageInfo :pageInfo="$page" :showAccessNumber="showAccessNumber"></PageInfo>
</div>
</ModuleTransition>
Expand Down Expand Up @@ -175,6 +175,10 @@ export default {
}
},
created () {
console.log(this)
},
methods: {
createEditLink (repo, docsRepo, docsDir, docsBranch, path) {
const bitbucket = /bitbucket.org/
Expand Down
2 changes: 1 addition & 1 deletion packages/vuepress-theme-reco/components/SubSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isActive } from '@theme/helpers/utils'
export default {
computed: {
headers () {
return this.showSubSidebar ? this.$page.headers || [] : []
return this.$showSubSideBar ? this.$page.headers : []
}
},
methods: {
Expand Down
12 changes: 7 additions & 5 deletions packages/vuepress-theme-reco/styles/theme.styl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ body
border-radius 4px
img
max-width 100%
*:first-child
margin-top 0

.content__default.custom
padding 0
Expand Down Expand Up @@ -111,17 +113,17 @@ h1, h2, h3, h4, h5, h6
font-weight 500
line-height 1.25
.content__default:not(.custom) > &
margin-top (0.5rem - $navbarHeight)
padding-top ($navbarHeight + 1rem)
margin-top (2.1rem - $navbarHeight)
padding-top $navbarHeight
margin-bottom 0
&:first-child
margin-top -3.5rem
margin-bottom 1rem
+ p, + pre, + .custom-block
margin-top 2rem

h1
display none
font-size 1.6rem
&.title
display block

h2
position relative
Expand Down

0 comments on commit 84e9516

Please sign in to comment.