Skip to content

Commit

Permalink
chore: rearrange navigation items
Browse files Browse the repository at this point in the history
  • Loading branch information
katharinawuensche committed Sep 30, 2024
1 parent bfcdb41 commit 2d7d56b
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 6 deletions.
24 changes: 18 additions & 6 deletions components/app-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,23 @@ const t = useTranslations();
const links = computed(() => {
return {
home: { href: { path: "/" }, label: t("AppHeader.links.home") },
search: { href: { path: "/search/persons" }, label: t("AppHeader.links.search") },
scans: { href: { path: "/iiif" }, label: t("AppHeader.links.scans") },
network: { href: { path: "/network" }, label: t("AppHeader.links.network") },
} satisfies Record<string, { href: NavLinkProps["href"]; label: string }>;
home: { href: { path: "/" }, label: t("AppHeader.links.home"), title: "" },
search: {
href: { path: "/search/persons" },
label: t("AppHeader.links.search"),
title: t("AppHeader.links.search"),
},
network: {
href: { path: "/network" },
label: t("AppHeader.links.network"),
title: t("AppHeader.linkTitle.network"),
},
scans: {
href: { path: "/iiif" },
label: t("AppHeader.links.scans"),
title: t("AppHeader.linkTitle.scans"),
},
} satisfies Record<string, { href: NavLinkProps["href"]; label: string; title?: string }>;
});
</script>

Expand All @@ -20,7 +32,7 @@ const links = computed(() => {
<div class="flex items-center justify-between gap-4 p-6 md:p-8">
<nav :aria-label="t('AppHeader.navigation-main')">
<ul class="flex items-center gap-4" role="list">
<li v-for="(link, key) of links" :key="key">
<li v-for="(link, key) of links" :key="key" :title="link.title ?? ''">
<NavLink :href="link.href">
{{ link.label }}
</NavLink>
Expand Down
4 changes: 4 additions & 0 deletions messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"scans": "Scans",
"network": "Netzwerk"
},
"linkTitle": {
"network": "Netzwerkvisualisierung",
"scans": "Gescannte Rait- und Kopialbücher"
},
"navigation-main": "Hauptnavigation"
},
"ColorSchemeToggle": {
Expand Down
4 changes: 4 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"scans": "Scans",
"network": "Network"
},
"linkTitle": {
"network": "",
"scans": ""
},
"navigation-main": "Main"
},
"ColorSchemeToggle": {
Expand Down

0 comments on commit 2d7d56b

Please sign in to comment.