Newsletter subscribe modal, Persian OG image shaping, Jalali dates, all-posts page, fresh view/like counts and responsive pagination
Deploy Frontend / deploy (push) Successful in 1m13s
Deploy Frontend / deploy (push) Successful in 1m13s
This commit is contained in:
1 parent
ea0401b1ff
commit
7606237c5c
24 files changed
+992
-431
No files matched your search
@@ -19,7 +19,7 @@ async function fetchCategoryData(
|
||||
const res = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_BLOG_API_URL}/categories/${categorySlug}/posts?per_page=${searchParams.get("per_page") || process.env.NEXT_PUBLIC_POSTS_PER_CATEGORY_PAGE}${searchParams.get("page") ? `&page=${searchParams.get("page")}` : ""}&lang=${locale}`,
|
||||
{
|
||||
cache: process.env.NEXT_PUBLIC_BLOG_CACHE ? "force-cache" : "no-store",
|
||||
cache: "no-store",
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export default async function Categories(props: categoryPropsType) {
|
||||
const CategoriesData: CategoriesListType = await fetch(
|
||||
`${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}` : ""}&lang=${locale}`,
|
||||
{
|
||||
cache: process.env.NEXT_PUBLIC_BLOG_CACHE ? "force-cache" : "no-store",
|
||||
cache: "no-store",
|
||||
},
|
||||
).then((res) => res.json());
|
||||
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
import Image from "next/image";
|
||||
import React from "react";
|
||||
import Button from "../button/button";
|
||||
import { NavLinks } from "./navLinks";
|
||||
import Link from "next/link";
|
||||
import BurgerButton from "../burger-button/burgerButton";
|
||||
import { cookies } from "next/headers";
|
||||
import SelectLanguage from "../selectLanguage/selectLanguage";
|
||||
import SubscribeModal from "../subscribe/subscribeModal";
|
||||
import { cookies } from "next/headers";
|
||||
import { getDictionary } from "@/app/lib/functions/dictionaries";
|
||||
import { getDefaultLocale } from "@/app/lib/functions/utils";
|
||||
|
||||
export default async function Header() {
|
||||
const dict = await getDictionary(await getDefaultLocale());
|
||||
const subscribeLabels = {
|
||||
buttonTitle: dict.blog.header.button,
|
||||
trigger: dict.blog.header.button,
|
||||
...dict.blog.subscribeModal,
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="fixed z-50 flex w-full items-center justify-center bg-blog-background py-10">
|
||||
@@ -41,11 +46,7 @@ export default async function Header() {
|
||||
alt="search icon"
|
||||
className="hidden hover:cursor-pointer sm:block"
|
||||
/>
|
||||
<Button
|
||||
color={"purple"}
|
||||
text={dict.blog.header.button}
|
||||
className="!px-3 !text-[16px] !py-1 sm:flex sm:!px-5 sm:!py-2 capitalize"
|
||||
/>
|
||||
<SubscribeModal labels={subscribeLabels} variant="header" />
|
||||
<BurgerButton />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -32,6 +32,12 @@ export function NavLinks({ className, dict }: NavLinksPropsType) {
|
||||
>
|
||||
{dict.blog.header.Popular}
|
||||
</Link>
|
||||
<Link
|
||||
className={`text-[16px] font-[600] ${pathname === "/blog/posts" ? "text-blog-text-hover" : "text-blog-text-default"} transition-all hover:scale-105`}
|
||||
href="/blog/posts"
|
||||
>
|
||||
{dict.blog.header.AllPosts}
|
||||
</Link>
|
||||
<Link
|
||||
className={`text-[16px] font-[600] ${pathname === "/blog/categories" ? "text-blog-text-hover" : "text-blog-text-default"} transition-all hover:scale-105`}
|
||||
href="/blog/categories"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { getDictionary } from "@/app/lib/functions/dictionaries";
|
||||
import { getDefaultLocale } from "@/app/lib/functions/utils";
|
||||
import { formatDate } from "@/app/lib/functions/formatDate";
|
||||
import { PostType } from "@/app/types/types";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
@@ -10,9 +11,10 @@ interface NewProps {
|
||||
}
|
||||
|
||||
export default async function New({ data }: NewProps) {
|
||||
const dict = await getDictionary(await getDefaultLocale());
|
||||
const locale = await getDefaultLocale();
|
||||
const dict = await getDictionary(locale);
|
||||
const featured = data[0];
|
||||
const readingTime = estimateReadingTime(featured.body, await getDefaultLocale());
|
||||
const readingTime = estimateReadingTime(featured.body, locale);
|
||||
const featuredTags = Array.isArray(featured.tags) ? featured.tags.slice(0, 2) : [];
|
||||
return (
|
||||
<div className="flex w-full max-w-[95%] flex-wrap justify-between gap-5">
|
||||
@@ -109,7 +111,7 @@ export default async function New({ data }: NewProps) {
|
||||
className="flex w-full flex-col rounded-md p-2 transition-all hover:scale-105 hover:shadow-md"
|
||||
>
|
||||
<p className="text-[16px] font-[400] text-blog-text-passive">
|
||||
{post.created_at}
|
||||
{formatDate(post.created_at, locale)}
|
||||
</p>
|
||||
<Link
|
||||
className="text-[16px] font-[600] text-blog-text-default hover:underline"
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
import { getDictionary } from "@/app/lib/functions/dictionaries";
|
||||
import { getDefaultLocale } from "@/app/lib/functions/utils";
|
||||
|
||||
const NEWSLETTER_EMAIL = `mailto:ceo@parsaaghayi.ir?subject=${encodeURIComponent(
|
||||
"Blog newsletter subscription",
|
||||
)}`;
|
||||
import SubscribeModal from "../../subscribe/subscribeModal";
|
||||
|
||||
export default async function NewsletterCta() {
|
||||
const dict = await getDictionary(await getDefaultLocale());
|
||||
const subscribeLabels = {
|
||||
buttonTitle: dict.blog.homePage.subscribe,
|
||||
trigger: dict.blog.homePage.subscribe,
|
||||
...dict.blog.subscribeModal,
|
||||
};
|
||||
|
||||
return (
|
||||
<section
|
||||
@@ -19,12 +21,7 @@ export default async function NewsletterCta() {
|
||||
<p className="max-w-[560px] text-[16px] font-[400] text-white/90">
|
||||
{dict.blog.homePage.newsletterText}
|
||||
</p>
|
||||
<a
|
||||
href={NEWSLETTER_EMAIL}
|
||||
className="rounded-full bg-white px-8 py-3 text-[16px] font-[700] capitalize text-blog-purple transition-transform hover:scale-105"
|
||||
>
|
||||
{dict.blog.homePage.subscribe}
|
||||
</a>
|
||||
<SubscribeModal labels={subscribeLabels} variant="cta" />
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -71,6 +71,15 @@ export default function MobileMenu({ clicked, setClicked }: propsType) {
|
||||
>
|
||||
Popular
|
||||
</Link>
|
||||
<Link
|
||||
href="/blog/posts"
|
||||
className={`block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer ${pathname === "/blog/posts" ? "text-blog-text-hover" : "text-white"}`}
|
||||
onClick={() => {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
All posts
|
||||
</Link>
|
||||
<Link
|
||||
href="/blog/categories"
|
||||
className={`block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer ${pathname === "/blog/categories" ? "text-blog-text-hover" : "text-white"}`}
|
||||
|
||||
@@ -33,6 +33,16 @@ const Pagination: React.FC<PaginationProps> = ({ meta, baseUrl, dict }) => {
|
||||
return `${baseUrl}?${params.toString()}`; // استفاده از baseUrl
|
||||
};
|
||||
|
||||
const pageLinkClassName = (isCurrent: boolean) =>
|
||||
`flex h-9 min-w-[2.25rem] items-center justify-center rounded-full border px-2 text-[14px] font-[600] ${
|
||||
isCurrent
|
||||
? "border-blog-red bg-blog-red text-white"
|
||||
: "border-transparent bg-[#EAEAEA] text-blog-text-default hover:bg-[#d6d6d6]"
|
||||
}`;
|
||||
|
||||
const arrowLinkClassName =
|
||||
"flex h-9 min-w-[2.25rem] items-center justify-center rounded-full border border-transparent bg-[#EAEAEA] text-[20px] font-[600] leading-none text-blog-text-default transition-colors hover:bg-[#d6d6d6]";
|
||||
|
||||
const renderPageNumbers = (): (React.JSX.Element | string)[] => {
|
||||
const delta = 1; // تعداد صفحات اطراف صفحه فعلی که نمایش داده شوند
|
||||
const range: number[] = [];
|
||||
@@ -64,7 +74,10 @@ const Pagination: React.FC<PaginationProps> = ({ meta, baseUrl, dict }) => {
|
||||
return rangeWithDots.map((page, index) => {
|
||||
if (page === "...") {
|
||||
return (
|
||||
<span key={`ellipsis-${index}`} className="px-3 py-1">
|
||||
<span
|
||||
key={`ellipsis-${index}`}
|
||||
className="flex h-9 items-center px-1 text-[14px] font-[600] text-blog-text-passive"
|
||||
>
|
||||
...
|
||||
</span>
|
||||
);
|
||||
@@ -73,11 +86,7 @@ const Pagination: React.FC<PaginationProps> = ({ meta, baseUrl, dict }) => {
|
||||
<Link
|
||||
key={page}
|
||||
href={generatePageLink(Number(page))}
|
||||
className={`rounded-full border px-3 py-1 ${
|
||||
page === current_page
|
||||
? "bg-blog-red text-white"
|
||||
: "bg-[#EAEAEA] text-blog-text-default hover:bg-[#d6d6d6]"
|
||||
}`}
|
||||
className={pageLinkClassName(page === current_page)}
|
||||
aria-current={page === current_page ? "page" : undefined}
|
||||
>
|
||||
{page}
|
||||
@@ -88,58 +97,54 @@ const Pagination: React.FC<PaginationProps> = ({ meta, baseUrl, dict }) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="mt-4 flex flex-wrap items-center justify-center gap-2">
|
||||
{/* Page Numbers */}
|
||||
<div className="center-center flex w-full gap-2">
|
||||
{renderPageNumbers()}
|
||||
</div>
|
||||
|
||||
<div className="center-center flex w-full gap-2">
|
||||
{/* First Page */}
|
||||
<nav
|
||||
aria-label="pagination"
|
||||
className="mt-6 flex w-full items-center justify-center"
|
||||
>
|
||||
<div className="flex max-w-full flex-wrap items-center justify-center gap-1.5 sm:gap-2">
|
||||
{current_page > 1 && (
|
||||
<Link
|
||||
href={generatePageLink(1)}
|
||||
className="rounded-full border bg-[#EAEAEA] px-3 py-1 text-blog-text-default hover:bg-[#d6d6d6]"
|
||||
className={`${pageLinkClassName(false)} whitespace-nowrap px-3`}
|
||||
aria-label="First Page"
|
||||
>
|
||||
{dict.blog.pagination.first}
|
||||
</Link>
|
||||
)}
|
||||
|
||||
{/* Previous Page */}
|
||||
{current_page > 1 && (
|
||||
<Link
|
||||
href={generatePageLink(current_page - 1)}
|
||||
className="rounded-full border bg-[#EAEAEA] px-4 py-0 text-[24px] text-blog-text-default hover:bg-[#d6d6d6]"
|
||||
className={arrowLinkClassName}
|
||||
aria-label="Previous Page"
|
||||
>
|
||||
{"<"}
|
||||
<span aria-hidden="true">‹</span>
|
||||
</Link>
|
||||
)}
|
||||
|
||||
{/* Next Page */}
|
||||
{renderPageNumbers()}
|
||||
|
||||
{current_page < last_page && (
|
||||
<Link
|
||||
href={generatePageLink(current_page + 1)}
|
||||
className="rounded-full border bg-[#EAEAEA] px-4 py-0 text-[24px] text-blog-text-default hover:bg-[#d6d6d6]"
|
||||
className={arrowLinkClassName}
|
||||
aria-label="Next Page"
|
||||
>
|
||||
{">"}
|
||||
<span aria-hidden="true">›</span>
|
||||
</Link>
|
||||
)}
|
||||
|
||||
{/* Last Page */}
|
||||
{current_page < last_page && (
|
||||
<Link
|
||||
href={generatePageLink(last_page)}
|
||||
className="rounded-full border bg-[#EAEAEA] px-3 py-1 text-blog-text-default hover:bg-[#d6d6d6]"
|
||||
className={`${pageLinkClassName(false)} whitespace-nowrap px-3`}
|
||||
aria-label="Last Page"
|
||||
>
|
||||
{dict.blog.pagination.last}
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
"use client";
|
||||
|
||||
import { FormEvent, useEffect, useState } from "react";
|
||||
|
||||
const BACKEND =
|
||||
process.env.NEXT_PUBLIC_BACK_URL || "https://backend.parsaaghayi.ir";
|
||||
|
||||
const EMAIL_SHAPE = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/;
|
||||
|
||||
type SubscribeLabels = {
|
||||
buttonTitle: string;
|
||||
trigger: string;
|
||||
title: string;
|
||||
text: string;
|
||||
email: string;
|
||||
mobile: string;
|
||||
submit: string;
|
||||
note: string;
|
||||
success: string;
|
||||
already: string;
|
||||
error: string;
|
||||
eitherRequired: string;
|
||||
close: string;
|
||||
};
|
||||
|
||||
type SubscribeModalProps = {
|
||||
labels: SubscribeLabels;
|
||||
variant: "header" | "cta";
|
||||
};
|
||||
|
||||
type Status =
|
||||
| { kind: "idle" }
|
||||
| { kind: "sending" }
|
||||
| { kind: "done"; message: string };
|
||||
|
||||
export default function SubscribeModal({
|
||||
labels,
|
||||
variant,
|
||||
}: SubscribeModalProps) {
|
||||
const [open, setOpen] = useState(false);
|
||||
const [email, setEmail] = useState("");
|
||||
const [mobile, setMobile] = useState("");
|
||||
const [invalid, setInvalid] = useState("");
|
||||
const [status, setStatus] = useState<Status>({ kind: "idle" });
|
||||
|
||||
useEffect(() => {
|
||||
if (!open) return;
|
||||
|
||||
const onKey = (event: KeyboardEvent) => {
|
||||
if (event.key === "Escape") {
|
||||
setOpen(false);
|
||||
}
|
||||
};
|
||||
|
||||
document.addEventListener("keydown", onKey);
|
||||
return () => document.removeEventListener("keydown", onKey);
|
||||
}, [open]);
|
||||
|
||||
const triggerClassName =
|
||||
variant === "header"
|
||||
? "flex items-center justify-center rounded-[10px] bg-blog-purple px-[12px] py-[8px] text-[16px] font-[600] text-white shadow-md capitalize transition-all hover:scale-105 sm:px-[20px] sm:py-[12px]"
|
||||
: "rounded-full bg-white px-8 py-3 text-[16px] font-[700] capitalize text-blog-purple transition-transform hover:scale-105";
|
||||
|
||||
const submit = async (event: FormEvent<HTMLFormElement>) => {
|
||||
event.preventDefault();
|
||||
|
||||
const trimmedEmail = email.trim();
|
||||
const trimmedMobile = mobile.trim();
|
||||
|
||||
if (!trimmedEmail && !trimmedMobile) {
|
||||
setInvalid(labels.eitherRequired);
|
||||
return;
|
||||
}
|
||||
|
||||
if (trimmedEmail && !EMAIL_SHAPE.test(trimmedEmail)) {
|
||||
setInvalid(labels.error);
|
||||
return;
|
||||
}
|
||||
|
||||
setInvalid("");
|
||||
setStatus({ kind: "sending" });
|
||||
|
||||
try {
|
||||
const response = await fetch(`${BACKEND}/api/newsletter/subscribe`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
email: trimmedEmail || undefined,
|
||||
mobile: trimmedMobile || undefined,
|
||||
}),
|
||||
});
|
||||
|
||||
const payload = (await response.json().catch(() => null)) as {
|
||||
message?: string;
|
||||
} | null;
|
||||
|
||||
if (response.status === 200) {
|
||||
const already = payload?.message || labels.already;
|
||||
setStatus({ kind: "done", message: already });
|
||||
return;
|
||||
}
|
||||
|
||||
if (response.ok) {
|
||||
setEmail("");
|
||||
setMobile("");
|
||||
setStatus({ kind: "done", message: payload?.message || labels.success });
|
||||
return;
|
||||
}
|
||||
|
||||
setStatus({ kind: "done", message: labels.error });
|
||||
} catch {
|
||||
setStatus({ kind: "done", message: labels.error });
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setOpen(true)}
|
||||
aria-haspopup="dialog"
|
||||
aria-expanded={open}
|
||||
className={triggerClassName}
|
||||
>
|
||||
{labels.trigger}
|
||||
</button>
|
||||
|
||||
{open ? (
|
||||
<div
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label={labels.buttonTitle}
|
||||
className="fixed inset-0 z-[100] flex items-center justify-center p-4"
|
||||
>
|
||||
<div
|
||||
className="absolute inset-0 bg-slate-950/70 backdrop-blur-sm"
|
||||
onClick={() => setOpen(false)}
|
||||
/>
|
||||
<div className="relative flex w-full max-w-md flex-col gap-4 rounded-2xl bg-white p-6 shadow-2xl">
|
||||
<div className="flex items-start justify-between gap-4">
|
||||
<div className="flex flex-col gap-1">
|
||||
<h2 className="text-[20px] font-[700] text-blog-text-default">
|
||||
{labels.title}
|
||||
</h2>
|
||||
<p className="text-[14px] font-[400] text-blog-text-passive">
|
||||
{labels.text}
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setOpen(false)}
|
||||
aria-label={labels.close}
|
||||
className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-blog-background text-[18px] leading-none text-blog-text-passive transition-colors hover:bg-[#e4e0ee]"
|
||||
>
|
||||
×
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{status.kind === "done" ? (
|
||||
<p className="rounded-md bg-blog-purple/10 p-4 text-[15px] font-[500] text-blog-purple">
|
||||
{status.message}
|
||||
</p>
|
||||
) : (
|
||||
<form
|
||||
onSubmit={submit}
|
||||
noValidate
|
||||
className="flex flex-col gap-4"
|
||||
>
|
||||
<label className="flex flex-col gap-1">
|
||||
<span className="text-[13px] font-[600] text-blog-text-passive">
|
||||
{labels.email}
|
||||
</span>
|
||||
<input
|
||||
type="email"
|
||||
value={email}
|
||||
onChange={(event) => setEmail(event.target.value)}
|
||||
autoComplete="email"
|
||||
className="rounded-md border border-blog-text-passive bg-transparent px-3 py-2 text-[15px] text-blog-text-default outline-none focus:border-blog-purple"
|
||||
/>
|
||||
</label>
|
||||
|
||||
<label className="flex flex-col gap-1">
|
||||
<span className="text-[13px] font-[600] text-blog-text-passive">
|
||||
{labels.mobile}
|
||||
</span>
|
||||
<input
|
||||
type="tel"
|
||||
value={mobile}
|
||||
onChange={(event) => setMobile(event.target.value)}
|
||||
autoComplete="tel"
|
||||
dir="ltr"
|
||||
className="rounded-md border border-blog-text-passive bg-transparent px-3 py-2 text-start text-[15px] text-blog-text-default outline-none focus:border-blog-purple"
|
||||
/>
|
||||
</label>
|
||||
|
||||
{invalid ? (
|
||||
<p className="text-[14px] font-[500] text-blog-red">
|
||||
{invalid}
|
||||
</p>
|
||||
) : null}
|
||||
|
||||
<p className="text-[12px] font-[400] text-blog-text-passive">
|
||||
{labels.note}
|
||||
</p>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
disabled={status.kind === "sending"}
|
||||
className="w-fit rounded-full bg-blog-purple px-6 py-2 text-[15px] font-[700] capitalize text-white transition-transform hover:scale-105 disabled:cursor-not-allowed disabled:opacity-60"
|
||||
>
|
||||
{status.kind === "sending" ? "..." : labels.submit}
|
||||
</button>
|
||||
</form>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -91,7 +91,7 @@ export default async function FilteredPosts(props: FilteredPostsPagepropsType) {
|
||||
FilteredPostsData = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_BLOG_API_URL}${filteredPostApiUrl}&per_page=${searchParams.per_page ? searchParams.per_page : process.env.NEXT_PUBLIC_POSTS_PER_FILTERED_POSTS_PAGE}${searchParams.page ? `&page=${searchParams.page}` : ""}&lang=${locale}`,
|
||||
{
|
||||
cache: process.env.NEXT_PUBLIC_BLOG_CACHE ? "force-cache" : "no-store",
|
||||
cache: "no-store",
|
||||
},
|
||||
).then((res) => res.json());
|
||||
} else {
|
||||
|
||||
@@ -15,7 +15,7 @@ export default async function Blog() {
|
||||
} = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_BLOG_API_URL}/homepage?lang=${locale}`,
|
||||
{
|
||||
cache: process.env.NEXT_PUBLIC_BLOG_CACHE ? "force-cache" : "no-store",
|
||||
cache: "no-store",
|
||||
},
|
||||
).then((res) => res.json());
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { formatDate } from "@/app/lib/functions/formatDate";
|
||||
|
||||
type CommentItem = {
|
||||
id: number;
|
||||
@@ -23,12 +24,13 @@ type CommentLabels = {
|
||||
|
||||
type CommentSectionProps = {
|
||||
slug: string;
|
||||
locale: string;
|
||||
labels: CommentLabels;
|
||||
};
|
||||
|
||||
const API_URL = process.env.NEXT_PUBLIC_BLOG_API_URL;
|
||||
|
||||
export default function CommentSection({ slug, labels }: CommentSectionProps) {
|
||||
export default function CommentSection({ slug, locale, labels }: CommentSectionProps) {
|
||||
const [comments, setComments] = useState<CommentItem[]>([]);
|
||||
const [name, setName] = useState("");
|
||||
const [email, setEmail] = useState("");
|
||||
@@ -98,7 +100,7 @@ export default function CommentSection({ slug, labels }: CommentSectionProps) {
|
||||
{comment.name}
|
||||
</p>
|
||||
<p className="whitespace-nowrap text-[12px] font-[400] text-blog-text-passive">
|
||||
{formatDate(comment.created_at)}
|
||||
{formatDate(comment.created_at, locale)}
|
||||
</p>
|
||||
</div>
|
||||
<p className="text-[15px] font-[400] leading-relaxed text-blog-text-default">
|
||||
@@ -176,14 +178,4 @@ export default function CommentSection({ slug, labels }: CommentSectionProps) {
|
||||
)}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
function formatDate(value: string): string {
|
||||
const parsed = new Date(value);
|
||||
|
||||
if (Number.isNaN(parsed.getTime())) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return new Intl.DateTimeFormat(undefined, { dateStyle: "medium" }).format(parsed);
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import Link from "next/link";
|
||||
import { redirect } from "next/navigation";
|
||||
import { getHeadings, renderBody } from "./body";
|
||||
import { estimateReadingTime } from "./readingTime";
|
||||
import { formatDate } from "@/app/lib/functions/formatDate";
|
||||
import ShareButtons from "../../components/share/shareButtons";
|
||||
import CommentSection from "./comments";
|
||||
import PostStats from "./postStats";
|
||||
@@ -25,11 +26,11 @@ async function fetchPostData(
|
||||
postSlug: string,
|
||||
locale: string,
|
||||
): Promise<PostSlugPagePostType> {
|
||||
// Always live (never force-cache): the view and like counters must reflect the
|
||||
// real API state on every render, not a snapshot cached at build or boot time.
|
||||
const res = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_BLOG_API_URL}/posts/${postSlug}?lang=${locale}`,
|
||||
{
|
||||
cache: process.env.NEXT_PUBLIC_BLOG_CACHE ? "force-cache" : "no-store",
|
||||
}
|
||||
{ cache: "no-store" },
|
||||
);
|
||||
|
||||
if (res.status === 404) {
|
||||
@@ -56,22 +57,6 @@ async function resolvePostSlug(raw: string): Promise<string> {
|
||||
return locale;
|
||||
}
|
||||
|
||||
function formatPostDate(value: unknown): string {
|
||||
if (typeof value !== "string" || value.trim() === "") {
|
||||
return "";
|
||||
}
|
||||
|
||||
const parsed = new Date(value.trim());
|
||||
|
||||
if (Number.isNaN(parsed.getTime())) {
|
||||
return value.trim();
|
||||
}
|
||||
|
||||
return new Intl.DateTimeFormat("fa-IR", { dateStyle: "medium" }).format(
|
||||
parsed,
|
||||
);
|
||||
}
|
||||
|
||||
export async function generateMetadata(props: PostSlugPagepropsType): Promise<Metadata> {
|
||||
const params = await props.params;
|
||||
const locale = await resolvePostSlug(params.postSlug);
|
||||
@@ -132,7 +117,7 @@ export default async function SinglePost(props: PostSlugPagepropsType) {
|
||||
const authorName = post.author?.name ?? "";
|
||||
const categoryName = post.category?.name ?? "";
|
||||
const categorySlug = post.category?.slug ?? "";
|
||||
const publishedDate = formatPostDate(post.published_at);
|
||||
const publishedDate = formatDate(post.published_at, locale);
|
||||
const postTags = Array.isArray(post.tags) ? post.tags : [];
|
||||
const relatedPosts = Array.isArray(postData.related_posts)
|
||||
? postData.related_posts
|
||||
@@ -500,6 +485,7 @@ export default async function SinglePost(props: PostSlugPagepropsType) {
|
||||
|
||||
<CommentSection
|
||||
slug={post.slug ?? params.postSlug}
|
||||
locale={locale}
|
||||
labels={{
|
||||
title: dict.blog.postSinglePage.commentsTitle,
|
||||
leave: dict.blog.postSinglePage.leaveComment,
|
||||
|
||||
@@ -13,10 +13,11 @@ type PostStatsProps = {
|
||||
const API_URL = process.env.NEXT_PUBLIC_BLOG_API_URL;
|
||||
|
||||
/**
|
||||
* Live like/view counters for the sticky post sidebar. One view is recorded per
|
||||
* browser session (sessionStorage), and like state persists per post in
|
||||
* localStorage so refreshing does not re-like. Both are optimistic so the UI
|
||||
* never blocks on the network.
|
||||
* Live like/view counters for the sticky post sidebar. The page render happens
|
||||
* before the counter request returns, so the component refreshes both numbers
|
||||
* from the server and records one view per visit. Like state persists per post
|
||||
* in localStorage so refreshing does not re-like; the toggle is optimistic and
|
||||
* then reconciled against the server response so the number is always real.
|
||||
*/
|
||||
export default function PostStats({
|
||||
slug,
|
||||
@@ -35,22 +36,18 @@ export default function PostStats({
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (sessionStorage.getItem(`blogViewed:${slug}`) === "1") {
|
||||
return;
|
||||
}
|
||||
|
||||
let cancelled = false;
|
||||
|
||||
fetch(`${API_URL}/posts/${slug}/view`, { method: "POST" })
|
||||
.then((res) => (res.ok ? res.json() : null))
|
||||
.then((data) => {
|
||||
if (!cancelled && data && typeof data.views === "number") {
|
||||
if (cancelled || !data) return;
|
||||
|
||||
if (typeof data.views === "number") {
|
||||
setViews(data.views);
|
||||
try {
|
||||
sessionStorage.setItem(`blogViewed:${slug}`, "1");
|
||||
} catch {
|
||||
/* storage unavailable */
|
||||
}
|
||||
}
|
||||
if (typeof data.likes === "number") {
|
||||
setLikes(data.likes);
|
||||
}
|
||||
})
|
||||
.catch(() => undefined);
|
||||
|
||||
@@ -1,5 +1,135 @@
|
||||
import {
|
||||
FilteredPostsDataType,
|
||||
FilteredPostsPagepropsType,
|
||||
PostType,
|
||||
} from "@/app/types/types";
|
||||
import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import NoDataFounded from "../components/no-data-founded/noDataFounded";
|
||||
import Pagination from "../components/pagination/pagination";
|
||||
import { Metadata } from "next";
|
||||
import { getDictionary } from "@/app/lib/functions/dictionaries";
|
||||
import { getDefaultLocale } from "@/app/lib/functions/utils";
|
||||
import { ogImageUrl } from "@/app/lib/site-config";
|
||||
|
||||
const ogImage = (text: string) => ogImageUrl(text);
|
||||
|
||||
export default function Posts() {
|
||||
return <div className="my-20">blog posts list page</div>;
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const dict = await getDictionary(await getDefaultLocale());
|
||||
|
||||
return {
|
||||
title: dict.blog.postsPage.title,
|
||||
description: dict.blog.postsPage.description,
|
||||
openGraph: {
|
||||
title: dict.blog.postsPage.title,
|
||||
description: dict.blog.postsPage.description,
|
||||
images: [ogImage(dict.blog.postsPage.title)],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export default async function Posts(props: FilteredPostsPagepropsType) {
|
||||
const searchParams = await props.searchParams;
|
||||
const dict = await getDictionary(await getDefaultLocale());
|
||||
const locale = await getDefaultLocale();
|
||||
|
||||
const apiUrl = `${process.env.NEXT_PUBLIC_BLOG_API_URL}/posts?sort_field=published_at&sort_direction=desc&per_page=${searchParams.per_page ? searchParams.per_page : process.env.NEXT_PUBLIC_POSTS_PER_FILTERED_POSTS_PAGE}${searchParams.page ? `&page=${searchParams.page}` : ""}&lang=${locale}`;
|
||||
|
||||
const postsData: FilteredPostsDataType = await fetch(apiUrl, {
|
||||
cache: "no-store",
|
||||
}).then((res) => res.json());
|
||||
|
||||
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">
|
||||
{dict.blog.postsPage.title}
|
||||
</h1>
|
||||
<p className="text-[18px] font-[600] text-blog-text-default">
|
||||
{dict.blog.postsPage.description}
|
||||
</p>
|
||||
</div>
|
||||
<div className="my-10 flex w-full flex-wrap justify-center gap-5">
|
||||
<ul className="my-10 flex w-full max-w-[90%] flex-wrap gap-2">
|
||||
<li className="flex items-center gap-2">
|
||||
<Link
|
||||
href={"/blog"}
|
||||
className="text-[12px] font-[400] capitalize text-blog-text-passive hover:underline"
|
||||
>
|
||||
{dict.blog.header.Home}
|
||||
</Link>
|
||||
<span className="mt-[-2px] -rotate-45 scale-[3] select-none text-[12px] font-[400] text-blog-text-passive">
|
||||
-
|
||||
</span>
|
||||
</li>
|
||||
<li className="flex items-center gap-2">
|
||||
<p className="relative text-[12px] font-[600] capitalize text-blog-text-default">
|
||||
{dict.blog.postsPage.title}
|
||||
<span className="absolute -end-6 -top-2 flex h-5 w-5 items-center justify-center rounded-full bg-blog-red">
|
||||
{postsData.meta.total}
|
||||
</span>
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div className="mb-10 flex w-full max-w-[90%] flex-wrap justify-center gap-10">
|
||||
{postsData.data.length > 0 ? (
|
||||
postsData.data.map((post: PostType) => (
|
||||
<div
|
||||
key={post.id}
|
||||
className="flex w-full flex-col items-center justify-start gap-1 sm:w-[45%]"
|
||||
>
|
||||
<Image
|
||||
className="rounded-md"
|
||||
src={post.featured_image}
|
||||
alt={`${post.title} post featured image`}
|
||||
loading="lazy"
|
||||
width={600}
|
||||
height={500}
|
||||
/>
|
||||
<div className="mt-4 flex w-full items-center flex-wrap gap-2">
|
||||
<div className="flex gap-2">
|
||||
<p className="text-[14px] font-[600] text-blog-text-passive md:text-[16px]">
|
||||
{dict.blog.homePage.by}
|
||||
</p>
|
||||
<Link
|
||||
href={"/"}
|
||||
className="whitespace-nowrap text-[14px] font-[400] capitalize text-blog-text-default hover:underline md:text-[16px]"
|
||||
>
|
||||
{post.author.name}
|
||||
</Link>
|
||||
</div>
|
||||
<div className="whit flex gap-2">
|
||||
<p className="text-[16px] font-[600] text-blog-text-passive">
|
||||
{dict.blog.homePage.in}
|
||||
</p>
|
||||
<Link
|
||||
href={`/blog/categories/${post.category.slug}`}
|
||||
className="text-[16px] font-[400] text-blog-text-default hover:underline"
|
||||
>
|
||||
{post.category.name}
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
<Link
|
||||
className="my-2 w-full text-start text-[24px] font-[600] text-blog-text-default hover:underline"
|
||||
href={`/blog/posts/${post.slug}`}
|
||||
>
|
||||
{post.title}
|
||||
</Link>
|
||||
<p className="w-full text-start text-[16px] font-[400] text-blog-text-default">
|
||||
{post.excerpt}
|
||||
</p>
|
||||
</div>
|
||||
))
|
||||
) : (
|
||||
<NoDataFounded seed="all-posts" />
|
||||
)}
|
||||
</div>
|
||||
{postsData.data.length > 0 && postsData.meta.last_page > 1 && (
|
||||
<Pagination meta={postsData.meta} baseUrl={"/blog/posts"} dict={dict} />
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -22,7 +22,7 @@ async function fetchTagData(
|
||||
const res = await fetch(
|
||||
`${process.env.NEXT_PUBLIC_BLOG_API_URL}/tags/by-slug/${slug}/posts?per_page=${searchParams.get("per_page") || process.env.NEXT_PUBLIC_POSTS_PER_CATEGORY_PAGE}${searchParams.get("page") ? `&page=${searchParams.get("page")}` : ""}&lang=${locale}`,
|
||||
{
|
||||
cache: process.env.NEXT_PUBLIC_BLOG_CACHE ? "force-cache" : "no-store",
|
||||
cache: "no-store",
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,16 +1,37 @@
|
||||
import { ImageResponse } from "next/og";
|
||||
import { hasArabicScript, shapeArabic } from "./shape";
|
||||
|
||||
export const runtime = "edge";
|
||||
|
||||
const REGULAR_FONT = fetch(
|
||||
new URL("./Vazirmatn-Regular.ttf", import.meta.url),
|
||||
).then((res) => res.arrayBuffer());
|
||||
|
||||
const BOLD_FONT = fetch(
|
||||
new URL("./Vazirmatn-Bold.ttf", import.meta.url),
|
||||
).then((res) => res.arrayBuffer());
|
||||
|
||||
export async function GET(request: Request) {
|
||||
const { searchParams } = new URL(request.url);
|
||||
const text = searchParams.get("text") || "Hello world!";
|
||||
const raw = searchParams.get("text") || "Hello world!";
|
||||
|
||||
// The renderer lays characters out without contextual Arabic joining, so
|
||||
// Persian/Arabic titles are pre-shaped into connected presentation forms;
|
||||
// raw letters would otherwise be drawn one by one (د-س-ت-ا-چ-ی).
|
||||
const isRtl = hasArabicScript(raw);
|
||||
const text = isRtl ? shapeArabic(raw) : raw;
|
||||
|
||||
const [regular, bold] = await Promise.all([REGULAR_FONT, BOLD_FONT]);
|
||||
|
||||
return new ImageResponse(
|
||||
(
|
||||
<div
|
||||
style={{
|
||||
fontSize: 128,
|
||||
fontSize: 72,
|
||||
fontWeight: 700,
|
||||
fontFamily: "Vazirmatn",
|
||||
lineHeight: 1.35,
|
||||
padding: 64,
|
||||
background: "rgb(110 100 260)",
|
||||
color: "white",
|
||||
width: "100%",
|
||||
@@ -19,7 +40,7 @@ export async function GET(request: Request) {
|
||||
textAlign: "center",
|
||||
alignItems: "center",
|
||||
justifyContent: "center",
|
||||
textTransform: "capitalize",
|
||||
direction: isRtl ? ("rtl" as const) : ("ltr" as const),
|
||||
}}
|
||||
>
|
||||
{text}
|
||||
@@ -28,6 +49,10 @@ export async function GET(request: Request) {
|
||||
{
|
||||
width: 1200,
|
||||
height: 1200,
|
||||
fonts: [
|
||||
{ name: "Vazirmatn", data: regular, weight: 400, style: "normal" },
|
||||
{ name: "Vazirmatn", data: bold, weight: 700, style: "normal" },
|
||||
],
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
/**
|
||||
* Minimal Arabic/Persian text shaper for the OG-image route.
|
||||
*
|
||||
* The core image renderer lays text out character by character and cannot run a
|
||||
* real shaping engine (HarfBuzz), so Persian letters come back disconnected. By
|
||||
* pre-joining the letters ourselves into Unicode presentation forms (the forms a
|
||||
* shaping engine would have produced), the renderer only has to place glyphs.
|
||||
*
|
||||
* Only the conservative Persian glyph subset is covered, which is what blog
|
||||
* titles actually use; any character without a presentation form is left as-is.
|
||||
*/
|
||||
|
||||
/** A joinable letter and its four presentation forms: isolated, final, initial, medial. */
|
||||
const DUAL_FORMS: Record<number, [number, number, number, number]> = {
|
||||
0x0628: [0x0628, 0xfe90, 0xfe91, 0xfe92], // ب
|
||||
0x062a: [0x062a, 0xfe96, 0xfe97, 0xfe98], // ت
|
||||
0x062b: [0x062b, 0xfe9a, 0xfe9b, 0xfe9c], // ث
|
||||
0x062c: [0x062c, 0xfe9e, 0xfe9f, 0xfea0], // ج
|
||||
0x062d: [0x062d, 0xfea2, 0xfea3, 0xfea4], // ح
|
||||
0x062e: [0x062e, 0xfea6, 0xfea7, 0xfea8], // خ
|
||||
0x0633: [0x0633, 0xfeb2, 0xfeb3, 0xfeb4], // س
|
||||
0x0634: [0x0634, 0xfeb6, 0xfeb7, 0xfeb8], // ش
|
||||
0x0635: [0x0635, 0xfeba, 0xfebb, 0xfebc], // ص
|
||||
0x0636: [0x0636, 0xfebe, 0xfebf, 0xfec0], // ض
|
||||
0x0637: [0x0637, 0xfec2, 0xfec3, 0xfec4], // ط
|
||||
0x0638: [0x0638, 0xfec6, 0xfec7, 0xfec8], // ظ
|
||||
0x0639: [0x0639, 0xfeca, 0xfecb, 0xfecc], // ع
|
||||
0x063a: [0x063a, 0xfece, 0xfecf, 0xfed0], // غ
|
||||
0x0641: [0x0641, 0xfed2, 0xfed3, 0xfed4], // ف
|
||||
0x0642: [0x0642, 0xfed6, 0xfed7, 0xfed8], // ق
|
||||
0x0643: [0x0643, 0xfeda, 0xfedb, 0xfedc], // ك (Arabic kaf)
|
||||
0x0644: [0x0644, 0xfede, 0xfedf, 0xfee0], // ل
|
||||
0x0645: [0x0645, 0xfee2, 0xfee3, 0xfee4], // م
|
||||
0x0646: [0x0646, 0xfee6, 0xfee7, 0xfee8], // ن
|
||||
0x0647: [0x0647, 0xfeea, 0xfeeb, 0xfeec], // ه
|
||||
0x064a: [0x064a, 0xfef2, 0xfef3, 0xfef4], // ي (Arabic yeh)
|
||||
0x06a9: [0x06a9, 0xfb91, 0xfb92, 0xfb93], // ک (Persian kaf)
|
||||
0x06af: [0x06af, 0xfb95, 0xfb96, 0xfb97], // گ
|
||||
0x06cc: [0x06cc, 0xfbfd, 0xfbfe, 0xfbff], // ی (Persian yeh)
|
||||
0x067e: [0x067e, 0xfb57, 0xfb58, 0xfb59], // پ
|
||||
0x0686: [0x0686, 0xfb7b, 0xfb7c, 0xfb7d], // چ
|
||||
0x0626: [0x0626, 0xfe8a, 0xfe8b, 0xfe8c], // ئ
|
||||
0x0640: [0x0640, 0x0640, 0x0640, 0x0640], // ـ (tatweel/kashida, joins everywhere)
|
||||
};
|
||||
|
||||
/**
|
||||
* Letters that attach to a preceding letter but never grow an initial/medial
|
||||
* form of their own (they only ever take isolated or final shapes).
|
||||
*/
|
||||
const RIGHT_ONLY = new Set<number>([
|
||||
0x0622, // آ
|
||||
0x0623, // أ
|
||||
0x0624, // ؤ
|
||||
0x0625, // إ
|
||||
0x0627, // ا
|
||||
0x0629, // ة
|
||||
0x062f, // د
|
||||
0x0630, // ذ
|
||||
0x0631, // ر
|
||||
0x0632, // ز
|
||||
0x0648, // و
|
||||
0x0698, // ژ
|
||||
0x0621, // ء
|
||||
]);
|
||||
|
||||
const HAS_ARABIC_SCRIPT = /[\u0600-\u06ff\u0750-\u077f\u08a0-\u08ff]/;
|
||||
|
||||
export function hasArabicScript(text: string): boolean {
|
||||
return HAS_ARABIC_SCRIPT.test(text);
|
||||
}
|
||||
|
||||
function isJoinable(codePoint: number): boolean {
|
||||
return codePoint in DUAL_FORMS || RIGHT_ONLY.has(codePoint);
|
||||
}
|
||||
|
||||
/**
|
||||
* Joins the letters of a Persian/Arabic string into presentation-form codepoints
|
||||
* so a non-shaping renderer shows them connected, not letter by letter.
|
||||
*/
|
||||
export function shapeArabic(text: string): string {
|
||||
const codePoints = Array.from(text.trim());
|
||||
const out: string[] = [];
|
||||
|
||||
for (let i = 0; i < codePoints.length; i += 1) {
|
||||
const char = codePoints[i];
|
||||
const codePoint = char.codePointAt(0) as number;
|
||||
|
||||
const forms = DUAL_FORMS[codePoint];
|
||||
|
||||
if (!forms) {
|
||||
out.push(char);
|
||||
continue;
|
||||
}
|
||||
|
||||
const previous = i > 0 ? (codePoints[i - 1].codePointAt(0) as number) : null;
|
||||
const next =
|
||||
i + 1 < codePoints.length ? (codePoints[i + 1].codePointAt(0) as number) : null;
|
||||
|
||||
const connectsToPrevious = previous !== null && isJoinable(previous);
|
||||
const connectsToNext = next !== null && isJoinable(next);
|
||||
|
||||
const formIndex = connectsToPrevious
|
||||
? connectsToNext
|
||||
? 3 // medial
|
||||
: 1 // final
|
||||
: connectsToNext
|
||||
? 2 // initial
|
||||
: 0; // isolated
|
||||
|
||||
out.push(String.fromCodePoint(forms[formIndex] as number));
|
||||
}
|
||||
|
||||
return out.join("");
|
||||
}
|
||||
+183
-165
@@ -1,169 +1,187 @@
|
||||
{
|
||||
"website": {
|
||||
"homePage": {
|
||||
"top": {
|
||||
"greeting": "Hi, I am",
|
||||
"name": "Parsa Aghayi",
|
||||
"profession": "Senior Frontend Engineer & Web Architect",
|
||||
"roll": "Turning complex engineering challenges into clean, maintainable code.",
|
||||
"descriptionAboutMe": "Crafting high-performance web applications, scalable React/Next.js architectures, and seamless backend integrations. Turning complex engineering challenges into clean, maintainable code.",
|
||||
"cta": "Let's Work Together"
|
||||
},
|
||||
"nav": {
|
||||
"home": "home",
|
||||
"aboutMe": "about Me",
|
||||
"services": "services",
|
||||
"projects": "projects",
|
||||
"testimonials": "testimonials",
|
||||
"contact": "contact",
|
||||
"blog": "blog"
|
||||
},
|
||||
"services": {
|
||||
"title": "services",
|
||||
"description": "In today's digital landscape, having a robust online presence is essential for businesses and individuals alike. Our services cater to a wide range of web development needs, ensuring that your project is functional, visually appealing, and user-friendly."
|
||||
},
|
||||
"projects": {
|
||||
"title": "my projects",
|
||||
"description": "Explore a selection of my web development projects that showcase my ability to deliver high-quality solutions and create engaging digital experiences. See how I can help bring your vision to life!"
|
||||
},
|
||||
"testimonials": {
|
||||
"title": "testimonials",
|
||||
"description": "The Testimonials section features feedback from clients and collaborators, highlighting the quality of my services and commitment to client satisfaction. These authentic reviews reflect my professionalism and the positive impact of my work, giving potential clients confidence in choosing me for their web development needs.",
|
||||
"data": [
|
||||
{
|
||||
"name": "Sarah Johnson",
|
||||
"position": "Founder & CEO of Innovate Solutions",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "Parsa rebuilt our corporate website from the ground up. Load times dropped by 60% and the new React/Next.js architecture made content updates effortless for our team. Conversion rates have been climbing steadily ever since launch."
|
||||
},
|
||||
{
|
||||
"name": "Michael Lee",
|
||||
"position": "Chief Executive Officer at Tech Innovators",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "What impressed me most was Parsa's clarity. He translated complex technical requirements into a clear roadmap, delivered on schedule, and documented everything so our own team could maintain the project independently."
|
||||
},
|
||||
{
|
||||
"name": "Emma Davis",
|
||||
"position": "CEO & Lead Strategist at Visionary Ventures",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "The attention to detail was outstanding. From responsive design to accessibility and SEO, every aspect of our platform felt thoughtful. Parsa genuinely invested time in understanding our business before writing a single line of code."
|
||||
},
|
||||
{
|
||||
"name": "John Doe",
|
||||
"position": "COO at Startup Labs",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "Our previous agency left us with an unstable product. Parsa took over, stabilized the codebase, and shipped the MVP we needed within a few weeks. Professional, communicative, and pragmatic from start to finish."
|
||||
},
|
||||
{
|
||||
"name": "Jane Smith",
|
||||
"position": "Founder at Health Innovations",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "Our web app handles sensitive user data, so security and reliability were non-negotiable. Parsa delivered a clean, secure architecture and was always quick to respond whenever we had questions."
|
||||
},
|
||||
{
|
||||
"name": "Alex Chen",
|
||||
"position": "CTO at CloudBase Technologies",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "Parsa is that rare engineer who cares about the whole product, not just the code. Backend integrations, deployment pipelines, performance — he looked at everything and made it better."
|
||||
}
|
||||
]
|
||||
},
|
||||
"contact": {
|
||||
"slogan": "Lets Design Together",
|
||||
"description": "The Contact Me section offers a simple way to reach out for inquiries, project proposals, or collaboration opportunities. Fill out the contact form or use the provided information, and I'll respond promptly to discuss your ideas and how I can help.",
|
||||
"button": "contact me",
|
||||
"placeholder": "Enter your Email address here..."
|
||||
}
|
||||
},
|
||||
"header": {
|
||||
"Name": "parsa aghayi",
|
||||
"Home": "home",
|
||||
"AboutMe": "about Me",
|
||||
"Services": "services",
|
||||
"Projects": "projects",
|
||||
"Testimonials": "testimonials",
|
||||
"Contact": "contact",
|
||||
"Blog": "blog",
|
||||
"Button": "Resume"
|
||||
},
|
||||
"footer": {
|
||||
"Name": "parsa aghayi",
|
||||
"Home": "home",
|
||||
"AboutMe": "about Me",
|
||||
"Services": "services",
|
||||
"Projects": "projects",
|
||||
"Testimonials": "testimonials",
|
||||
"Contact": "contact",
|
||||
"Blog": "blog",
|
||||
"Year": "© 2024",
|
||||
"CopyRight": "All Rights Reserved , Inc."
|
||||
}
|
||||
"website": {
|
||||
"homePage": {
|
||||
"top": {
|
||||
"greeting": "Hi, I am",
|
||||
"name": "Parsa Aghayi",
|
||||
"profession": "Senior Frontend Engineer & Web Architect",
|
||||
"roll": "Turning complex engineering challenges into clean, maintainable code.",
|
||||
"descriptionAboutMe": "Crafting high-performance web applications, scalable React/Next.js architectures, and seamless backend integrations. Turning complex engineering challenges into clean, maintainable code.",
|
||||
"cta": "Let's Work Together"
|
||||
},
|
||||
"nav": {
|
||||
"home": "home",
|
||||
"aboutMe": "about Me",
|
||||
"services": "services",
|
||||
"projects": "projects",
|
||||
"testimonials": "testimonials",
|
||||
"contact": "contact",
|
||||
"blog": "blog"
|
||||
},
|
||||
"services": {
|
||||
"title": "services",
|
||||
"description": "In today's digital landscape, having a robust online presence is essential for businesses and individuals alike. Our services cater to a wide range of web development needs, ensuring that your project is functional, visually appealing, and user-friendly."
|
||||
},
|
||||
"projects": {
|
||||
"title": "my projects",
|
||||
"description": "Explore a selection of my web development projects that showcase my ability to deliver high-quality solutions and create engaging digital experiences. See how I can help bring your vision to life!"
|
||||
},
|
||||
"testimonials": {
|
||||
"title": "testimonials",
|
||||
"description": "The Testimonials section features feedback from clients and collaborators, highlighting the quality of my services and commitment to client satisfaction. These authentic reviews reflect my professionalism and the positive impact of my work, giving potential clients confidence in choosing me for their web development needs.",
|
||||
"data": [
|
||||
{
|
||||
"name": "Sarah Johnson",
|
||||
"position": "Founder & CEO of Innovate Solutions",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "Parsa rebuilt our corporate website from the ground up. Load times dropped by 60% and the new React/Next.js architecture made content updates effortless for our team. Conversion rates have been climbing steadily ever since launch."
|
||||
},
|
||||
{
|
||||
"name": "Michael Lee",
|
||||
"position": "Chief Executive Officer at Tech Innovators",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "What impressed me most was Parsa's clarity. He translated complex technical requirements into a clear roadmap, delivered on schedule, and documented everything so our own team could maintain the project independently."
|
||||
},
|
||||
{
|
||||
"name": "Emma Davis",
|
||||
"position": "CEO & Lead Strategist at Visionary Ventures",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "The attention to detail was outstanding. From responsive design to accessibility and SEO, every aspect of our platform felt thoughtful. Parsa genuinely invested time in understanding our business before writing a single line of code."
|
||||
},
|
||||
{
|
||||
"name": "John Doe",
|
||||
"position": "COO at Startup Labs",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "Our previous agency left us with an unstable product. Parsa took over, stabilized the codebase, and shipped the MVP we needed within a few weeks. Professional, communicative, and pragmatic from start to finish."
|
||||
},
|
||||
{
|
||||
"name": "Jane Smith",
|
||||
"position": "Founder at Health Innovations",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "Our web app handles sensitive user data, so security and reliability were non-negotiable. Parsa delivered a clean, secure architecture and was always quick to respond whenever we had questions."
|
||||
},
|
||||
{
|
||||
"name": "Alex Chen",
|
||||
"position": "CTO at CloudBase Technologies",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "Parsa is that rare engineer who cares about the whole product, not just the code. Backend integrations, deployment pipelines, performance — he looked at everything and made it better."
|
||||
}
|
||||
]
|
||||
},
|
||||
"contact": {
|
||||
"slogan": "Lets Design Together",
|
||||
"description": "The Contact Me section offers a simple way to reach out for inquiries, project proposals, or collaboration opportunities. Fill out the contact form or use the provided information, and I'll respond promptly to discuss your ideas and how I can help.",
|
||||
"button": "contact me",
|
||||
"placeholder": "Enter your Email address here..."
|
||||
}
|
||||
},
|
||||
"blog": {
|
||||
"homePage": {
|
||||
"viewAll": "viewAll",
|
||||
"new": "new",
|
||||
"categories": "categories",
|
||||
"popular": "popular",
|
||||
"random": "random",
|
||||
"by": "BY",
|
||||
"in": "IN",
|
||||
"readArticle": "Read article",
|
||||
"newsletterTitle": "Get fresh articles in your inbox",
|
||||
"newsletterText": "One useful engineering post per week. No spam, unsubscribe anytime.",
|
||||
"subscribe": "Subscribe",
|
||||
"readTime": "min read"
|
||||
},
|
||||
"filteredPostsPage": {
|
||||
"newTitle": "new",
|
||||
"popularTitle": "popular",
|
||||
"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."
|
||||
},
|
||||
"categoriySinglePage": {
|
||||
"total": "total posts of "
|
||||
},
|
||||
"postSinglePage": {
|
||||
"followMe": "follow me",
|
||||
"YouMightLike": "you might also like...",
|
||||
"readTime": "min read",
|
||||
"onThisPage": "On this page",
|
||||
"share": "Share",
|
||||
"copyLink": "Copy link",
|
||||
"linkCopied": "Link copied",
|
||||
"newerPost": "Newer post",
|
||||
"olderPost": "Older post",
|
||||
"commentsTitle": "Comments",
|
||||
"leaveComment": "Leave a comment",
|
||||
"commentName": "Name",
|
||||
"commentEmail": "Email (optional)",
|
||||
"commentBody": "Your comment",
|
||||
"commentSubmit": "Post comment",
|
||||
"commentPending": "Thanks! Your comment is awaiting approval.",
|
||||
"noComments": "No comments yet — be the first.",
|
||||
"commentError": "Something went wrong. Please try again.",
|
||||
"likeButton": "Like this post"
|
||||
},
|
||||
"header": {
|
||||
"Home": "Home",
|
||||
"New": "New",
|
||||
"Popular": "Popular",
|
||||
"Categories": "Categories",
|
||||
"button": "subscribe"
|
||||
},
|
||||
"footer": {
|
||||
"Name": "parsa aghayi",
|
||||
"Year": "© 2024",
|
||||
"CopyRight": "All Rights Reserved , Inc."
|
||||
},
|
||||
"pagination": {
|
||||
"first": "first",
|
||||
"last": "last"
|
||||
}
|
||||
"header": {
|
||||
"Name": "parsa aghayi",
|
||||
"Home": "home",
|
||||
"AboutMe": "about Me",
|
||||
"Services": "services",
|
||||
"Projects": "projects",
|
||||
"Testimonials": "testimonials",
|
||||
"Contact": "contact",
|
||||
"Blog": "blog",
|
||||
"Button": "Resume"
|
||||
},
|
||||
"footer": {
|
||||
"Name": "parsa aghayi",
|
||||
"Home": "home",
|
||||
"AboutMe": "about Me",
|
||||
"Services": "services",
|
||||
"Projects": "projects",
|
||||
"Testimonials": "testimonials",
|
||||
"Contact": "contact",
|
||||
"Blog": "blog",
|
||||
"Year": "© 2024",
|
||||
"CopyRight": "All Rights Reserved , Inc."
|
||||
}
|
||||
},
|
||||
"blog": {
|
||||
"homePage": {
|
||||
"viewAll": "viewAll",
|
||||
"new": "new",
|
||||
"categories": "categories",
|
||||
"popular": "popular",
|
||||
"random": "random",
|
||||
"by": "BY",
|
||||
"in": "IN",
|
||||
"readArticle": "Read article",
|
||||
"newsletterTitle": "Get fresh articles in your inbox",
|
||||
"newsletterText": "One useful engineering post per week. No spam, unsubscribe anytime.",
|
||||
"subscribe": "Subscribe",
|
||||
"readTime": "min read"
|
||||
},
|
||||
"filteredPostsPage": {
|
||||
"newTitle": "new",
|
||||
"popularTitle": "popular",
|
||||
"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."
|
||||
},
|
||||
"categoriySinglePage": {
|
||||
"total": "total posts of "
|
||||
},
|
||||
"postSinglePage": {
|
||||
"followMe": "follow me",
|
||||
"YouMightLike": "you might also like...",
|
||||
"readTime": "min read",
|
||||
"onThisPage": "On this page",
|
||||
"share": "Share",
|
||||
"copyLink": "Copy link",
|
||||
"linkCopied": "Link copied",
|
||||
"newerPost": "Newer post",
|
||||
"olderPost": "Older post",
|
||||
"commentsTitle": "Comments",
|
||||
"leaveComment": "Leave a comment",
|
||||
"commentName": "Name",
|
||||
"commentEmail": "Email (optional)",
|
||||
"commentBody": "Your comment",
|
||||
"commentSubmit": "Post comment",
|
||||
"commentPending": "Thanks! Your comment is awaiting approval.",
|
||||
"noComments": "No comments yet — be the first.",
|
||||
"commentError": "Something went wrong. Please try again.",
|
||||
"likeButton": "Like this post"
|
||||
},
|
||||
"header": {
|
||||
"Home": "Home",
|
||||
"New": "New",
|
||||
"Popular": "Popular",
|
||||
"Categories": "Categories",
|
||||
"button": "subscribe",
|
||||
"AllPosts": "All posts"
|
||||
},
|
||||
"footer": {
|
||||
"Name": "parsa aghayi",
|
||||
"Year": "© 2024",
|
||||
"CopyRight": "All Rights Reserved , Inc."
|
||||
},
|
||||
"pagination": {
|
||||
"first": "first",
|
||||
"last": "last"
|
||||
},
|
||||
"subscribeModal": {
|
||||
"title": "Join the newsletter",
|
||||
"text": "One useful engineering post per week. No spam, unsubscribe anytime.",
|
||||
"email": "Email address",
|
||||
"mobile": "Mobile number",
|
||||
"submit": "Subscribe",
|
||||
"note": "Your contact details are only used for the newsletter. At least an email or a mobile number is required.",
|
||||
"success": "Thanks! You are now subscribed.",
|
||||
"already": "You are already subscribed.",
|
||||
"error": "Something went wrong. Please try again.",
|
||||
"eitherRequired": "Enter at least an email or a mobile number.",
|
||||
"close": "Close"
|
||||
},
|
||||
"postsPage": {
|
||||
"title": "All posts",
|
||||
"description": "Every article published on the blog, newest first."
|
||||
}
|
||||
}
|
||||
}
|
||||
+183
-165
@@ -1,169 +1,187 @@
|
||||
{
|
||||
"website": {
|
||||
"homePage": {
|
||||
"top": {
|
||||
"greeting": "سلام، من",
|
||||
"name": "پارسا آقایی",
|
||||
"profession": "ارشد توسعه فرانتاند و معمار راهکارهای وب",
|
||||
"roll": "تمرکز من بر خلق رابطهای کاربری بسیار بهینه و توسعه کامپوننتهای مقیاسپذیر است.",
|
||||
"descriptionAboutMe": "با بیش از ۱۰ سال تجربه در دنیای توسعه وب، مسیر کاری من ترکیبی از مهندسی دقیق فرانتاند و درک عمیق از معماری بکاند است. تخصص اصلی من در بازطراحی و Refactor کدهای پیچیده، بهینهسازی Performance پروژههای بزرگ Next.js و پیادهسازی زیرساختهای پایدار وب است.",
|
||||
"cta": "بیایید با هم کار کنیم"
|
||||
},
|
||||
"nav": {
|
||||
"home": "خانه",
|
||||
"aboutMe": "درباره من",
|
||||
"services": "خدمات",
|
||||
"projects": "پروژهها",
|
||||
"testimonials": "نظرات",
|
||||
"contact": "تماس",
|
||||
"blog": "وبلاگ"
|
||||
},
|
||||
"services": {
|
||||
"title": "خدمات",
|
||||
"description": "در چشمانداز دیجیتال امروز، داشتن یک حضور آنلاین قدرتمند برای کسبوکارها و افراد ضروری است. خدمات ما طیف گستردهای از نیازهای توسعه وب را پوشش میدهد تا اطمینان حاصل شود که پروژه شما کاربردی، از نظر بصری جذاب و کاربرپسند است."
|
||||
},
|
||||
"projects": {
|
||||
"title": "پروژههای من",
|
||||
"description": "مجموعهای از پروژههای توسعه وب من را بررسی کنید که توانایی من در ارائه راهکارهای با کیفیت بالا و ایجاد تجربههای دیجیتال جذاب را نشان میدهد. ببینید چگونه میتوانم به شما در تحقق چشماندازتان کمک کنم!"
|
||||
},
|
||||
"testimonials": {
|
||||
"title": "نظرات",
|
||||
"description": "بخش نظرات شامل بازخوردهای مشتریان و همکاران است که کیفیت خدمات و تعهد من به رضایت مشتری را برجسته میکند. این بررسیهای واقعی، حرفهایگری و تأثیر مثبت کارهای من را نشان میدهد و به مشتریان احتمالی اطمینان میدهد.",
|
||||
"data": [
|
||||
{
|
||||
"name": "سارا جانسون",
|
||||
"position": "بنیانگذار و مدیرعامل راهکارهای نوآورانه",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "پارسا وبسایت سازمانی ما را از پایه بازسازی کرد. زمان بارگذاری ۶۰٪ کاهش یافت و معماری جدید ریاکت و نکست بهروزرسانی محتوا را برای تیممان بسیار ساده کرد. نرخ تبدیل هم از همان ابتدای انتشار پیوسته در حال رشد است."
|
||||
},
|
||||
{
|
||||
"name": "مایکل لی",
|
||||
"position": "مدیر اجرایی در نوآوران فناوری",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "چیزی که بیش از همه مرا تحت تأثیر قرار داد شفافیت پارسا بود. او نیازهای پیچیده فنی را به یک نقشه راه مشخص تبدیل کرد، سر موعد تحویل داد و همهچیز را مستند کرد تا تیم خودمان بتواند بهطور مستقل پروژه را نگهداری کند."
|
||||
},
|
||||
{
|
||||
"name": "اما دیویس",
|
||||
"position": "مدیرعامل و استراتژیست ارشد در ونچرهای چشمانداز",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "توجه به جزئیات فوقالعاده بود. از طراحی واکنشگرا تا دسترسپذیری و سئو، همه جنبههای پلتفرممان دقیق و حسابشده بود. پارسا پیش از نوشتن اولین خط کد، زمان واقعی برای درک کسبوکار ما صرف کرد."
|
||||
},
|
||||
{
|
||||
"name": "جان دو",
|
||||
"position": "مدیر عملیات در استارتاپ لبز",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "آژانس قبلی محصولی ناپایدار برای ما رها کرده بود. پارسا پروژه را تحویل گرفت، کد را سامان داد و نسخه اولیه (MVP) مورد نیازمان را ظرف چند هفته تحویل داد. از ابتدا تا انتها حرفهای، خوشبرخورد و عملگرا بود."
|
||||
},
|
||||
{
|
||||
"name": "جین اسمیت",
|
||||
"position": "بنیانگذار در نوآوریهای سلامت",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "اپلیکیشن ما با دادههای حساس کاربری سروکار دارد، بنابراین امنیت و پایداری برایمان خط قرمز بود. پارسا معماری تمیز و امنی پیاده کرد و هر وقت سؤالی داشتیم سریع پاسخ میداد."
|
||||
},
|
||||
{
|
||||
"name": "الکس چن",
|
||||
"position": "مدیر فناوری در فناوریهای کلودبیس",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "پارسا همان مهندس کمیابی است که به کل محصول اهمیت میدهد نه فقط کد. از یکپارچهسازی بکاند و پایپلاین استقرار تا بهینهسازی عملکرد، به همهچیز نگاه کرد و آن را بهتر کرد."
|
||||
}
|
||||
]
|
||||
},
|
||||
"contact": {
|
||||
"slogan": "بیایید با هم طراحی کنیم",
|
||||
"description": "بخش تماس با من راهی ساده برای ارتباط جهت استعلامات، پیشنهادهای پروژه یا فرصتهای همکاری است. فرم تماس را پر کنید یا از اطلاعات ارائه شده استفاده کنید و من سریعاً برای بحث درباره ایدههای شما و نحوه کمک من پاسخ خواهم داد.",
|
||||
"button": "تماس با من",
|
||||
"placeholder": "آدرس ایمیل خود را اینجا وارد کنید..."
|
||||
}
|
||||
},
|
||||
"header": {
|
||||
"Name": "پارسا آقایی",
|
||||
"Home": "خانه",
|
||||
"AboutMe": "درباره من",
|
||||
"Services": "خدمات",
|
||||
"Projects": "پروژهها",
|
||||
"Testimonials": "نظرات",
|
||||
"Contact": "تماس",
|
||||
"Blog": "وبلاگ",
|
||||
"Button": "رزومه"
|
||||
},
|
||||
"footer": {
|
||||
"Name": "پارسا آقایی",
|
||||
"Home": "خانه",
|
||||
"AboutMe": "درباره من",
|
||||
"Services": "خدمات",
|
||||
"Projects": "پروژهها",
|
||||
"Testimonials": "نظرات",
|
||||
"Contact": "تماس",
|
||||
"Blog": "وبلاگ",
|
||||
"Year": "© ۲۰۲۴",
|
||||
"CopyRight": "تمامی حقوق محفوظ است"
|
||||
}
|
||||
"website": {
|
||||
"homePage": {
|
||||
"top": {
|
||||
"greeting": "سلام، من",
|
||||
"name": "پارسا آقایی",
|
||||
"profession": "ارشد توسعه فرانتاند و معمار راهکارهای وب",
|
||||
"roll": "تمرکز من بر خلق رابطهای کاربری بسیار بهینه و توسعه کامپوننتهای مقیاسپذیر است.",
|
||||
"descriptionAboutMe": "با بیش از ۱۰ سال تجربه در دنیای توسعه وب، مسیر کاری من ترکیبی از مهندسی دقیق فرانتاند و درک عمیق از معماری بکاند است. تخصص اصلی من در بازطراحی و Refactor کدهای پیچیده، بهینهسازی Performance پروژههای بزرگ Next.js و پیادهسازی زیرساختهای پایدار وب است.",
|
||||
"cta": "بیایید با هم کار کنیم"
|
||||
},
|
||||
"nav": {
|
||||
"home": "خانه",
|
||||
"aboutMe": "درباره من",
|
||||
"services": "خدمات",
|
||||
"projects": "پروژهها",
|
||||
"testimonials": "نظرات",
|
||||
"contact": "تماس",
|
||||
"blog": "وبلاگ"
|
||||
},
|
||||
"services": {
|
||||
"title": "خدمات",
|
||||
"description": "در چشمانداز دیجیتال امروز، داشتن یک حضور آنلاین قدرتمند برای کسبوکارها و افراد ضروری است. خدمات ما طیف گستردهای از نیازهای توسعه وب را پوشش میدهد تا اطمینان حاصل شود که پروژه شما کاربردی، از نظر بصری جذاب و کاربرپسند است."
|
||||
},
|
||||
"projects": {
|
||||
"title": "پروژههای من",
|
||||
"description": "مجموعهای از پروژههای توسعه وب من را بررسی کنید که توانایی من در ارائه راهکارهای با کیفیت بالا و ایجاد تجربههای دیجیتال جذاب را نشان میدهد. ببینید چگونه میتوانم به شما در تحقق چشماندازتان کمک کنم!"
|
||||
},
|
||||
"testimonials": {
|
||||
"title": "نظرات",
|
||||
"description": "بخش نظرات شامل بازخوردهای مشتریان و همکاران است که کیفیت خدمات و تعهد من به رضایت مشتری را برجسته میکند. این بررسیهای واقعی، حرفهایگری و تأثیر مثبت کارهای من را نشان میدهد و به مشتریان احتمالی اطمینان میدهد.",
|
||||
"data": [
|
||||
{
|
||||
"name": "سارا جانسون",
|
||||
"position": "بنیانگذار و مدیرعامل راهکارهای نوآورانه",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "پارسا وبسایت سازمانی ما را از پایه بازسازی کرد. زمان بارگذاری ۶۰٪ کاهش یافت و معماری جدید ریاکت و نکست بهروزرسانی محتوا را برای تیممان بسیار ساده کرد. نرخ تبدیل هم از همان ابتدای انتشار پیوسته در حال رشد است."
|
||||
},
|
||||
{
|
||||
"name": "مایکل لی",
|
||||
"position": "مدیر اجرایی در نوآوران فناوری",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "چیزی که بیش از همه مرا تحت تأثیر قرار داد شفافیت پارسا بود. او نیازهای پیچیده فنی را به یک نقشه راه مشخص تبدیل کرد، سر موعد تحویل داد و همهچیز را مستند کرد تا تیم خودمان بتواند بهطور مستقل پروژه را نگهداری کند."
|
||||
},
|
||||
{
|
||||
"name": "اما دیویس",
|
||||
"position": "مدیرعامل و استراتژیست ارشد در ونچرهای چشمانداز",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "توجه به جزئیات فوقالعاده بود. از طراحی واکنشگرا تا دسترسپذیری و سئو، همه جنبههای پلتفرممان دقیق و حسابشده بود. پارسا پیش از نوشتن اولین خط کد، زمان واقعی برای درک کسبوکار ما صرف کرد."
|
||||
},
|
||||
{
|
||||
"name": "جان دو",
|
||||
"position": "مدیر عملیات در استارتاپ لبز",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "آژانس قبلی محصولی ناپایدار برای ما رها کرده بود. پارسا پروژه را تحویل گرفت، کد را سامان داد و نسخه اولیه (MVP) مورد نیازمان را ظرف چند هفته تحویل داد. از ابتدا تا انتها حرفهای، خوشبرخورد و عملگرا بود."
|
||||
},
|
||||
{
|
||||
"name": "جین اسمیت",
|
||||
"position": "بنیانگذار در نوآوریهای سلامت",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "اپلیکیشن ما با دادههای حساس کاربری سروکار دارد، بنابراین امنیت و پایداری برایمان خط قرمز بود. پارسا معماری تمیز و امنی پیاده کرد و هر وقت سؤالی داشتیم سریع پاسخ میداد."
|
||||
},
|
||||
{
|
||||
"name": "الکس چن",
|
||||
"position": "مدیر فناوری در فناوریهای کلودبیس",
|
||||
"image": "/images/user-1.svg",
|
||||
"quote": "پارسا همان مهندس کمیابی است که به کل محصول اهمیت میدهد نه فقط کد. از یکپارچهسازی بکاند و پایپلاین استقرار تا بهینهسازی عملکرد، به همهچیز نگاه کرد و آن را بهتر کرد."
|
||||
}
|
||||
]
|
||||
},
|
||||
"contact": {
|
||||
"slogan": "بیایید با هم طراحی کنیم",
|
||||
"description": "بخش تماس با من راهی ساده برای ارتباط جهت استعلامات، پیشنهادهای پروژه یا فرصتهای همکاری است. فرم تماس را پر کنید یا از اطلاعات ارائه شده استفاده کنید و من سریعاً برای بحث درباره ایدههای شما و نحوه کمک من پاسخ خواهم داد.",
|
||||
"button": "تماس با من",
|
||||
"placeholder": "آدرس ایمیل خود را اینجا وارد کنید..."
|
||||
}
|
||||
},
|
||||
"blog": {
|
||||
"homePage": {
|
||||
"viewAll": "مشاهده همه",
|
||||
"new": "جدیدترینها",
|
||||
"categories": "دستهبندیها",
|
||||
"popular": "محبوبترینها",
|
||||
"random": "تصادفی",
|
||||
"by": "توسط",
|
||||
"in": "در",
|
||||
"readArticle": "مطالعه مقاله",
|
||||
"newsletterTitle": "مقالههای تازه را در ایمیل خود دریافت کنید",
|
||||
"newsletterText": "هر هفته یک مقاله مفید درباره مهندسی نرمافزار. بدون اسپم، لغو اشتراک در هر زمان.",
|
||||
"subscribe": "عضویت",
|
||||
"readTime": "دقیقه مطالعه"
|
||||
},
|
||||
"filteredPostsPage": {
|
||||
"newTitle": "جدیدترینها",
|
||||
"popularTitle": "محبوبترینها",
|
||||
"newDescription": "جدیدترین پستهای وبلاگ ما را بررسی کنید. با محتوای تازه، مقالات بصیرتبخش و اخیرین بحثها در زمینههای مورد علاقه خود بهروز بمانید.",
|
||||
"popularDescription": "محبوبترین پستها با بیشترین بازدید را کشف کنید. این مقالات با مخاطبان ما ارتباط برقرار کرده و در موضوعات مختلف ترند شدهاند."
|
||||
},
|
||||
"categoriesPage": {
|
||||
"title": "دستهبندیها",
|
||||
"pageTitle": "لیست تمامی دستهبندیها",
|
||||
"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."
|
||||
},
|
||||
"categoriySinglePage": {
|
||||
"total": "تعداد کل پستها: "
|
||||
},
|
||||
"postSinglePage": {
|
||||
"followMe": "من را دنبال کنید",
|
||||
"YouMightLike": "شاید اینها را هم بپسندید...",
|
||||
"readTime": "دقیقه مطالعه",
|
||||
"onThisPage": "فهرست مطالب",
|
||||
"share": "اشتراکگذاری",
|
||||
"copyLink": "کپی لینک",
|
||||
"linkCopied": "لینک کپی شد",
|
||||
"newerPost": "پست جدیدتر",
|
||||
"olderPost": "پست قدیمیتر",
|
||||
"commentsTitle": "دیدگاهها",
|
||||
"leaveComment": "ثبت دیدگاه",
|
||||
"commentName": "نام",
|
||||
"commentEmail": "ایمیل (اختیاری)",
|
||||
"commentBody": "متن دیدگاه",
|
||||
"commentSubmit": "ارسال دیدگاه",
|
||||
"commentPending": "ممنون! دیدگاه شما پس از تأیید نمایش داده میشود.",
|
||||
"noComments": "هنوز دیدگاهی ثبت نشده است. شما اولین نفر باشید.",
|
||||
"commentError": "خطایی رخ داد. لطفاً دوباره تلاش کنید.",
|
||||
"likeButton": "لایک کردن این پست"
|
||||
},
|
||||
"header": {
|
||||
"Home": "خانه",
|
||||
"New": "جدیدترینها",
|
||||
"Popular": "محبوبترینها",
|
||||
"Categories": "دستهبندیها",
|
||||
"button": "عضویت"
|
||||
},
|
||||
"footer": {
|
||||
"Name": "پارسا آقایی",
|
||||
"Year": "© ۲۰۲۴",
|
||||
"CopyRight": "تمامی حقوق محفوظ است"
|
||||
},
|
||||
"pagination": {
|
||||
"first": "اولین",
|
||||
"last": "آخرین"
|
||||
}
|
||||
"header": {
|
||||
"Name": "پارسا آقایی",
|
||||
"Home": "خانه",
|
||||
"AboutMe": "درباره من",
|
||||
"Services": "خدمات",
|
||||
"Projects": "پروژهها",
|
||||
"Testimonials": "نظرات",
|
||||
"Contact": "تماس",
|
||||
"Blog": "وبلاگ",
|
||||
"Button": "رزومه"
|
||||
},
|
||||
"footer": {
|
||||
"Name": "پارسا آقایی",
|
||||
"Home": "خانه",
|
||||
"AboutMe": "درباره من",
|
||||
"Services": "خدمات",
|
||||
"Projects": "پروژهها",
|
||||
"Testimonials": "نظرات",
|
||||
"Contact": "تماس",
|
||||
"Blog": "وبلاگ",
|
||||
"Year": "© ۲۰۲۴",
|
||||
"CopyRight": "تمامی حقوق محفوظ است"
|
||||
}
|
||||
},
|
||||
"blog": {
|
||||
"homePage": {
|
||||
"viewAll": "مشاهده همه",
|
||||
"new": "جدیدترینها",
|
||||
"categories": "دستهبندیها",
|
||||
"popular": "محبوبترینها",
|
||||
"random": "تصادفی",
|
||||
"by": "توسط",
|
||||
"in": "در",
|
||||
"readArticle": "مطالعه مقاله",
|
||||
"newsletterTitle": "مقالههای تازه را در ایمیل خود دریافت کنید",
|
||||
"newsletterText": "هر هفته یک مقاله مفید درباره مهندسی نرمافزار. بدون اسپم، لغو اشتراک در هر زمان.",
|
||||
"subscribe": "عضویت",
|
||||
"readTime": "دقیقه مطالعه"
|
||||
},
|
||||
"filteredPostsPage": {
|
||||
"newTitle": "جدیدترینها",
|
||||
"popularTitle": "محبوبترینها",
|
||||
"newDescription": "جدیدترین پستهای وبلاگ ما را بررسی کنید. با محتوای تازه، مقالات بصیرتبخش و اخیرین بحثها در زمینههای مورد علاقه خود بهروز بمانید.",
|
||||
"popularDescription": "محبوبترین پستها با بیشترین بازدید را کشف کنید. این مقالات با مخاطبان ما ارتباط برقرار کرده و در موضوعات مختلف ترند شدهاند."
|
||||
},
|
||||
"categoriesPage": {
|
||||
"title": "دستهبندیها",
|
||||
"pageTitle": "لیست تمامی دستهبندیها",
|
||||
"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."
|
||||
},
|
||||
"categoriySinglePage": {
|
||||
"total": "تعداد کل پستها: "
|
||||
},
|
||||
"postSinglePage": {
|
||||
"followMe": "من را دنبال کنید",
|
||||
"YouMightLike": "شاید اینها را هم بپسندید...",
|
||||
"readTime": "دقیقه مطالعه",
|
||||
"onThisPage": "فهرست مطالب",
|
||||
"share": "اشتراکگذاری",
|
||||
"copyLink": "کپی لینک",
|
||||
"linkCopied": "لینک کپی شد",
|
||||
"newerPost": "پست جدیدتر",
|
||||
"olderPost": "پست قدیمیتر",
|
||||
"commentsTitle": "دیدگاهها",
|
||||
"leaveComment": "ثبت دیدگاه",
|
||||
"commentName": "نام",
|
||||
"commentEmail": "ایمیل (اختیاری)",
|
||||
"commentBody": "متن دیدگاه",
|
||||
"commentSubmit": "ارسال دیدگاه",
|
||||
"commentPending": "ممنون! دیدگاه شما پس از تأیید نمایش داده میشود.",
|
||||
"noComments": "هنوز دیدگاهی ثبت نشده است. شما اولین نفر باشید.",
|
||||
"commentError": "خطایی رخ داد. لطفاً دوباره تلاش کنید.",
|
||||
"likeButton": "لایک کردن این پست"
|
||||
},
|
||||
"header": {
|
||||
"Home": "خانه",
|
||||
"New": "جدیدترینها",
|
||||
"Popular": "محبوبترینها",
|
||||
"Categories": "دستهبندیها",
|
||||
"button": "عضویت",
|
||||
"AllPosts": "همه مطالب"
|
||||
},
|
||||
"footer": {
|
||||
"Name": "پارسا آقایی",
|
||||
"Year": "© ۲۰۲۴",
|
||||
"CopyRight": "تمامی حقوق محفوظ است"
|
||||
},
|
||||
"pagination": {
|
||||
"first": "اولین",
|
||||
"last": "آخرین"
|
||||
},
|
||||
"subscribeModal": {
|
||||
"title": "عضویت در خبرنامه",
|
||||
"text": "هر هفته یک مقاله مفید درباره مهندسی نرمافزار. بدون اسپم، لغو اشتراک در هر زمان.",
|
||||
"email": "ایمیل",
|
||||
"mobile": "شماره موبایل",
|
||||
"submit": "عضویت",
|
||||
"note": "اطلاعات شما فقط برای ارسال خبرنامه استفاده میشود. حداقل یکی از ایمیل یا شماره موبایل الزامی است.",
|
||||
"success": "عضویت شما با موفقیت ثبت شد.",
|
||||
"already": "شما قبلاً در خبرنامه عضویت داشتهاید.",
|
||||
"error": "خطایی رخ داد. لطفاً دوباره تلاش کنید.",
|
||||
"eitherRequired": "حداقل ایمیل یا شماره موبایل را وارد کنید.",
|
||||
"close": "بستن"
|
||||
},
|
||||
"postsPage": {
|
||||
"title": "همه مطالب",
|
||||
"description": "همه مقالات منتشرشده در وبلاگ، از جدیدترین به قدیمیترین."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Locale-aware date label for the bilingual blog.
|
||||
*
|
||||
* Persian readers see the Jalali (Shamsi) calendar with Persian digits, English
|
||||
* readers get the Gregorian calendar. Values may arrive as an ISO timestamp or
|
||||
* as the short English string the API composes ("Oct 03 2026"), so an unparsable
|
||||
* string is echoed back instead of breaking the layout.
|
||||
*/
|
||||
export function formatDate(value: unknown, locale: string): string {
|
||||
if (typeof value !== "string" || value.trim() === "") {
|
||||
return "";
|
||||
}
|
||||
|
||||
const parsed = new Date(value.trim());
|
||||
|
||||
if (Number.isNaN(parsed.getTime())) {
|
||||
return value.trim();
|
||||
}
|
||||
|
||||
return new Intl.DateTimeFormat(locale === "fa" ? "fa-IR" : "en-US", {
|
||||
dateStyle: "medium",
|
||||
}).format(parsed);
|
||||
}
|
||||
@@ -256,8 +256,26 @@ export type Dictionary = {
|
||||
New: string;
|
||||
Popular: string;
|
||||
Categories: string;
|
||||
AllPosts: string;
|
||||
button: string;
|
||||
};
|
||||
subscribeModal: {
|
||||
title: string;
|
||||
text: string;
|
||||
email: string;
|
||||
mobile: string;
|
||||
submit: string;
|
||||
note: string;
|
||||
success: string;
|
||||
already: string;
|
||||
error: string;
|
||||
eitherRequired: string;
|
||||
close: string;
|
||||
};
|
||||
postsPage: {
|
||||
title: string;
|
||||
description: string;
|
||||
};
|
||||
footer: {
|
||||
Name: string;
|
||||
Year: string;
|
||||
|
||||
Reference in new issue
Block a user