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
+5 -5
View File
@@ -25,20 +25,20 @@
- [ ] Fetch name from LDAP - [ ] Fetch name from LDAP
- [ ] Social Login - [ ] Social Login
- **Hunt Admin** - **Hunt Admin**
- [ ] Create hunt - [x] Create hunt
- [ ] Add Questions - [x] Add Questions
- [ ] View Answers on Map - [ ] View Answers on Map
- [x] Image Diashow - [x] Image Diashow
- **Hunt User** - **Hunt User**
- [x] View all images on one page - [x] View all images on one page
- [x] i18n data - [x] i18n data
- [ ] Mark image as private - [x] Mark image as private
- [ ] How-to/Guide/Good explanation - [ ] How-to/Guide/Good explanation
- [ ] Leave/Remove/Edit team - [x] Leave/Remove/Edit team
- [ ] Support chat - [ ] Support chat
- [ ] Copy team from different hunt - [ ] Copy team from different hunt
- [ ] Get Geo-Location - [ ] Get Geo-Location
- [ ] View other answers - [-] View other answers
- [ ] View other reviews and scores - [ ] View other reviews and scores
- [x] Process image uploads (resize, remove EXIF, etc.) - [x] Process image uploads (resize, remove EXIF, etc.)
- [ ] Review other answers (Fan-Favorite) - [ ] Review other answers (Fan-Favorite)
+2 -12
View File
@@ -22,19 +22,9 @@ const { s3Bucket, s3Host } = useRuntimeConfig().public;
> >
<Head> <Head>
<Title>{{ title }}</Title> <Title>{{ title }}</Title>
<template v-for="link in head.link" :key="link.id"> <Link v-for="link in head.link" :key="link.id" v-bind="link" />
<Link
:id="link.id"
:rel="link.rel"
:href="link.href"
:hreflang="link.hreflang"
/>
</template>
<Link rel="dns-prefetch" :href="`https://${s3Bucket}.${s3Host}/`" />
<Link rel="preconnect" :href="`https://${s3Bucket}.${s3Host}/`" /> <Link rel="preconnect" :href="`https://${s3Bucket}.${s3Host}/`" />
<template v-for="meta in head.meta" :key="meta.id"> <Meta v-for="meta in head.meta" :key="meta.id" v-bind="meta" />
<Meta :id="meta.id" :property="meta.property" :content="meta.content" />
</template>
</Head> </Head>
<Body> <Body>
<NuxtLoadingIndicator /> <NuxtLoadingIndicator />
+5 -3
View File
@@ -176,12 +176,12 @@
"how_it_works": "So funktioniert es", "how_it_works": "So funktioniert es",
"login_to_see_hunts": "Melde dich an, um deine beigetretenen Hunts zu sehen und neuen beizutreten!", "login_to_see_hunts": "Melde dich an, um deine beigetretenen Hunts zu sehen und neuen beizutreten!",
"step_number": "Schritt {n}", "step_number": "Schritt {n}",
"step_quests_text": "Erkunde die Quests, mache kreative Fotos und reiche deine Antworten ein.",
"step_quests_title": "Quests erfüllen",
"step_register_text": "Erstelle in Sekunden ein kostenloses Konto und erhalte Zugang zu allen Hunts.", "step_register_text": "Erstelle in Sekunden ein kostenloses Konto und erhalte Zugang zu allen Hunts.",
"step_register_title": "Registrieren", "step_register_title": "Registrieren",
"step_team_text": "Gründe ein Team mit Freunden oder tritt einem bestehenden Team mit einem Einladungscode bei.", "step_team_text": "Gründe ein Team mit Freunden oder tritt einem bestehenden Team mit einem Einladungscode bei.",
"step_team_title": "Team gründen", "step_team_title": "Team gründen",
"step_quests_text": "Erkunde die Quests, mache kreative Fotos und reiche deine Antworten ein.",
"step_quests_title": "Quests erfüllen",
"step_win_text": "Sammle Punkte, klettere die Rangliste hinauf und feiere in der Showcase.", "step_win_text": "Sammle Punkte, klettere die Rangliste hinauf und feiere in der Showcase.",
"step_win_title": "Punkte gewinnen" "step_win_title": "Punkte gewinnen"
}, },
@@ -205,6 +205,7 @@
"role_changed": "Rolle aktualisiert!", "role_changed": "Rolle aktualisiert!",
"role_confirm": "Möchtest du die Rolle von {name} zu {role} ändern?", "role_confirm": "Möchtest du die Rolle von {name} zu {role} ändern?",
"search_user": "Benutzer per E-Mail suchen...", "search_user": "Benutzer per E-Mail suchen...",
"title": "Profil",
"uploaded_pictures": "Hochgeladene Bilder", "uploaded_pictures": "Hochgeladene Bilder",
"user_management": "Benutzerverwaltung" "user_management": "Benutzerverwaltung"
}, },
@@ -281,6 +282,7 @@
}, },
"teams": "Teams", "teams": "Teams",
"third_place": "Dritter Platz", "third_place": "Dritter Platz",
"title": "Abschluss",
"total_points": "Punkte erzielt", "total_points": "Punkte erzielt",
"users": "Spieler" "users": "Spieler"
} }
@@ -367,4 +369,4 @@
"uploadFile": "Datei hochladen", "uploadFile": "Datei hochladen",
"voteRating": "vote rating {value} of {max}" "voteRating": "vote rating {value} of {max}"
} }
} }
+5 -3
View File
@@ -176,12 +176,12 @@
"how_it_works": "How it works", "how_it_works": "How it works",
"login_to_see_hunts": "Login to see your joined hunts and join new ones!", "login_to_see_hunts": "Login to see your joined hunts and join new ones!",
"step_number": "Step {n}", "step_number": "Step {n}",
"step_quests_text": "Explore the quests, take creative photos and submit your answers.",
"step_quests_title": "Complete quests",
"step_register_text": "Create a free account in seconds and get access to all hunts.", "step_register_text": "Create a free account in seconds and get access to all hunts.",
"step_register_title": "Register", "step_register_title": "Register",
"step_team_text": "Team up with friends or join an existing team with an invite code.", "step_team_text": "Team up with friends or join an existing team with an invite code.",
"step_team_title": "Form a team", "step_team_title": "Form a team",
"step_quests_text": "Explore the quests, take creative photos and submit your answers.",
"step_quests_title": "Complete quests",
"step_win_text": "Collect points, climb the leaderboard and celebrate in the showcase.", "step_win_text": "Collect points, climb the leaderboard and celebrate in the showcase.",
"step_win_title": "Win points" "step_win_title": "Win points"
}, },
@@ -205,6 +205,7 @@
"role_changed": "Role updated!", "role_changed": "Role updated!",
"role_confirm": "Do you want to change the role of {name} to {role}?", "role_confirm": "Do you want to change the role of {name} to {role}?",
"search_user": "Search user by email...", "search_user": "Search user by email...",
"title": "Profile",
"uploaded_pictures": "Uploaded pictures", "uploaded_pictures": "Uploaded pictures",
"user_management": "User management" "user_management": "User management"
}, },
@@ -281,6 +282,7 @@
}, },
"teams": "Teams", "teams": "Teams",
"third_place": "Third place", "third_place": "Third place",
"title": "Showcase",
"total_points": "Total points earned", "total_points": "Total points earned",
"users": "Users" "users": "Users"
} }
@@ -367,4 +369,4 @@
"uploadFile": "Upload file", "uploadFile": "Upload file",
"voteRating": "vote rating {value} of {max}" "voteRating": "vote rating {value} of {max}"
} }
} }
+7
View File
@@ -15,6 +15,13 @@ const app = useNuxtApp();
const { name, id } = app.$slugData.huntSlug!; const { name, id } = app.$slugData.huntSlug!;
const { data, error } = await useFetch(`/api/hunt/${id}/showcase`); 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 { toggle, isFullscreen, isSupported } = useFullscreen();
const leaderboardColumns: DataTableColumnSource[] = [ const leaderboardColumns: DataTableColumnSource[] = [
+14
View File
@@ -19,6 +19,20 @@ const steps = [
{ icon: 'photo_camera', key: 'step_quests' }, { icon: 'photo_camera', key: 'step_quests' },
{ icon: 'emoji_events', key: 'step_win' } { 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> </script>
<template> <template>
+5
View File
@@ -18,6 +18,11 @@ watch(loggedIn, (isLoggedIn) => {
}); });
const { data, refresh, pending } = await useFetch('/api/auth/profile'); const { data, refresh, pending } = await useFetch('/api/auth/profile');
useHead({
title: t('layouts.title', {
title: t('page.profile.title')
})
});
const form = reactive({ const form = reactive({
email: data.value!.email, email: data.value!.email,
name: data.value!.name name: data.value!.name
+1
View File
@@ -42,6 +42,7 @@ export default defineEventHandler(async (event) => {
console.warn(`Successful register: ${email}`); console.warn(`Successful register: ${email}`);
await setUserSession(event, { await setUserSession(event, {
loggedInAt: new Date().toISOString(),
user: user user: user
}); });