From 8f550206147121d73b9e534062d3ce970c6d1007 Mon Sep 17 00:00:00 2001 From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com> Date: Sat, 5 Apr 2025 17:24:14 +0530 Subject: [PATCH] cleanup --- .../theme-default/components/VPLocalNav.vue | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/client/theme-default/components/VPLocalNav.vue b/src/client/theme-default/components/VPLocalNav.vue index 82c83a2e..e14db10e 100644 --- a/src/client/theme-default/components/VPLocalNav.vue +++ b/src/client/theme-default/components/VPLocalNav.vue @@ -13,8 +13,8 @@ defineEmits<{ (e: 'open-menu'): void }>() -const { theme, frontmatter } = useData() -const { hasSidebar, headers } = useLayout() +const { theme } = useData() +const { isHome, hasSidebar, headers, hasLocalNav } = useLayout() const { y } = useWindowScroll() const navHeight = ref(0) @@ -27,27 +27,19 @@ onMounted(() => { ) }) -const empty = computed(() => { - return headers.value.length === 0 -}) - -const emptyAndNoSidebar = computed(() => { - return empty.value && !hasSidebar.value -}) - const classes = computed(() => { return { VPLocalNav: true, 'has-sidebar': hasSidebar.value, - empty: empty.value, - fixed: emptyAndNoSidebar.value + empty: !hasLocalNav.value, + fixed: !hasLocalNav.value && !hasSidebar.value, } })