-
Notifications
You must be signed in to change notification settings - Fork 22
/
app.vue
69 lines (57 loc) · 1.65 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<script setup lang="ts">
import { Sonner } from '@/components/ui/sonner'
import { ConfigProvider } from 'radix-vue'
const colorMode = useColorMode()
const color = computed(() => colorMode.value === 'dark' ? '#09090b' : '#ffffff')
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',
},
})
const { theme, radius } = useCustomize()
useServerHead({
bodyAttrs: {
class: `theme-${theme.value}`,
style: `--radius: ${radius.value}rem;`,
},
})
const title = 'Nuxt Shadcn UI - Dashboard Template'
const description = 'This dashboard, built with Nuxt, Shadcn UI, and UnoCSS. It includes a dark mode toggle and is optimized for performance and data efficiency.'
useSeoMeta({
title,
description,
ogTitle: title,
ogDescription: description,
ogUrl: 'https://dashboard.dianprata.com',
ogImage: 'https://nuxt-shadcn-dashboard.vercel.app/social-card.png',
twitterTitle: title,
twitterDescription: description,
twitterImage: 'https://nuxt-shadcn-dashboard.vercel.app/social-card.png',
twitterCard: 'summary_large_image',
})
const router = useRouter()
defineShortcuts({
'G-H': () => router.push('/'),
'G-E': () => router.push('/email'),
})
const useIdFunction = () => useId()
</script>
<template>
<ConfigProvider :use-id="useIdFunction">
<div vaul-drawer-wrapper>
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
<Toaster />
<Sonner class="pointer-events-auto" />
</ConfigProvider>
</template>