mirror of
https://github.com/NotXia/notxia.github.io.git
synced 2025-12-14 19:01:51 +01:00
Migration to Nuxt3
This commit is contained in:
43
app.vue
Normal file
43
app.vue
Normal file
@ -0,0 +1,43 @@
|
||||
<template>
|
||||
|
||||
<div v-if="init"
|
||||
class="bg-gray-100 text-gray-900 min-h-screen h-full
|
||||
dark:bg-gray-900 dark:text-slate-50"
|
||||
style="font-family: 'Comfortaa'; overflow-x: hidden; ">
|
||||
|
||||
<!-- Prevents scrollbar shift -->
|
||||
<div style="margin-right: calc(-1 * (100vw - 100%));">
|
||||
<div class="container mx-auto pb-8 px-3 md:px-8 min-h-screen w-screen flex flex-col">
|
||||
<NuxtLayout>
|
||||
<NuxtPage/>
|
||||
</NuxtLayout>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Cookie />
|
||||
<EastereggBanner ref="easteregg" />
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const { locale } = useI18n();
|
||||
const easteregg = ref();
|
||||
const init = ref(false);
|
||||
|
||||
onMounted(() => {
|
||||
applyTheme();
|
||||
|
||||
document.addEventListener("easteregg", (e) => {
|
||||
// @ts-ignore
|
||||
easteregg.value.show(e.detail);
|
||||
});
|
||||
|
||||
init.value = true;
|
||||
});
|
||||
|
||||
useHead({ htmlAttrs: { lang: locale.value } });
|
||||
watch(locale, (new_locale) => {
|
||||
useHead({ htmlAttrs: { lang: new_locale } });
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user