Skip to content

Commit

Permalink
feat(outline): do not observe footer, expect outline to be hidden by …
Browse files Browse the repository at this point in the history
…footer

Signed-off-by: Stefan Pfaffel <s.pfaffel@gmail.com>
  • Loading branch information
stfsy committed Jan 12, 2025
1 parent 42567a6 commit 064fe40
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/outline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@
<script setup>
import { usePageData, useRoute, useRouter } from '@vuepress/client';
import { computed, onMounted, ref } from 'vue';
import observe from './observer.js';
import SubMenu from './sub-menu.vue';
const headers = ref([]);
const router = useRouter();
const route = useRoute();
const page = usePageData()
const isFooterVisible = observe('footer')
const isRootPage = computed(() => {
const { path } = page.value
Expand All @@ -47,7 +45,7 @@ const visible = computed(() => {
if (isRootPage.value) {
return false
}
return headers.value.length > 0 && isFooterVisible.value === false
return headers.value.length > 0
})
router.afterEach((_to, _from, failure) => {
Expand Down

0 comments on commit 064fe40

Please sign in to comment.