mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 15:31:46 +01:00
docs: bump @nuxt-themes/ui-kit
This commit is contained in:
36
docs/components/Header.vue
Normal file
36
docs/components/Header.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<UHeader>
|
||||
<template #left>
|
||||
<NuxtLink to="/getting-started" class="flex items-end gap-1.5 font-bold text-xl text-gray-900 dark:text-white">
|
||||
<Logo class="w-8 h-8 text-primary" />
|
||||
|
||||
<span class="hidden sm:block">NuxtLabs</span><span class="sm:text-primary">UI</span>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
||||
<template #center>
|
||||
<UDocsSearchButton class="ml-1.5 flg:w-64 xl:w-96" />
|
||||
</template>
|
||||
|
||||
<template #right>
|
||||
<ColorPicker />
|
||||
|
||||
<UColorModeButton />
|
||||
|
||||
<USocialButton to="https://twitter.com/nuxtlabs" target="_blank" icon="i-simple-icons-twitter" class="hidden lg:inline-flex" />
|
||||
<USocialButton to="https://github.com/nuxtlabs/ui" target="_blank" icon="i-simple-icons-github" class="hidden lg:inline-flex" />
|
||||
</template>
|
||||
|
||||
<template #panel>
|
||||
<UNavigationTree :links="mapContentNavigation(navigation)" />
|
||||
</template>
|
||||
</UHeader>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { NavItem } from '@nuxt/content/dist/runtime/types'
|
||||
|
||||
const { mapContentNavigation } = useElementsHelpers()
|
||||
|
||||
const navigation = inject<Ref<NavItem[]>>('navigation')
|
||||
</script>
|
||||
@@ -1,11 +1,11 @@
|
||||
<script setup>
|
||||
const commandPaletteRef = ref()
|
||||
|
||||
const links = inject('links')
|
||||
const navigation = inject('navigation')
|
||||
|
||||
const { data: files } = await useLazyAsyncData('search', () => queryContent().where({ _type: 'markdown' }).find(), { default: () => [] })
|
||||
|
||||
const groups = computed(() => links.value.map(item => ({
|
||||
const groups = computed(() => navigation.value.map(item => ({
|
||||
key: item.to,
|
||||
label: item.label,
|
||||
commands: files.value.filter(file => file._path.startsWith(item.to)).map(file => ({
|
||||
|
||||
Reference in New Issue
Block a user