fix: precise fixes - name spelling, nav i18n, header scroll logic, testimonials padding, Persian digits
This commit is contained in:
parent
79c229a93c
commit
8666d8067a
@ -29,22 +29,22 @@ export default function Header() {
|
|||||||
|
|
||||||
const navLinks = dict
|
const navLinks = dict
|
||||||
? [
|
? [
|
||||||
{ href: "/#home", label: dict.website.header.Home },
|
{ href: "/#home", label: dict.website.homePage.nav.home },
|
||||||
{ href: "/#about-me", label: dict.website.header.AboutMe },
|
{ href: "/#about-me", label: dict.website.homePage.nav.aboutMe },
|
||||||
{ href: "/#services", label: dict.website.header.Services },
|
{ href: "/#services", label: dict.website.homePage.nav.services },
|
||||||
{ href: "/#projects", label: dict.website.header.Projects },
|
{ href: "/#projects", label: dict.website.homePage.nav.projects },
|
||||||
{ href: "/#testimonials", label: dict.website.header.Testimonials },
|
{ href: "/#testimonials", label: dict.website.homePage.nav.testimonials },
|
||||||
{ href: "/#contact", label: dict.website.header.Contact },
|
{ href: "/#contact", label: dict.website.homePage.nav.contact },
|
||||||
{ href: "/blog", label: dict.website.header.Blog },
|
{ href: "/blog", label: dict.website.homePage.nav.blog },
|
||||||
]
|
]
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header
|
<header
|
||||||
className={`fixed top-0 left-0 z-50 flex h-20 w-full items-center justify-between px-6 py-4 transition-all duration-300 xl:px-12 backdrop-blur-md bg-white/70 dark:bg-zinc-950/70 ${
|
className={`fixed top-0 left-0 z-50 flex h-20 w-full items-center justify-between px-6 py-4 transition-all duration-300 xl:px-12 ${
|
||||||
scrolled
|
scrolled
|
||||||
? "border-b border-zinc-200/50 dark:border-zinc-800/50 shadow-sm"
|
? "backdrop-blur-md bg-white/70 dark:bg-zinc-950/70 border-b border-zinc-200/50 dark:border-zinc-800/50 shadow-sm"
|
||||||
: ""
|
: "bg-transparent"
|
||||||
}`}
|
}`}
|
||||||
id="header"
|
id="header"
|
||||||
>
|
>
|
||||||
@ -65,7 +65,7 @@ export default function Header() {
|
|||||||
<li key={link.href}>
|
<li key={link.href}>
|
||||||
<Link
|
<Link
|
||||||
href={link.href}
|
href={link.href}
|
||||||
className="px-4 py-2 text-sm font-medium text-muted-foreground transition-all duration-300 hover:text-primary rounded-full hover:bg-primary/10"
|
className="px-4 py-2 text-sm font-medium text-zinc-700 dark:text-zinc-200 transition-all duration-300 hover:text-[#FD6F00] rounded-full hover:bg-primary/10"
|
||||||
>
|
>
|
||||||
{link.label}
|
{link.label}
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@ -48,7 +48,7 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
|||||||
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
||||||
onClick={() => setClicked(false)}
|
onClick={() => setClicked(false)}
|
||||||
>
|
>
|
||||||
{dict.website.header.Home}
|
{dict.website.homePage.nav.home}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="/#about-me"
|
href="/#about-me"
|
||||||
@ -57,7 +57,7 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
|||||||
setClicked(false);
|
setClicked(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{dict.website.header.AboutMe}
|
{dict.website.homePage.nav.aboutMe}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="/#services"
|
href="/#services"
|
||||||
@ -66,7 +66,7 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
|||||||
setClicked(false);
|
setClicked(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{dict.website.header.Services}
|
{dict.website.homePage.nav.services}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="/#projects"
|
href="/#projects"
|
||||||
@ -75,7 +75,7 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
|||||||
setClicked(false);
|
setClicked(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{dict.website.header.Projects}
|
{dict.website.homePage.nav.projects}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="/#testimonials"
|
href="/#testimonials"
|
||||||
@ -84,7 +84,7 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
|||||||
setClicked(false);
|
setClicked(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{dict.website.header.Testimonials}
|
{dict.website.homePage.nav.testimonials}
|
||||||
</a>
|
</a>
|
||||||
<a
|
<a
|
||||||
href="/#contact"
|
href="/#contact"
|
||||||
@ -93,14 +93,14 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
|||||||
setClicked(false);
|
setClicked(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{dict.website.header.Contact}
|
{dict.website.homePage.nav.contact}
|
||||||
</a>
|
</a>
|
||||||
<Link
|
<Link
|
||||||
href="/blog"
|
href="/blog"
|
||||||
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
||||||
onClick={() => setClicked(false)}
|
onClick={() => setClicked(false)}
|
||||||
>
|
>
|
||||||
{dict.website.header.Blog}
|
{dict.website.homePage.nav.blog}
|
||||||
</Link>
|
</Link>
|
||||||
</nav>
|
</nav>
|
||||||
{selectedLocale === "fa" ? (
|
{selectedLocale === "fa" ? (
|
||||||
|
|||||||
@ -30,6 +30,9 @@ interface MyProjectsProps {
|
|||||||
const MAX_PROJECTS = 6;
|
const MAX_PROJECTS = 6;
|
||||||
const MAX_CATEGORIES = 5;
|
const MAX_CATEGORIES = 5;
|
||||||
|
|
||||||
|
const toPersianDigits = (str: string | number): string =>
|
||||||
|
String(str).replace(/\d/g, d => '۰۱۲۳۴۵۶۷۸۹'[parseInt(d)]);
|
||||||
|
|
||||||
export default function Projects({ dict }: MyProjectsProps) {
|
export default function Projects({ dict }: MyProjectsProps) {
|
||||||
const [categories, setCategories] = useState<ProjectCategory[]>([]);
|
const [categories, setCategories] = useState<ProjectCategory[]>([]);
|
||||||
const [projects, setProjects] = useState<Project[]>([]);
|
const [projects, setProjects] = useState<Project[]>([]);
|
||||||
@ -334,7 +337,9 @@ export default function Projects({ dict }: MyProjectsProps) {
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<span className="text-sm text-muted-foreground">
|
<span className="text-sm text-muted-foreground">
|
||||||
{currentModalIndex + 1} / {filteredProjects.length}
|
{isRTL
|
||||||
|
? toPersianDigits(`${currentModalIndex + 1} / ${filteredProjects.length}`)
|
||||||
|
: `${currentModalIndex + 1} / ${filteredProjects.length}`}
|
||||||
</span>
|
</span>
|
||||||
<button
|
<button
|
||||||
onClick={isRTL ? handlePrev : handleNext}
|
onClick={isRTL ? handlePrev : handleNext}
|
||||||
|
|||||||
@ -102,8 +102,8 @@ export default function Testimonials({ dict }: TestimonialsProps) {
|
|||||||
<Quote className="w-6 h-6" />
|
<Quote className="w-6 h-6" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex-grow pt-2">
|
<div className="flex-grow pt-2 overflow-visible">
|
||||||
<p className="text-muted-foreground leading-relaxed mb-8 italic text-sm md:text-base break-words">
|
<p className="w-full text-start px-8 md:px-14 leading-relaxed whitespace-normal mb-8 italic text-sm md:text-base break-words">
|
||||||
"{testimonial.quote}"
|
"{testimonial.quote}"
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -9,6 +9,15 @@
|
|||||||
"descriptionAboutMe": "Crafting high-performance web applications, scalable React/Next.js architectures, and seamless backend integrations. 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"
|
"cta": "Let's Work Together"
|
||||||
},
|
},
|
||||||
|
"nav": {
|
||||||
|
"home": "home",
|
||||||
|
"aboutMe": "about Me",
|
||||||
|
"services": "services",
|
||||||
|
"projects": "projects",
|
||||||
|
"testimonials": "testimonials",
|
||||||
|
"contact": "contact",
|
||||||
|
"blog": "blog"
|
||||||
|
},
|
||||||
"services": {
|
"services": {
|
||||||
"title": "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."
|
"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."
|
||||||
|
|||||||
@ -3,12 +3,21 @@
|
|||||||
"homePage": {
|
"homePage": {
|
||||||
"top": {
|
"top": {
|
||||||
"greeting": "سلام، من",
|
"greeting": "سلام، من",
|
||||||
"name": "پارس آقایی",
|
"name": "پارسا آقایی",
|
||||||
"profession": "ارشد توسعه فرانتاند و معمار راهکارهای وب",
|
"profession": "ارشد توسعه فرانتاند و معمار راهکارهای وب",
|
||||||
"roll": "تمرکز من بر خلق رابطهای کاربری بسیار بهینه و توسعه کامپوننتهای مقیاسپذیر است.",
|
"roll": "تمرکز من بر خلق رابطهای کاربری بسیار بهینه و توسعه کامپوننتهای مقیاسپذیر است.",
|
||||||
"descriptionAboutMe": "با بیش از ۱۰ سال تجربه در دنیای توسعه وب، مسیر کاری من ترکیبی از مهندسی دقیق فرانتاند و درک عمیق از معماری بکاند است. تخصص اصلی من در بازطراحی و Refactor کدهای پیچیده، بهینهسازی Performance پروژههای بزرگ Next.js و پیادهسازی زیرساختهای پایدار وب است.",
|
"descriptionAboutMe": "با بیش از ۱۰ سال تجربه در دنیای توسعه وب، مسیر کاری من ترکیبی از مهندسی دقیق فرانتاند و درک عمیق از معماری بکاند است. تخصص اصلی من در بازطراحی و Refactor کدهای پیچیده، بهینهسازی Performance پروژههای بزرگ Next.js و پیادهسازی زیرساختهای پایدار وب است.",
|
||||||
"cta": "بیایید با هم کار کنیم"
|
"cta": "بیایید با هم کار کنیم"
|
||||||
},
|
},
|
||||||
|
"nav": {
|
||||||
|
"home": "خانه",
|
||||||
|
"aboutMe": "درباره من",
|
||||||
|
"services": "خدمات",
|
||||||
|
"projects": "پروژهها",
|
||||||
|
"testimonials": "نظرات",
|
||||||
|
"contact": "تماس",
|
||||||
|
"blog": "وبلاگ"
|
||||||
|
},
|
||||||
"services": {
|
"services": {
|
||||||
"title": "خدمات",
|
"title": "خدمات",
|
||||||
"description": "در چشمانداز دیجیتال امروز، داشتن یک حضور آنلاین قدرتمند برای کسبوکارها و افراد ضروری است. خدمات ما طیف گستردهای از نیازهای توسعه وب را پوشش میدهد تا اطمینان حاصل شود که پروژه شما کاربردی، از نظر بصری جذاب و کاربرپسند است."
|
"description": "در چشمانداز دیجیتال امروز، داشتن یک حضور آنلاین قدرتمند برای کسبوکارها و افراد ضروری است. خدمات ما طیف گستردهای از نیازهای توسعه وب را پوشش میدهد تا اطمینان حاصل شود که پروژه شما کاربردی، از نظر بصری جذاب و کاربرپسند است."
|
||||||
@ -67,7 +76,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"header": {
|
"header": {
|
||||||
"Name": "پارس آقایی",
|
"Name": "پارسا آقایی",
|
||||||
"Home": "خانه",
|
"Home": "خانه",
|
||||||
"AboutMe": "درباره من",
|
"AboutMe": "درباره من",
|
||||||
"Services": "خدمات",
|
"Services": "خدمات",
|
||||||
@ -78,7 +87,7 @@
|
|||||||
"Button": "رزومه"
|
"Button": "رزومه"
|
||||||
},
|
},
|
||||||
"footer": {
|
"footer": {
|
||||||
"Name": "پارس آقایی",
|
"Name": "پارسا آقایی",
|
||||||
"Home": "خانه",
|
"Home": "خانه",
|
||||||
"AboutMe": "درباره من",
|
"AboutMe": "درباره من",
|
||||||
"Services": "خدمات",
|
"Services": "خدمات",
|
||||||
@ -126,7 +135,7 @@
|
|||||||
"button": "عضویت"
|
"button": "عضویت"
|
||||||
},
|
},
|
||||||
"footer": {
|
"footer": {
|
||||||
"Name": "پارس آقایی",
|
"Name": "پارسا آقایی",
|
||||||
"Year": "© ۲۰۲۴",
|
"Year": "© ۲۰۲۴",
|
||||||
"CopyRight": "تمامی حقوق محفوظ است"
|
"CopyRight": "تمامی حقوق محفوظ است"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -129,6 +129,15 @@ export type Dictionary = {
|
|||||||
descriptionAboutMe: string;
|
descriptionAboutMe: string;
|
||||||
cta: string;
|
cta: string;
|
||||||
};
|
};
|
||||||
|
nav: {
|
||||||
|
home: string;
|
||||||
|
aboutMe: string;
|
||||||
|
services: string;
|
||||||
|
projects: string;
|
||||||
|
testimonials: string;
|
||||||
|
contact: string;
|
||||||
|
blog: string;
|
||||||
|
};
|
||||||
services: {
|
services: {
|
||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user