-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.vue
38 lines (33 loc) · 1.04 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
<template>
<div class="flex flex-col min-h-screen">
<DesktopMenu :items="menu.items" class="hidden md:block" />
<MobileMenu :items="menu.items" class="block md:hidden" />
<NuxtPage class="flex-grow"/>
<SogFooter
:items="footer.items"
:social-icons="footer.socialIcons"
:awards="footer.awards"
/>
</div>
</template>
<script setup lang="ts">
import { useData } from '@/types/composables'
const { locale } = useI18n()
const i18nHead = useLocaleHead({ addSeoAttributes: true })
useHead({
htmlAttrs: {
lang: locale.value,
},
title: i18nHead.value.title,
meta: [
{
hid: 'description',
name: 'description',
content: i18nHead.value.description,
},
],
link: [{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }],
})
const menu = await useData(`menu-${locale.value}`, () => queryContent(locale.value, 'menu').findOne(), {watch: [locale]})
const footer = await useData(`footer-${locale.value}`, () => queryContent(locale.value, 'footer').findOne(), {watch: [locale]})
</script>