Skip to content

Commit e5cc98a

Browse files
committed
docs: fix navbar logo
1 parent 2632858 commit e5cc98a

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

packages/docs/components/content/Logo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<script setup>
1+
<script setup lang="ts">
22
const colorMode = useColorMode()
33
</script>
44

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<script setup lang="ts">
2+
const { navigation } = useContent()
3+
const { hasDocSearch } = useDocSearch()
4+
5+
const hasNavbarDialog = computed(() => navigation.value?.length > 1)
6+
</script>
7+
8+
<template>
9+
<header class="sticky top-0 z-10 w-full border-b h-header u-border-gray-100 bg-white/80 dark:bg-black/80">
10+
<AppContainer padded class="grid h-full grid-cols-12 lg:gap-8">
11+
<div class="flex items-center flex-none col-span-2">
12+
<NavbarDialog v-if="hasNavbarDialog" />
13+
<div :class="hasNavbarDialog ? 'hidden lg:block' : 'block'">
14+
<NavbarLogo class="min-w-max" />
15+
</div>
16+
</div>
17+
18+
<div class="flex items-center justify-center flex-1 col-span-8">
19+
<NavbarLogo v-if="hasNavbarDialog" class="lg:hidden" />
20+
<NavbarCenter class="hidden lg:flex" />
21+
</div>
22+
23+
<div class="flex items-center justify-end flex-none col-span-2 lg:gap-4 lg:pl-4">
24+
<AppSearch v-if="hasDocSearch" />
25+
<ColorModeSwitch size="w-5 h-5" :class="hasDocSearch ? 'hidden lg:block' : ''" />
26+
<SocialIcons size="h-5 w-5 hidden lg:block" />
27+
</div>
28+
</AppContainer>
29+
</header>
30+
</template>
31+
32+
<style scoped>
33+
header {
34+
backdrop-filter: saturate(180%) blur(20px);
35+
}
36+
</style>

0 commit comments

Comments
 (0)