Files
portfolio/app/app.vue
Nicholas Kalar 0def745b98
Some checks failed
ci / ci (22, ubuntu-latest) (push) Failing after 42s
initial commit
2025-12-02 23:50:28 -05:00

65 lines
1.4 KiB
Vue

<script setup lang="ts">
const colorMode = useColorMode()
const color = computed(() => colorMode.value === 'dark' ? '#020618' : 'white')
useHead({
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ key: 'theme-color', name: 'theme-color', content: color }
],
link: [
{ rel: 'icon', href: '/favicon.ico' }
],
htmlAttrs: {
lang: 'en'
}
})
useSeoMeta({
titleTemplate: '%s',
ogImage: 'https://i.postimg.cc/ydfWjvKB/nick-kalar-main.png',
twitterImage: 'https://i.postimg.cc/ydfWjvKB/nick-kalar-main.png',
twitterCard: 'summary_large_image'
})
const [{ data: navigation }, { data: files }] = await Promise.all([
useAsyncData('navigation', () => {
return Promise.all([
queryCollectionNavigation('blog')
])
}, {
transform: data => data.flat()
}),
useLazyAsyncData('search', () => {
return Promise.all([
queryCollectionSearchSections('blog')
])
}, {
server: false,
transform: data => data.flat()
})
])
</script>
<template>
<UApp>
<NuxtLayout>
<UMain class="relative">
<NuxtPage />
</UMain>
</NuxtLayout>
<ClientOnly>
<LazyUContentSearch
:files="files"
:navigation="navigation"
shortcut="meta_k"
:links="navLinks"
:fuse="{ resultLimit: 42 }"
/>
</ClientOnly>
</UApp>
</template>