postSingle page internationalization added
This commit is contained in:
parent
12df663ef2
commit
e89b8f8b44
@ -1,3 +1,5 @@
|
||||
import { getDictionary } from "@/app/lib/functions/dictionaries";
|
||||
import { getDefaultLocale } from "@/app/lib/functions/utils";
|
||||
import {
|
||||
PostSlugPagePostType,
|
||||
PostSlugPagepropsType,
|
||||
@ -37,6 +39,7 @@ export async function generateMetadata({
|
||||
}
|
||||
|
||||
export default async function SinglePost({ params }: PostSlugPagepropsType) {
|
||||
const dict = await getDictionary(getDefaultLocale());
|
||||
const postData: PostSlugPagePostType = await fetchPostData(params.postSlug);
|
||||
|
||||
return (
|
||||
@ -51,7 +54,7 @@ export default async function SinglePost({ params }: PostSlugPagepropsType) {
|
||||
<div className="flex w-full flex-wrap gap-2">
|
||||
<div className="flex gap-2">
|
||||
<p className="text-[14px] font-[600] text-blog-text-passive md:text-[16px]">
|
||||
BY
|
||||
{dict.blog.homePage.by}
|
||||
</p>
|
||||
<Link
|
||||
href={"/"}
|
||||
@ -61,7 +64,9 @@ export default async function SinglePost({ params }: PostSlugPagepropsType) {
|
||||
</Link>
|
||||
</div>
|
||||
<div className="whit flex gap-2">
|
||||
<p className="text-[16px] font-[600] text-blog-text-passive">IN</p>
|
||||
<p className="text-[16px] font-[600] text-blog-text-passive">
|
||||
{dict.blog.homePage.in}
|
||||
</p>
|
||||
<Link
|
||||
href={`/blog/categories/${postData.post.category.slug}`}
|
||||
className="text-[16px] font-[400] text-blog-text-default hover:underline"
|
||||
@ -78,7 +83,7 @@ export default async function SinglePost({ params }: PostSlugPagepropsType) {
|
||||
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">
|
||||
-
|
||||
@ -89,7 +94,7 @@ export default async function SinglePost({ params }: PostSlugPagepropsType) {
|
||||
href={"/blog/categories"}
|
||||
className="text-[12px] font-[400] capitalize text-blog-text-passive hover:underline"
|
||||
>
|
||||
categories
|
||||
{dict.blog.header.Categories}
|
||||
</Link>
|
||||
<span className="mt-[-2px] -rotate-45 scale-[3] select-none text-[12px] font-[400] text-blog-text-passive">
|
||||
-
|
||||
@ -226,11 +231,11 @@ export default async function SinglePost({ params }: PostSlugPagepropsType) {
|
||||
>
|
||||
parsa aghayi
|
||||
</Link>
|
||||
<p className="text-[16px] font-[400] text-blog-text-default">
|
||||
Follow me
|
||||
<p className="text-[16px] font-[400] capitalize text-blog-text-default">
|
||||
{dict.blog.postSinglePage.followMe}
|
||||
<Link
|
||||
href={"/"}
|
||||
className="ms-1 text-[16px] font-[400] text-blog-blue"
|
||||
className="ms-1 text-[16px] font-[400] lowercase text-blog-blue"
|
||||
>
|
||||
@parsaaghayi
|
||||
</Link>
|
||||
@ -268,8 +273,8 @@ export default async function SinglePost({ params }: PostSlugPagepropsType) {
|
||||
|
||||
<div className="my-10 mt-20 flex w-full flex-wrap gap-10">
|
||||
<div className="flex w-full items-center justify-between">
|
||||
<p className="text-[22px] font-[600] text-blog-text-default">
|
||||
You might also like...
|
||||
<p className="text-[22px] font-[600] capitalize text-blog-text-default">
|
||||
{dict.blog.postSinglePage.YouMightLike}
|
||||
</p>
|
||||
{/* <Link
|
||||
href={"#"}
|
||||
@ -298,7 +303,7 @@ export default async function SinglePost({ params }: PostSlugPagepropsType) {
|
||||
<div className="mb-2 flex w-full flex-wrap gap-2">
|
||||
<div className="flex gap-2">
|
||||
<p className="text-[14px] font-[600] text-blog-text-passive md:text-[16px]">
|
||||
BY
|
||||
{dict.blog.homePage.by}
|
||||
</p>
|
||||
<Link
|
||||
href={"/"}
|
||||
@ -309,7 +314,7 @@ export default async function SinglePost({ params }: PostSlugPagepropsType) {
|
||||
</div>
|
||||
<div className="whit flex gap-2">
|
||||
<p className="text-[16px] font-[600] text-blog-text-passive">
|
||||
IN
|
||||
{dict.blog.homePage.in}
|
||||
</p>
|
||||
<Link
|
||||
className="text-[16px] font-[400] text-blog-text-default hover:underline"
|
||||
|
||||
@ -75,6 +75,10 @@
|
||||
"categoriySinglePage": {
|
||||
"total": "total posts of "
|
||||
},
|
||||
"postSinglePage": {
|
||||
"followMe": "follow me",
|
||||
"YouMightLike": "you might also like..."
|
||||
},
|
||||
"header": {
|
||||
"Home": "Home",
|
||||
"New": "New",
|
||||
|
||||
@ -75,6 +75,10 @@
|
||||
"categoriySinglePage": {
|
||||
"total": "تعداد کل پستهای "
|
||||
},
|
||||
"postSinglePage": {
|
||||
"followMe": "منو دنبال کن",
|
||||
"YouMightLike": "ممکن است دوست داشته باشید..."
|
||||
},
|
||||
"header": {
|
||||
"Home": "خانه",
|
||||
"New": "جدیدترینها",
|
||||
|
||||
@ -195,6 +195,10 @@ export type Dictionary = {
|
||||
categoriySinglePage: {
|
||||
total: string;
|
||||
};
|
||||
postSinglePage: {
|
||||
followMe: string;
|
||||
YouMightLike: string;
|
||||
};
|
||||
header: {
|
||||
Home: string;
|
||||
New: string;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user