diff --git a/app/app.vue b/app/app.vue index bce71d7..790c6f6 100644 --- a/app/app.vue +++ b/app/app.vue @@ -22,7 +22,6 @@ useHead({ body { font-family: 'DM Sans', sans-serif; - @apply text-red-200; } .sofia { diff --git a/app/components/AppHeader.vue b/app/components/AppHeader.vue index 6ac5fcc..dfc40da 100644 --- a/app/components/AppHeader.vue +++ b/app/components/AppHeader.vue @@ -97,12 +97,18 @@ const currentLocale = computed(() => locales.value.filter(l => l.code === locale const lang = ref(locale.value) watch(lang, () => changeLocale(lang.value)) -async function changeLocale(newLocale: string) { +async function changeLocale(newLocale?: string) { document.body.style.animation = 'switch-on .2s' await new Promise(resolve => setTimeout(resolve, 200)) - await setLocale(newLocale as 'en' | 'fr' | 'es') - document.body.style.animation = 'switch-off .2s' + if (newLocale) { + await setLocale(newLocale as 'en' | 'fr' | 'es') + } + else { + newLocale = currentLocale.value!.code === 'en' ? 'fr' : currentLocale.value!.code === 'fr' ? 'es' : 'en' + await setLocale(newLocale as 'en' | 'fr' | 'es') + } + document.body.style.animation = 'switch-off .5s' await new Promise(resolve => setTimeout(resolve, 200)) document.body.style.animation = '' @@ -113,7 +119,7 @@ const openContactDrawer = ref(false) const router = useRouter() defineShortcuts({ t: () => startViewTransition({ clientX: window.innerWidth, clientY: 0 }), - l: () => openSelectMenu.value = !openSelectMenu.value, + l: () => changeLocale(), c: () => openContactDrawer.value = !openContactDrawer.value, backspace: () => router.back(), }) diff --git a/app/error.vue b/app/error.vue new file mode 100644 index 0000000..15dcd5c --- /dev/null +++ b/app/error.vue @@ -0,0 +1,13 @@ + diff --git a/nuxt.config.ts b/nuxt.config.ts index 9995e0d..14c0aeb 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -40,7 +40,6 @@ export default defineNuxtConfig({ content: { preview: { api: 'https://api.nuxt.studio', - dev: true, }, build: { markdown: {