Skip to content

Commit

Permalink
fix(theme): hide extra navbar when no content (#1338)
Browse files Browse the repository at this point in the history
  • Loading branch information
meedfine committed Sep 14, 2022
1 parent 0672a69 commit 4482c50
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/theme-default/components/VPNavBarExtra.vue
Expand Up @@ -4,12 +4,15 @@ import VPFlyout from './VPFlyout.vue'
import VPMenuLink from './VPMenuLink.vue'
import VPSwitchAppearance from './VPSwitchAppearance.vue'
import VPSocialLinks from './VPSocialLinks.vue'
import { computed } from 'vue'
const { site, theme } = useData()
const hasExtraContent = computed(() => theme.value.localeLinks || site.value.appearance || theme.value.socialLinks)
</script>

<template>
<VPFlyout class="VPNavBarExtra" label="extra navigation">
<VPFlyout v-if="hasExtraContent" class="VPNavBarExtra" label="extra navigation">
<div v-if="theme.localeLinks" class="group">
<p class="trans-title">{{ theme.localeLinks.text }}</p>

Expand Down

0 comments on commit 4482c50

Please sign in to comment.