-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
117 lines (110 loc) · 2.66 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<template>
<div>
<Html :lang="head.htmlAttrs?.lang">
<Head>
<Title>{{ title }}</Title>
<template v-for="(link, index) in head.link" :key="index">
<Link :hid="link.hid" :rel="link.rel" :href="link.href" :hreflang="link.hreflang" />
</template>
<template v-for="(meta, index) in head.meta" :key="index">
<Meta :hid="meta.hid" :property="meta.property" :content="meta.content" />
</template>
</Head>
<Body>
<nuxt-layout>
<nuxt-page />
</nuxt-layout>
</Body>
</Html>
</div>
</template>
<script setup lang="ts">
const { t } = useI18n()
const route = useRoute()
const head = useLocaleHead({ addSeoAttributes: true })
const title = computed(() => t('base.title', { title: t(route.meta.title as string ?? 'Soon !') }))
const metaDescription = computed(() => t(route.meta.description as string ?? ''))
useHead({
link: [
{
rel: 'icon',
type: 'image/png',
href: '/favicon-16x16.png'
},
{
rel: 'icon',
type: 'image/png',
href: '/favicon-32x32.png'
},
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap',
},
{
rel: 'stylesheet',
href: 'https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap',
}
],
script: [],
meta: [
{ charset: 'utf-8' },
{
hid: 'og:title',
name: 'og:title',
content: title
},
{
hid: 'og:description',
name: 'og:description',
content: metaDescription
},
{
hid: 'description',
name: 'description',
content: metaDescription
},
{
hid: 'og:type',
name: 'og:type',
content: 'website'
},
{
hid: 'og:url',
name: 'og:url',
content: 'http://localhost:3000/'
},
{
hid: 'og:title',
name: 'og:title',
content: 'Roro Transport'
},
{
hid: 'og:site_name',
name: 'og:site_name',
content: 'Roro Transport'
},
{
hid: 'og:image',
name: 'og:image',
content: 'http://localhost:3000/' + 'full-truck.jpg'
},
{
'http-equiv': 'x-ua-compatible',
content: 'IE=edge'
},
{
name: 'viewport',
content: 'width=device-width, initial-scale=1, shrink-to-fit=no'
},
{
name: 'format-detection',
content: 'telephone=no'
}
]
})
</script>
<style>
html {
scroll-behavior: smooth;
}
</style>