fix: Added `frontmatter--transparentNavBar` configuration for toggling transparent navigation bar visibility

pull/3383/head
justin3go 2 years ago
parent 9c20e3b5f8
commit ee13fb09d3

@ -27,9 +27,10 @@ const { frontmatter } = useData()
const classes = ref<Record<string, boolean>>({})
watchPostEffect(() => {
const isTransparentPage = frontmatter.value.transparentNavBar || frontmatter.value.layout === 'home'
classes.value = {
'has-sidebar': hasSidebar.value,
top: frontmatter.value.layout === 'home' && y.value === 0,
top: isTransparentPage && y.value === 0,
}
})
</script>

Loading…
Cancel
Save