Skip to content

Commit 4482c50

Browse files
authored
fix(theme): hide extra navbar when no content (#1338)
1 parent 0672a69 commit 4482c50

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/client/theme-default/components/VPNavBarExtra.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ import VPFlyout from './VPFlyout.vue'
44
import VPMenuLink from './VPMenuLink.vue'
55
import VPSwitchAppearance from './VPSwitchAppearance.vue'
66
import VPSocialLinks from './VPSocialLinks.vue'
7+
import { computed } from 'vue'
78
89
const { site, theme } = useData()
10+
11+
const hasExtraContent = computed(() => theme.value.localeLinks || site.value.appearance || theme.value.socialLinks)
912
</script>
1013

1114
<template>
12-
<VPFlyout class="VPNavBarExtra" label="extra navigation">
15+
<VPFlyout v-if="hasExtraContent" class="VPNavBarExtra" label="extra navigation">
1316
<div v-if="theme.localeLinks" class="group">
1417
<p class="trans-title">{{ theme.localeLinks.text }}</p>
1518

0 commit comments

Comments
 (0)