-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.vue
83 lines (76 loc) · 1.62 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
<script lang="ts" setup>
import AOS from 'aos'
onMounted(() => {
AOS.init({
duration: 1000,
delay: 150,
})
})
const htmlClasses = [
'scroll-smooth',
]
const bodyClasses = [
'overflow-x-hidden',
'antialiased',
'bg-primary',
'text-white',
'bg-gradient-to-bl',
'from-primary',
'via-secondary/5',
'to-secondary/30',
]
const { $localeHead, $i18n } = useNuxtApp()
const i18nHead = $localeHead({ addSeoAttributes: true })
useHead({
htmlAttrs: {
...i18nHead.htmlAttrs,
class: htmlClasses.join(' '),
},
bodyAttrs: {
class: bodyClasses.join(' '),
},
link: [
...(i18nHead.link ?? []),
{ rel: 'icon', type: 'image/png', sizes: '32x32', href: '/favicon-32x32.png' },
{ rel: 'icon', type: 'image/png', sizes: '16x16', href: '/favicon-16x16.png' },
{ rel: 'mask-icon', href: '/safari-pinned-tab.svg', color: '#0f172a' },
],
meta: [
...(i18nHead.meta ?? []),
{
name: 'theme-color',
content: '#0f172a',
},
{
name: 'og:image',
content: 'https://tomasdebacker.be/img/logo/social-preview.png',
},
{
name: 'og:image:width',
content: 1200,
},
{
name: 'og:image:height',
content: 627,
},
],
})
const nuxtApp = useNuxtApp()
const loading = ref(false)
nuxtApp.hook('page:start', () => {
loading.value = true
})
nuxtApp.hook('page:finish', () => {
loading.value = false
})
</script>
<template>
<div relative min-h-screen>
<FullScreenLoader v-if="loading" />
<AppHeader />
<main pb-10 container mx-auto>
<NuxtPage />
</main>
<AppFooter absolute bottom-0 w-full />
</div>
</template>