Skip to content

Commit

Permalink
Merge pull request #150 from linhaojun857/dev
Browse files Browse the repository at this point in the history
Fix toc-side-box
  • Loading branch information
linhaojun857 committed Nov 17, 2023
2 parents 60a8fbd + 3629763 commit afb0d77
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 9 deletions.
1 change: 0 additions & 1 deletion aurora-vue/aurora-blog/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ export default defineComponent({
head.appendChild(faviconLink);
}
}
console.log(computed(() => appStore.themeConfig.theme))
return {
title: computed(() => appStore.websiteConfig.websiteTitle || metaStore.title),
theme: computed(() => appStore.themeConfig.theme),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { SkeletonStyle } from './SkeletonTheme.vue'
const isEmptyVNode = (children: any) => {
if (!children) return true
const firstNode = children()[0]
console.log('firstNode', firstNode)
let str = firstNode.text
if (str) {
str = str.replace(/(\n|\r\n|\s)/g, '')
Expand Down
1 change: 0 additions & 1 deletion aurora-vue/aurora-blog/src/components/MobileMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export default defineComponent({
})
}
const pushPage = (path: string): void => {
console.log(path)
if (!path) return
navigatorStore.toggleMobileMenu()
navigatorStore.setOpenNavigator(false)
Expand Down
1 change: 0 additions & 1 deletion aurora-vue/aurora-blog/src/components/SearchModel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ export default defineComponent({
}
const handleEnterDown = () => {
if (searchResults.value.length === 0 && recentResults.value.length > 0) {
console.log(recentResults)
handleLinkClick(recentResults.value[menuActiveIndex.value])
} else if (searchResults.value.length > 0) {
handleLinkClick(searchResults.value[menuActiveIndex.value])
Expand Down
6 changes: 6 additions & 0 deletions aurora-vue/aurora-blog/src/views/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ export default defineComponent({
tocSelector: '#toc2',
contentSelector: '.post-html',
headingSelector: 'h1, h2, h3',
collapseDepth: 3,
disableTocScrollSync: true,
onClick: function (e) {
e.preventDefault()
}
Expand Down Expand Up @@ -203,6 +205,10 @@ export default defineComponent({
word-wrap: break-word;
word-break: break-all;
}
#toc2 {
max-height: 470px;
overflow: hidden scroll;
}
#toc2 > ol {
list-style: none;
counter-reset: li;
Expand Down
14 changes: 10 additions & 4 deletions aurora-vue/aurora-blog/src/views/Article.vue
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ export default defineComponent({
tocSelector: '#toc1',
contentSelector: '.post-html',
headingSelector: 'h1, h2, h3',
collapseDepth: 3,
disableTocScrollSync: true,
onClick: function (e) {
e.preventDefault()
}
Expand Down Expand Up @@ -380,6 +382,10 @@ export default defineComponent({
word-wrap: break-word;
word-break: break-all;
}
#toc1 {
max-height: 470px;
overflow: hidden scroll;
}
#toc1 > ol {
list-style: none;
counter-reset: li;
Expand Down Expand Up @@ -471,10 +477,10 @@ export default defineComponent({
}
}
.markdown-body .hljs-center {
text-align: center;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
display: flex;
justify-content: center;
align-items: center;
}
</style>
<style lang="scss" scoped>
Expand Down
2 changes: 1 addition & 1 deletion aurora-vue/aurora-blog/vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = defineConfig({
devServer: {
proxy: {
'/api': {
target: 'http://localhost:8080',
target: 'https://www.linhaojun.top/api',
changeOrigin: true,
pathRewrite: {
'^/api': ''
Expand Down

0 comments on commit afb0d77

Please sign in to comment.