This commit is contained in:
xugaoyi 2020-12-15 15:59:42 +08:00
parent a306a030b9
commit 8a75b5bb65
6 changed files with 20 additions and 10 deletions

View File

@ -73,6 +73,7 @@ module.exports = {
// showToArticle: true, // 显示到文章页底部默认true
// moreArticle: '/archives' // “更多文章”跳转的页面,默认'/archives'
// },
// rightMenuBar: false, // 是否显示右侧文章大纲栏默认true (屏宽小于1300px下无论如何都不显示)
// sidebarOpen: false, // 初始状态是否打开侧边栏默认true
// pageButton: false, // 是否显示快捷翻页按钮默认true

View File

@ -22,7 +22,7 @@
"vuepress-plugin-one-click-copy": "^1.0.2",
"vuepress-plugin-thirdparty-search": "^1.0.2",
"vuepress-plugin-zooming": "^1.1.7",
"vuepress-theme-vdoing": "^1.6.2",
"vuepress-theme-vdoing": "^1.6.3",
"yamljs": "^0.3.0"
},
"dependencies": {

View File

@ -72,7 +72,13 @@ export default {
return !this.$frontmatter.pageComponent
},
showRightMenu () {
return this.$page.headers && (this.$frontmatter && this.$frontmatter.sidebar && this.$frontmatter.sidebar !== false) !== false
const { $frontmatter, $themeConfig, $page } = this
const { sidebar } = $frontmatter
return (
$themeConfig.rightMenuBar !== false &&
$page.headers &&
($frontmatter && sidebar && sidebar !== false) !== false
)
},
pageComponent () {
return this.$frontmatter.pageComponent ? this.$frontmatter.pageComponent.name : false
@ -138,9 +144,11 @@ export default {
.page
padding-right 0.8rem !important
@media (max-width 1279px)
.have-rightmenu
.right-menu-wrapper
display none
@media (min-width 1280px)
.have-rightmenu
.sidebar .sidebar-sub-headers
display none
</style>

View File

@ -81,12 +81,12 @@ export default {
&.is-sub-group
padding-left 0
& > .sidebar-heading
font-size 1em
font-size 1.01em
line-height 1.4
font-weight normal
font-weight bold
padding-left 2rem
&:not(.clickable)
opacity 0.5
// opacity 0.9
& > .sidebar-group-items
padding-left 1rem
& > li > .sidebar-link

View File

@ -102,6 +102,7 @@ export default {
const { headers } = this.$page
return (
!this.$frontmatter.home
&& this.$themeConfig.rightMenuBar !== false
&& headers
&& headers.length
&& this.$frontmatter.sidebar !== false

View File

@ -1,6 +1,6 @@
{
"name": "vuepress-theme-vdoing",
"version": "1.6.2",
"version": "1.6.3",
"description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。",
"author": {
"name": "gaoyi(Evan) Xu"