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
|
||||
? [
|
||||
{ href: "/#home", label: dict.website.header.Home },
|
||||
{ href: "/#about-me", label: dict.website.header.AboutMe },
|
||||
{ href: "/#services", label: dict.website.header.Services },
|
||||
{ href: "/#projects", label: dict.website.header.Projects },
|
||||
{ href: "/#testimonials", label: dict.website.header.Testimonials },
|
||||
{ href: "/#contact", label: dict.website.header.Contact },
|
||||
{ href: "/blog", label: dict.website.header.Blog },
|
||||
{ href: "/#home", label: dict.website.homePage.nav.home },
|
||||
{ href: "/#about-me", label: dict.website.homePage.nav.aboutMe },
|
||||
{ href: "/#services", label: dict.website.homePage.nav.services },
|
||||
{ href: "/#projects", label: dict.website.homePage.nav.projects },
|
||||
{ href: "/#testimonials", label: dict.website.homePage.nav.testimonials },
|
||||
{ href: "/#contact", label: dict.website.homePage.nav.contact },
|
||||
{ href: "/blog", label: dict.website.homePage.nav.blog },
|
||||
]
|
||||
: [];
|
||||
|
||||
return (
|
||||
<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
|
||||
? "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"
|
||||
>
|
||||
@ -65,7 +65,7 @@ export default function Header() {
|
||||
<li key={link.href}>
|
||||
<Link
|
||||
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>
|
||||
|
||||
@ -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"
|
||||
onClick={() => setClicked(false)}
|
||||
>
|
||||
{dict.website.header.Home}
|
||||
{dict.website.homePage.nav.home}
|
||||
</a>
|
||||
<a
|
||||
href="/#about-me"
|
||||
@ -57,7 +57,7 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
{dict.website.header.AboutMe}
|
||||
{dict.website.homePage.nav.aboutMe}
|
||||
</a>
|
||||
<a
|
||||
href="/#services"
|
||||
@ -66,7 +66,7 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
{dict.website.header.Services}
|
||||
{dict.website.homePage.nav.services}
|
||||
</a>
|
||||
<a
|
||||
href="/#projects"
|
||||
@ -75,7 +75,7 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
{dict.website.header.Projects}
|
||||
{dict.website.homePage.nav.projects}
|
||||
</a>
|
||||
<a
|
||||
href="/#testimonials"
|
||||
@ -84,7 +84,7 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
{dict.website.header.Testimonials}
|
||||
{dict.website.homePage.nav.testimonials}
|
||||
</a>
|
||||
<a
|
||||
href="/#contact"
|
||||
@ -93,14 +93,14 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
|
||||
setClicked(false);
|
||||
}}
|
||||
>
|
||||
{dict.website.header.Contact}
|
||||
{dict.website.homePage.nav.contact}
|
||||
</a>
|
||||
<Link
|
||||
href="/blog"
|
||||
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
|
||||
onClick={() => setClicked(false)}
|
||||
>
|
||||
{dict.website.header.Blog}
|
||||
{dict.website.homePage.nav.blog}
|
||||
</Link>
|
||||
</nav>
|
||||
{selectedLocale === "fa" ? (
|
||||
|
||||
@ -30,6 +30,9 @@ interface MyProjectsProps {
|
||||
const MAX_PROJECTS = 6;
|
||||
const MAX_CATEGORIES = 5;
|
||||
|
||||
const toPersianDigits = (str: string | number): string =>
|
||||
String(str).replace(/\d/g, d => '۰۱۲۳۴۵۶۷۸۹'[parseInt(d)]);
|
||||
|
||||
export default function Projects({ dict }: MyProjectsProps) {
|
||||
const [categories, setCategories] = useState<ProjectCategory[]>([]);
|
||||
const [projects, setProjects] = useState<Project[]>([]);
|
||||
@ -334,7 +337,9 @@ export default function Projects({ dict }: MyProjectsProps) {
|
||||
</span>
|
||||
</button>
|
||||
<span className="text-sm text-muted-foreground">
|
||||
{currentModalIndex + 1} / {filteredProjects.length}
|
||||
{isRTL
|
||||
? toPersianDigits(`${currentModalIndex + 1} / ${filteredProjects.length}`)
|
||||
: `${currentModalIndex + 1} / ${filteredProjects.length}`}
|
||||
</span>
|
||||
<button
|
||||
onClick={isRTL ? handlePrev : handleNext}
|
||||
|
||||
@ -102,8 +102,8 @@ export default function Testimonials({ dict }: TestimonialsProps) {
|
||||
<Quote className="w-6 h-6" />
|
||||
</div>
|
||||
|
||||
<div className="flex-grow pt-2">
|
||||
<p className="text-muted-foreground leading-relaxed mb-8 italic text-sm md:text-base break-words">
|
||||
<div className="flex-grow pt-2 overflow-visible">
|
||||
<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}"
|
||||
</p>
|
||||
</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.",
|
||||
"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."
|
||||
|
||||
@ -3,12 +3,21 @@
|
||||
"homePage": {
|
||||
"top": {
|
||||
"greeting": "سلام، من",
|
||||
"name": "پارس آقایی",
|
||||
"name": "پارسا آقایی",
|
||||
"profession": "ارشد توسعه فرانتاند و معمار راهکارهای وب",
|
||||
"roll": "تمرکز من بر خلق رابطهای کاربری بسیار بهینه و توسعه کامپوننتهای مقیاسپذیر است.",
|
||||
"descriptionAboutMe": "با بیش از ۱۰ سال تجربه در دنیای توسعه وب، مسیر کاری من ترکیبی از مهندسی دقیق فرانتاند و درک عمیق از معماری بکاند است. تخصص اصلی من در بازطراحی و Refactor کدهای پیچیده، بهینهسازی Performance پروژههای بزرگ Next.js و پیادهسازی زیرساختهای پایدار وب است.",
|
||||
"cta": "بیایید با هم کار کنیم"
|
||||
},
|
||||
"nav": {
|
||||
"home": "خانه",
|
||||
"aboutMe": "درباره من",
|
||||
"services": "خدمات",
|
||||
"projects": "پروژهها",
|
||||
"testimonials": "نظرات",
|
||||
"contact": "تماس",
|
||||
"blog": "وبلاگ"
|
||||
},
|
||||
"services": {
|
||||
"title": "خدمات",
|
||||
"description": "در چشمانداز دیجیتال امروز، داشتن یک حضور آنلاین قدرتمند برای کسبوکارها و افراد ضروری است. خدمات ما طیف گستردهای از نیازهای توسعه وب را پوشش میدهد تا اطمینان حاصل شود که پروژه شما کاربردی، از نظر بصری جذاب و کاربرپسند است."
|
||||
@ -67,7 +76,7 @@
|
||||
}
|
||||
},
|
||||
"header": {
|
||||
"Name": "پارس آقایی",
|
||||
"Name": "پارسا آقایی",
|
||||
"Home": "خانه",
|
||||
"AboutMe": "درباره من",
|
||||
"Services": "خدمات",
|
||||
@ -78,7 +87,7 @@
|
||||
"Button": "رزومه"
|
||||
},
|
||||
"footer": {
|
||||
"Name": "پارس آقایی",
|
||||
"Name": "پارسا آقایی",
|
||||
"Home": "خانه",
|
||||
"AboutMe": "درباره من",
|
||||
"Services": "خدمات",
|
||||
@ -126,7 +135,7 @@
|
||||
"button": "عضویت"
|
||||
},
|
||||
"footer": {
|
||||
"Name": "پارس آقایی",
|
||||
"Name": "پارسا آقایی",
|
||||
"Year": "© ۲۰۲۴",
|
||||
"CopyRight": "تمامی حقوق محفوظ است"
|
||||
},
|
||||
|
||||
@ -129,6 +129,15 @@ export type Dictionary = {
|
||||
descriptionAboutMe: string;
|
||||
cta: string;
|
||||
};
|
||||
nav: {
|
||||
home: string;
|
||||
aboutMe: string;
|
||||
services: string;
|
||||
projects: string;
|
||||
testimonials: string;
|
||||
contact: string;
|
||||
blog: string;
|
||||
};
|
||||
services: {
|
||||
title: string;
|
||||
description: string;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user