categories page internationalization added
This commit is contained in:
parent
c11764a4c0
commit
693664017c
@ -8,6 +8,8 @@ import Link from "next/link";
|
||||
import Pagination from "../components/pagination/pagination";
|
||||
import NoDataFounded from "../components/no-data-founded/noDataFounded";
|
||||
import { Metadata } from "next";
|
||||
import { getDictionary } from "@/app/lib/functions/dictionaries";
|
||||
import { getDefaultLocale } from "@/app/lib/functions/utils";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "All Categories List",
|
||||
@ -17,7 +19,9 @@ export const metadata: Metadata = {
|
||||
title: "All Categories List",
|
||||
description:
|
||||
"Browse through our collection of categories to find posts on your favorite topics. Whether you`re looking for insightful articles, how-tos, or the latest trends, our categories make it easy to discover content tailored to your interests.",
|
||||
images: [`${process.env.NEXT_PUBLIC_FRONT_URL}/og-image?text=All Categories List`],
|
||||
images: [
|
||||
`${process.env.NEXT_PUBLIC_FRONT_URL}/og-image?text=All Categories List`,
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
@ -26,17 +30,16 @@ export default async function Categories({ searchParams }: categoryPropsType) {
|
||||
`${process.env.NEXT_PUBLIC_BLOG_API_URL}/categories?per_page=${searchParams.per_page ? searchParams.per_page : process.env.NEXT_PUBLIC_CATEGORIES_PER_CATEGORY_PAGE}${searchParams.page ? `&page=${searchParams.page}` : ""}`,
|
||||
).then((res) => res.json());
|
||||
|
||||
const dict = await getDictionary(getDefaultLocale());
|
||||
|
||||
return (
|
||||
<div className="my-10 flex w-full max-w-[1280px] flex-wrap justify-center">
|
||||
<div className="flex w-full max-w-[90%] flex-col gap-5">
|
||||
<h1 className="text-[36px] font-[700] capitalize text-blog-text-default">
|
||||
All Categories List
|
||||
{dict.blog.categoriesPage.pageTitle}
|
||||
</h1>
|
||||
<p className="text-[18px] font-[600] text-blog-text-default">
|
||||
Browse through our collection of categories to find posts on your
|
||||
favorite topics. Whether you`re looking for insightful articles,
|
||||
how-tos, or the latest trends, our categories make it easy to discover
|
||||
content tailored to your interests.
|
||||
{dict.blog.categoriesPage.description}
|
||||
</p>
|
||||
</div>
|
||||
<div className="my-10 flex w-full max-w-[90%] flex-wrap justify-center gap-5">
|
||||
@ -46,7 +49,7 @@ export default async function Categories({ searchParams }: categoryPropsType) {
|
||||
href={"/blog"}
|
||||
className="text-[12px] font-[400] capitalize text-blog-text-passive hover:underline"
|
||||
>
|
||||
Home
|
||||
{dict.blog.header.Home}
|
||||
</Link>
|
||||
<span className="mt-[-2px] -rotate-45 scale-[3] select-none text-[12px] font-[400] text-blog-text-passive">
|
||||
-
|
||||
@ -54,7 +57,7 @@ export default async function Categories({ searchParams }: categoryPropsType) {
|
||||
</li>
|
||||
<li className="flex items-center gap-2">
|
||||
<p className="relative text-[12px] font-[600] capitalize text-blog-text-default">
|
||||
categories
|
||||
{dict.blog.categoriesPage.title}
|
||||
<span className="absolute -end-6 -top-2 flex h-5 w-5 items-center justify-center rounded-full bg-blog-red">
|
||||
{CategoriesData.meta.total}
|
||||
</span>
|
||||
@ -96,7 +99,11 @@ export default async function Categories({ searchParams }: categoryPropsType) {
|
||||
</div>
|
||||
{CategoriesData.data.length > 0 &&
|
||||
CategoriesData.meta.last_page > 1 && (
|
||||
<Pagination meta={CategoriesData.meta} baseUrl="/blog/categories" />
|
||||
<Pagination
|
||||
meta={CategoriesData.meta}
|
||||
baseUrl="/blog/categories"
|
||||
dict={dict}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -67,6 +67,11 @@
|
||||
"newDescription": "Explore the latest posts on our blog. Stay updated with fresh content, insightful articles, and the most recent discussions in your areas of interest.",
|
||||
"popularDescription": "Discover the most popular posts with the highest views. These articles have resonated with our audience and are trending across various topics."
|
||||
},
|
||||
"categoriesPage": {
|
||||
"title": "categories",
|
||||
"pageTitle": "all categories list",
|
||||
"description": "Browse through our collection of categories to find posts on your favorite topics. Whether you`re looking for insightful articles, how-tos, or the latest trends, our categories make it easy to discover content tailored to your interests."
|
||||
},
|
||||
"header": {
|
||||
"Home": "Home",
|
||||
"New": "New",
|
||||
|
||||
@ -67,6 +67,11 @@
|
||||
"newDescription": "آخرین پست های وبلاگ ما را کاوش کنید. با مطالب جدید، مقالات روشنگر و جدیدترین بحث ها در زمینه های مورد علاقه خود به روز باشید.",
|
||||
"popularDescription": "محبوب ترین پست ها را با بیشترین بازدید کشف کنید. این مقالات با مخاطبان ما طنین انداز شده اند و در موضوعات مختلف در حال ترند هستند."
|
||||
},
|
||||
"categoriesPage": {
|
||||
"pageTitle": "لیست همه دستهبندیها",
|
||||
"title": "دستهبندیها",
|
||||
"description": "برای یافتن پست هایی در مورد موضوعات مورد علاقه خود، در مجموعه دسته بندی های ما مرور کنید. فرقی نمیکند به دنبال مقالات روشنفکر، روشها یا آخرین روندها باشید، دستههای ما کشف محتوای متناسب با علایق شما را آسان میکنند."
|
||||
},
|
||||
"header": {
|
||||
"Home": "خانه",
|
||||
"New": "جدیدترینها",
|
||||
|
||||
@ -187,6 +187,11 @@ export type Dictionary = {
|
||||
newDescription: string;
|
||||
popularDescription: string;
|
||||
};
|
||||
categoriesPage: {
|
||||
title: string;
|
||||
pageTitle: string;
|
||||
description: string;
|
||||
};
|
||||
header: {
|
||||
Home: string;
|
||||
New: string;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user