refactor(app): simplify head link and meta rendering, add more titles and descriptions

This commit is contained in:
2026-07-31 19:22:48 +02:00
parent 0f49f20c07
commit 5fe4557d94
8 changed files with 44 additions and 23 deletions
+7
View File
@@ -15,6 +15,13 @@ const app = useNuxtApp();
const { name, id } = app.$slugData.huntSlug!;
const { data, error } = await useFetch(`/api/hunt/${id}/showcase`);
useHead({
title: t('layouts.two_title', {
title: tKey(data.value ?? { name_de: name, name_en: name }, 'name').value,
subtitle: t('page.showcase.title')
})
});
const { toggle, isFullscreen, isSupported } = useFullscreen();
const leaderboardColumns: DataTableColumnSource[] = [
+14
View File
@@ -19,6 +19,20 @@ const steps = [
{ icon: 'photo_camera', key: 'step_quests' },
{ icon: 'emoji_events', key: 'step_win' }
];
useHead({
title: t('layouts.default_tile'),
meta: [
{
property: 'og:title',
content: t('page.landing.hero_title')
},
{
property: 'og:description',
content: t('page.landing.hero_subtitle')
}
]
});
</script>
<template>
+5
View File
@@ -18,6 +18,11 @@ watch(loggedIn, (isLoggedIn) => {
});
const { data, refresh, pending } = await useFetch('/api/auth/profile');
useHead({
title: t('layouts.title', {
title: t('page.profile.title')
})
});
const form = reactive({
email: data.value!.email,
name: data.value!.name