Skip to content

Commit

Permalink
fix: header width is not updated after resize of the browser window
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyxguo committed Sep 10, 2023
1 parent 123250c commit 9f84fbf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/components/Sticky.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ export default defineComponent({
this.height = this.$el.getBoundingClientRect().height
this.updateScroll()
document.addEventListener('scroll', this.handleScroll)
document.addEventListener('resize', this.handleResize)
window.addEventListener('resize', this.handleResize)
},
activated() {
this.updateScroll()
},
unmounted() {
document.removeEventListener('scroll', this.handleScroll)
document.removeEventListener('resize', this.handleResize)
window.removeEventListener('resize', this.handleResize)
},
methods: {
sticky(top: number, position: any) {
Expand Down
10 changes: 3 additions & 7 deletions src/pages/post/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,11 @@ export default defineComponent({
})
if (appStore.hexoConfig.writing.highlight.enable) {
// eslint-disable-next-line no-console
console.error(
'[Aurora Config Error]: Please turn off [Hightlightjs] and enable [Prismjs] instead. '
)
console.warn('[Aurora Config Error]: Please turn off [Hightlightjs].')
}
if (appStore.hexoConfig.writing.prismjs.preprocess) {
if (appStore.hexoConfig.writing.prismjs.enable) {
// eslint-disable-next-line no-console
console.error(
"[Aurora Config Error]: Please set Hexo config's prismjs' [preprocess] property to false! "
)
console.warn('[Aurora Config Error]: Please turn off [prismjs]. ')
}
await nextTick()
initializeLightBox()
Expand Down

0 comments on commit 9f84fbf

Please sign in to comment.