mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 23:56:42 +08:00
fix header
This commit is contained in:
@@ -15,6 +15,14 @@ export default defineComponent({
|
|||||||
// We want to show overlay if overlay nav is visible and want to hide overlay if overlay is hidden and vice versa.
|
// We want to show overlay if overlay nav is visible and want to hide overlay if overlay is hidden and vice versa.
|
||||||
syncRef(isOverlayNavActive, isLayoutOverlayVisible)
|
syncRef(isOverlayNavActive, isLayoutOverlayVisible)
|
||||||
|
|
||||||
|
const scrollDistance = ref(window.scrollY)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
window.addEventListener('scroll', () => {
|
||||||
|
scrollDistance.value = window.scrollY
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
// 👉 Vertical nav
|
// 👉 Vertical nav
|
||||||
const verticalNav = h(
|
const verticalNav = h(
|
||||||
@@ -79,6 +87,7 @@ export default defineComponent({
|
|||||||
'layout-navbar-sticky',
|
'layout-navbar-sticky',
|
||||||
mdAndDown.value && 'layout-overlay-nav',
|
mdAndDown.value && 'layout-overlay-nav',
|
||||||
route.meta.layoutWrapperClasses,
|
route.meta.layoutWrapperClasses,
|
||||||
|
(scrollDistance.value > 20) && 'window-scrolled',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
@@ -105,12 +114,6 @@ export default defineComponent({
|
|||||||
@use "@layouts/styles/placeholders";
|
@use "@layouts/styles/placeholders";
|
||||||
@use "@layouts/styles/mixins";
|
@use "@layouts/styles/mixins";
|
||||||
|
|
||||||
.navbar-blur {
|
|
||||||
backdrop-filter: blur(1rem);
|
|
||||||
|
|
||||||
// background-color: rgba(var(--v-theme-on-surface), var(--v-high-emphasis-opacity));
|
|
||||||
}
|
|
||||||
|
|
||||||
.layout-wrapper.layout-nav-type-vertical {
|
.layout-wrapper.layout-nav-type-vertical {
|
||||||
// TODO(v2): Check why we need height in vertical nav & min-height in horizontal nav
|
// TODO(v2): Check why we need height in vertical nav & min-height in horizontal nav
|
||||||
block-size: 100%;
|
block-size: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user