2024-10-04 14:43:02 +10:00
|
|
|
<template>
|
2026-01-13 15:32:39 +11:00
|
|
|
<div
|
|
|
|
|
v-if="!clientRequest"
|
|
|
|
|
class="flex flex-col w-full min-h-screen bg-zinc-900"
|
|
|
|
|
>
|
2025-11-20 03:02:56 +00:00
|
|
|
<LazyUserHeader class="z-50" hydrate-on-idle />
|
2024-10-07 22:35:54 +11:00
|
|
|
<div class="grow flex">
|
|
|
|
|
<NuxtPage />
|
|
|
|
|
</div>
|
2025-11-20 03:02:56 +00:00
|
|
|
<LazyUserFooter class="z-50" hydrate-on-interaction />
|
2024-10-17 21:04:32 +11:00
|
|
|
</div>
|
2026-02-06 00:12:24 +11:00
|
|
|
<div v-else class="flex flex-col w-full min-h-screen bg-zinc-900">
|
2024-12-27 12:43:42 +11:00
|
|
|
<NuxtPage />
|
2026-02-06 00:12:24 +11:00
|
|
|
<LazyUserHeaderStoreNav />
|
2024-12-27 12:43:42 +11:00
|
|
|
</div>
|
2024-10-04 15:35:03 +10:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2026-01-13 15:32:39 +11:00
|
|
|
const clientRequest = isClientRequest();
|
2025-06-07 23:49:43 -04:00
|
|
|
const i18nHead = useLocaleHead();
|
2024-12-27 12:43:42 +11:00
|
|
|
|
2025-06-05 14:53:19 +10:00
|
|
|
const { t } = useI18n();
|
|
|
|
|
|
2024-10-04 15:35:03 +10:00
|
|
|
useHead({
|
2025-04-07 16:13:57 -04:00
|
|
|
htmlAttrs: {
|
2025-06-07 23:49:43 -04:00
|
|
|
lang: i18nHead.value.htmlAttrs.lang,
|
|
|
|
|
// @ts-expect-error head.value.htmlAttrs.dir is not typed as strictly as it should be
|
|
|
|
|
dir: i18nHead.value.htmlAttrs.dir,
|
2025-04-07 16:13:57 -04:00
|
|
|
},
|
2025-06-07 23:49:43 -04:00
|
|
|
// // seo headers
|
|
|
|
|
// link: [...i18nHead.value.link],
|
|
|
|
|
// meta: [...i18nHead.value.meta],
|
2024-10-07 22:35:54 +11:00
|
|
|
titleTemplate(title) {
|
2025-06-05 14:53:19 +10:00
|
|
|
return title ? t("titleTemplate", [title]) : t("title");
|
2024-10-07 22:35:54 +11:00
|
|
|
},
|
|
|
|
|
});
|
2026-02-06 00:43:21 +00:00
|
|
|
const { mLogoObjectId } = await $dropFetch("/api/v1");
|
|
|
|
|
const favicon = mLogoObjectId ? useObject(mLogoObjectId) : "/favicon.ico";
|
|
|
|
|
useFavicon(favicon, { rel: "icon" });
|
2024-10-07 22:35:54 +11:00
|
|
|
</script>
|