From 5d6741ac50519377515727e96d43e190a4e8685d Mon Sep 17 00:00:00 2001 From: ahmedriad1 Date: Wed, 20 Mar 2024 15:49:52 +0200 Subject: [PATCH] minor changes --- locales/en-US/common.json | 2 +- src/app/_components/footer/index.tsx | 14 +++++++++++--- src/app/_components/navbar/navigation-menu.tsx | 11 +++++++---- src/components/ui/dropdown-menu/index.tsx | 4 ++-- src/components/ui/select/index.tsx | 2 +- 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/locales/en-US/common.json b/locales/en-US/common.json index f30142c9..67dc74e7 100644 --- a/locales/en-US/common.json +++ b/locales/en-US/common.json @@ -106,7 +106,7 @@ } }, "footer": { - "headline": "Digital Seem - the world's largest Islamic library", + "headline": "Digital Seem - the World's largest Islamic library", "description": "Digitalseem.org serves over 8,000 Islamic texts from the OpenITI corpus. Our goal is to make it easy to read, search, and research classical texts. Subscribe below to receive monthly updates on our work.", "email-address": "Email Address", "subscribe": "Subscribe", diff --git a/src/app/_components/footer/index.tsx b/src/app/_components/footer/index.tsx index 8f058caf..3693694e 100644 --- a/src/app/_components/footer/index.tsx +++ b/src/app/_components/footer/index.tsx @@ -3,6 +3,7 @@ import NewsletterForm from "@/components/newsletter-form"; import Container from "@/components/ui/container"; import { getLocaleDirection } from "@/lib/locale/client"; import { navigation as urls } from "@/lib/urls"; +import { cn } from "@/lib/utils"; import { Link } from "@/navigation"; import type { NamespaceTranslations } from "@/types/NamespaceTranslations"; import { useLocale, useTranslations } from "next-intl"; @@ -16,8 +17,11 @@ type NavItem = { const navigation = { tools: [ { label: "navigation.tools.advanced-search.title" }, - { label: "navigation.tools.text-explorer.title" }, - { label: "navigation.tools.author-explorer.title" }, + { label: "navigation.tools.text-explorer.title", href: urls.books.all() }, + { + label: "navigation.tools.author-explorer.title", + href: urls.authors.all(), + }, ] satisfies NavItem[], explore: [ { label: "navigation.explore.texts.title", href: urls.books.all() }, @@ -74,7 +78,11 @@ const FooterRow = ({ title, items }: { title: string; items: NavItem[] }) => { } else { link = ( {t(item.label)}

} + trigger={ +

+ {t(item.label)} +

+ } /> ); } diff --git a/src/app/_components/navbar/navigation-menu.tsx b/src/app/_components/navbar/navigation-menu.tsx index c9697954..04c4bb67 100644 --- a/src/app/_components/navbar/navigation-menu.tsx +++ b/src/app/_components/navbar/navigation-menu.tsx @@ -8,6 +8,7 @@ import { NavigationMenuList, NavigationMenuTrigger, } from "@/components/ui/navigation-menu"; +import { navigation } from "@/lib/urls"; import { cn } from "@/lib/utils"; import { Link } from "@/navigation"; import type { NamespaceTranslations } from "@/types/NamespaceTranslations"; @@ -29,31 +30,33 @@ const toolsItems: NavItem[] = [ { title: "navigation.tools.text-explorer.title", description: "navigation.tools.text-explorer.description", + href: navigation.books.all(), }, { title: "navigation.tools.author-explorer.title", description: "navigation.tools.author-explorer.description", + href: navigation.authors.all(), }, ]; const exploreItems: NavItem[] = [ { - href: "/texts", + href: navigation.books.all(), title: "navigation.explore.texts.title", description: "navigation.explore.texts.description", }, { - href: "/authors", + href: navigation.authors.all(), title: "navigation.explore.authors.title", description: "navigation.explore.authors.description", }, { - href: "/regions", + href: navigation.regions.all(), title: "navigation.explore.regions.title", description: "navigation.explore.regions.description", }, { - href: "/genres", + href: navigation.genres.all(), title: "navigation.explore.genres.title", description: "navigation.explore.genres.description", }, diff --git a/src/components/ui/dropdown-menu/index.tsx b/src/components/ui/dropdown-menu/index.tsx index e65a88ac..14b65332 100644 --- a/src/components/ui/dropdown-menu/index.tsx +++ b/src/components/ui/dropdown-menu/index.tsx @@ -88,7 +88,7 @@ const DropdownMenuItem = React.forwardRef<