diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index f05f04e..37f863e 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -73,6 +73,7 @@ module.exports = { // showToArticle: true, // 显示到文章页底部,默认true // moreArticle: '/archives' // “更多文章”跳转的页面,默认'/archives' // }, + // rightMenuBar: false, // 是否显示右侧文章大纲栏,默认true (屏宽小于1300px下无论如何都不显示) // sidebarOpen: false, // 初始状态是否打开侧边栏,默认true // pageButton: false, // 是否显示快捷翻页按钮,默认true diff --git a/package.json b/package.json index a387463..249f60c 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/theme-vdoing/components/Page.vue b/theme-vdoing/components/Page.vue index 5154e9b..c6c4594 100644 --- a/theme-vdoing/components/Page.vue +++ b/theme-vdoing/components/Page.vue @@ -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) - .right-menu-wrapper - display none + .have-rightmenu + .right-menu-wrapper + display none @media (min-width 1280px) - .sidebar .sidebar-sub-headers - display none + .have-rightmenu + .sidebar .sidebar-sub-headers + display none diff --git a/theme-vdoing/components/SidebarGroup.vue b/theme-vdoing/components/SidebarGroup.vue index 3693422..e91e765 100644 --- a/theme-vdoing/components/SidebarGroup.vue +++ b/theme-vdoing/components/SidebarGroup.vue @@ -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 diff --git a/theme-vdoing/layouts/Layout.vue b/theme-vdoing/layouts/Layout.vue index 74ffbcc..9bd532f 100644 --- a/theme-vdoing/layouts/Layout.vue +++ b/theme-vdoing/layouts/Layout.vue @@ -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 diff --git a/theme-vdoing/package.json b/theme-vdoing/package.json index 12debc5..f69d1a7 100644 --- a/theme-vdoing/package.json +++ b/theme-vdoing/package.json @@ -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"