-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
42 lines (36 loc) · 993 Bytes
/
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
<script setup lang="ts">
const colorMode = useColorMode();
const route = useRoute();
const color = computed(() => colorMode.value === "dark" ? "#111827" : "#f1f5f9");
useHead({
titleTemplate: (titleChunk) => {
if (route.meta.title || titleChunk) {
return `${titleChunk || route.meta.title} | Nuxt 3 + Nuxt UI Starter Template`;
}
return "Home - Nuxt 3 + Nuxt UI Starter Template";
},
meta: [
{ name: "viewport", content: "width=device-width, initial-scale=1" },
{ key: "theme-color", name: "theme-color", content: color },
],
link: [
{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" },
],
htmlAttrs: {
lang: "en",
},
});
const layout = computed(() => {
const isTourRoute = route.path.includes("/tour");
return isTourRoute ? "tour" : "default";
});
</script>
<template>
<div class="font-manrope w-screen overflow-hidden">
<NuxtLayout
:name="layout"
>
<NuxtPage />
</NuxtLayout>
</div>
</template>