feat: update copyright year placeholders and enhance footer styling; add new project titles and descriptions in Persian; implement locale handling in various components
This commit is contained in:
@@ -49,7 +49,7 @@ declare const messages: {
|
|||||||
"footer_links_quick_links": "Quick Links",
|
"footer_links_quick_links": "Quick Links",
|
||||||
"footer_links_who_we_are": "Who We Are",
|
"footer_links_who_we_are": "Who We Are",
|
||||||
"footer_links_contact": "Contact",
|
"footer_links_contact": "Contact",
|
||||||
"footer_copyright": "Copyright © 2025 All Rights Reserved.",
|
"footer_copyright": "Copyright © {year} All Rights Reserved.",
|
||||||
"footer_links_address": "123 Industrial Ave, Suite 456, City, Country",
|
"footer_links_address": "123 Industrial Ave, Suite 456, City, Country",
|
||||||
|
|
||||||
"com_home_story_title": "Our Story",
|
"com_home_story_title": "Our Story",
|
||||||
|
|||||||
+1
-1
@@ -46,7 +46,7 @@
|
|||||||
"footer_links_quick_links": "Quick Links",
|
"footer_links_quick_links": "Quick Links",
|
||||||
"footer_links_who_we_are": "Who We Are",
|
"footer_links_who_we_are": "Who We Are",
|
||||||
"footer_links_contact": "Contact",
|
"footer_links_contact": "Contact",
|
||||||
"footer_copyright": "Copyright © 2025 All Rights Reserved.",
|
"footer_copyright": "Copyright © {year} All Rights Reserved.",
|
||||||
"footer_links_address": "123 Industrial Ave, Suite 456, City, Country",
|
"footer_links_address": "123 Industrial Ave, Suite 456, City, Country",
|
||||||
|
|
||||||
"com_home_story_title": "Our Story",
|
"com_home_story_title": "Our Story",
|
||||||
|
|||||||
+5
-1
@@ -36,13 +36,17 @@
|
|||||||
"com_home_products_title": "آجرهای با کیفیت برای پروژههای شما",
|
"com_home_products_title": "آجرهای با کیفیت برای پروژههای شما",
|
||||||
"com_home_products_description": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است.",
|
"com_home_products_description": "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ و با استفاده از طراحان گرافیک است.",
|
||||||
|
|
||||||
|
"com_home_projects_title": "پروژههای موفق ما",
|
||||||
|
"com_home_projects_title_bold": "ابتکارات",
|
||||||
|
"com_home_projects_description": "ابتکارات پروژههای موفق ما نشاندهنده تعهد ما به برتری و نوآوری در صنایع مختلف است.",
|
||||||
|
|
||||||
"footer_title": "راهکارهای صنعتی برای دنیای مدرن",
|
"footer_title": "راهکارهای صنعتی برای دنیای مدرن",
|
||||||
"footer_description": "ما متعهد به ارائه راهکارهای صنعتی شخصیسازی شده هستیم که نیازهای منحصر به فرد مشتریانمان را برآورده میکند. تیم متخصص ما به ارائه محصولات و خدمات با کیفیت بالا که موفقیت را در بازار رقابتی امروز تضمین میکند، متعهد است.",
|
"footer_description": "ما متعهد به ارائه راهکارهای صنعتی شخصیسازی شده هستیم که نیازهای منحصر به فرد مشتریانمان را برآورده میکند. تیم متخصص ما به ارائه محصولات و خدمات با کیفیت بالا که موفقیت را در بازار رقابتی امروز تضمین میکند، متعهد است.",
|
||||||
"footer_slogan": "ما متعهد به ارائه راهکارهای صنعتی شخصیسازی شده هستیم.",
|
"footer_slogan": "ما متعهد به ارائه راهکارهای صنعتی شخصیسازی شده هستیم.",
|
||||||
"footer_links_quick_links": "لینکهای سریع",
|
"footer_links_quick_links": "لینکهای سریع",
|
||||||
"footer_links_who_we_are": "ما که هستیم",
|
"footer_links_who_we_are": "ما که هستیم",
|
||||||
"footer_links_contact": "تماس",
|
"footer_links_contact": "تماس",
|
||||||
"footer_copyright": "کلیه حقوق محفوظ است © ۲۰۲۵",
|
"footer_copyright": "کلیه حقوق محفوظ است © {year}",
|
||||||
"footer_links_address": "خیابان صنعتی ۱۲۳، واحد ۴۵۶، شهر، کشور",
|
"footer_links_address": "خیابان صنعتی ۱۲۳، واحد ۴۵۶، شهر، کشور",
|
||||||
|
|
||||||
"com_home_story_title": "داستان ما",
|
"com_home_story_title": "داستان ما",
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ export default async function ErrorLayout({
|
|||||||
const fontClass = locale === 'fa' ? 'font-fa' : 'font-en';
|
const fontClass = locale === 'fa' ? 'font-fa' : 'font-en';
|
||||||
let messages;
|
let messages;
|
||||||
try {
|
try {
|
||||||
messages = (await import(`../../../messages/${locale}.json`)).default;
|
messages = (await import(`../../../../messages/${locale}.json`)).default;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
notFound();
|
notFound();
|
||||||
}
|
}
|
||||||
@@ -27,7 +27,7 @@ export async function generateMetadata({ params }: { params: IPageParams }) {
|
|||||||
locale,
|
locale,
|
||||||
url,
|
url,
|
||||||
},
|
},
|
||||||
authors: [{ name: t('meta.author') }],
|
// authors: [{ name: t('meta.author') }],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default function Footer() {
|
|||||||
const whoAreWeLinks = getWhoAreWeLinks(t, locale);
|
const whoAreWeLinks = getWhoAreWeLinks(t, locale);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative w-full bg-gray-500 pt-24 text-white">
|
<div className="relative w-full bg-gray-500 pt-12 text-white md:pt-24">
|
||||||
<div className="absolute inset-0 z-10 flex items-end justify-start">
|
<div className="absolute inset-0 z-10 flex items-end justify-start">
|
||||||
<div className="w-1/2 md:w-2/5">
|
<div className="w-1/2 md:w-2/5">
|
||||||
<Image
|
<Image
|
||||||
@@ -33,7 +33,9 @@ export default function Footer() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="relative z-20 container mx-auto">
|
<div className="relative z-20 container mx-auto">
|
||||||
<div className="flex max-w-[920px] flex-col gap-5 pb-10">
|
<div className="flex max-w-[920px] flex-col gap-5 pb-10">
|
||||||
<p className="text-5xl tracking-tighter">{t('footer_title')}</p>
|
<p className="text-3xl tracking-tighter md:text-5xl">
|
||||||
|
{t('footer_title')}
|
||||||
|
</p>
|
||||||
<h5 className="text-base tracking-normal">
|
<h5 className="text-base tracking-normal">
|
||||||
{t('footer_description')}
|
{t('footer_description')}
|
||||||
</h5>
|
</h5>
|
||||||
@@ -77,7 +79,9 @@ export default function Footer() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="py-8 lg:py-14">
|
<div className="py-8 lg:py-14">
|
||||||
<p className="text-center text-sm">{t('footer_copyright')}</p>
|
<p className="text-center text-sm">
|
||||||
|
{t('footer_copyright', { year: new Date().getFullYear() })}
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40,8 +40,8 @@ export default function Navbar() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<nav className="relative z-50 container mx-auto bg-transparent pt-7 pb-3 md:py-11">
|
<nav className="relative z-50 bg-gradient-to-b from-black to-black/0 pt-7 md:pt-11">
|
||||||
<div className="flex items-center justify-between border-b-0 border-white/10 pb-6 md:border-b">
|
<div className="container mx-auto flex items-center justify-between border-b-0 border-white/10 pb-6">
|
||||||
<Link href={`/${locale}`} className="h-12 w-auto">
|
<Link href={`/${locale}`} className="h-12 w-auto">
|
||||||
<Image
|
<Image
|
||||||
alt="logo"
|
alt="logo"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export default function SectionTitle({
|
|||||||
description,
|
description,
|
||||||
description_bold,
|
description_bold,
|
||||||
reverseColor,
|
reverseColor,
|
||||||
|
locale,
|
||||||
}: ISectionTitleProps) {
|
}: ISectionTitleProps) {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
@@ -13,7 +14,11 @@ export default function SectionTitle({
|
|||||||
>
|
>
|
||||||
<div className={`flex items-center gap-2`}>
|
<div className={`flex items-center gap-2`}>
|
||||||
<Icon name="setting" className="text-primary" />
|
<Icon name="setting" className="text-primary" />
|
||||||
<h3 className="text-sm leading-1 tracking-[0.175rem]">{title}</h3>
|
<h3
|
||||||
|
className={`text-lg leading-1 ${locale === 'en' ? 'tracking-[0.175rem]' : ''}`}
|
||||||
|
>
|
||||||
|
{title}
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<h2 className="text-3xl font-extralight tracking-tight md:text-[3.25rem] md:leading-14">
|
<h2 className="text-3xl font-extralight tracking-tight md:text-[3.25rem] md:leading-14">
|
||||||
{description}
|
{description}
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
|
import { TLocales } from '@/models/layout';
|
||||||
|
|
||||||
export interface ISectionTitleProps {
|
export interface ISectionTitleProps {
|
||||||
title: string;
|
title: string;
|
||||||
description: string;
|
description: string;
|
||||||
description_bold?: string;
|
description_bold?: string;
|
||||||
reverseColor?: boolean;
|
reverseColor?: boolean;
|
||||||
|
locale: TLocales;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ import images from '@/assets/images/images';
|
|||||||
import AchievementTextBox from '@/components/layout/achievementTextBox';
|
import AchievementTextBox from '@/components/layout/achievementTextBox';
|
||||||
import SectionTitle from '@/components/layout/sectionTitle';
|
import SectionTitle from '@/components/layout/sectionTitle';
|
||||||
import Button from '@/components/uikit/button';
|
import Button from '@/components/uikit/button';
|
||||||
|
import { TLocales } from '@/models/layout';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import { useParams } from 'next/navigation';
|
import { useParams } from 'next/navigation';
|
||||||
|
|
||||||
export default function AboutTopInfo() {
|
export default function AboutTopInfo() {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
const locale = params.locale as string;
|
const locale = params.locale as TLocales;
|
||||||
const routes = routeFactory(t, locale);
|
const routes = routeFactory(t, locale);
|
||||||
|
|
||||||
const topInfoAchievementTitles = [
|
const topInfoAchievementTitles = [
|
||||||
@@ -34,6 +35,7 @@ export default function AboutTopInfo() {
|
|||||||
title={t('pages_about_title')}
|
title={t('pages_about_title')}
|
||||||
description={t('com_about_info_title')}
|
description={t('com_about_info_title')}
|
||||||
description_bold={t('com_about_info_title_bold')}
|
description_bold={t('com_about_info_title_bold')}
|
||||||
|
locale={locale}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-3">
|
<div className="mt-3">
|
||||||
@@ -72,6 +74,7 @@ export default function AboutTopInfo() {
|
|||||||
title={t('pages_about_title')}
|
title={t('pages_about_title')}
|
||||||
description={t('com_about_info_title')}
|
description={t('com_about_info_title')}
|
||||||
description_bold={t('com_about_info_title_bold')}
|
description_bold={t('com_about_info_title_bold')}
|
||||||
|
locale={locale}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,14 @@
|
|||||||
|
|
||||||
import SectionTitle from '@/components/layout/sectionTitle';
|
import SectionTitle from '@/components/layout/sectionTitle';
|
||||||
import { Icon } from '@/components/uikit/icons';
|
import { Icon } from '@/components/uikit/icons';
|
||||||
|
import { TLocales } from '@/models/layout';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
|
import { useParams } from 'next/navigation';
|
||||||
|
|
||||||
const TouchUs = () => {
|
const TouchUs = () => {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
|
const params = useParams();
|
||||||
|
const locale = params.locale as TLocales;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full p-8 md:w-1/2">
|
<div className="w-full p-8 md:w-1/2">
|
||||||
@@ -13,6 +17,7 @@ const TouchUs = () => {
|
|||||||
title={t('pages_contact_title')}
|
title={t('pages_contact_title')}
|
||||||
description={t('com_contact_touch_title')}
|
description={t('com_contact_touch_title')}
|
||||||
description_bold={t('com_contact_touch_title_bold')}
|
description_bold={t('com_contact_touch_title_bold')}
|
||||||
|
locale={locale}
|
||||||
/>
|
/>
|
||||||
<p className="mt-4 mb-10 text-base font-normal text-gray-600">
|
<p className="mt-4 mb-10 text-base font-normal text-gray-600">
|
||||||
{t('com_contact_touch_description')}
|
{t('com_contact_touch_description')}
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import images from '@/assets/images/images';
|
|||||||
import SectionTitle from '@/components/layout/sectionTitle';
|
import SectionTitle from '@/components/layout/sectionTitle';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
|
import { useParams } from 'next/navigation';
|
||||||
|
import { TLocales } from '@/models/layout';
|
||||||
|
|
||||||
export default function HomeStorySection({
|
export default function HomeStorySection({
|
||||||
className = '',
|
className = '',
|
||||||
@@ -11,6 +13,8 @@ export default function HomeStorySection({
|
|||||||
className?: string;
|
className?: string;
|
||||||
}) {
|
}) {
|
||||||
const t = useTranslations();
|
const t = useTranslations();
|
||||||
|
const params = useParams();
|
||||||
|
const locale = params.locale as TLocales;
|
||||||
|
|
||||||
const statisticsData = [
|
const statisticsData = [
|
||||||
{
|
{
|
||||||
@@ -36,6 +40,7 @@ export default function HomeStorySection({
|
|||||||
title={t('com_home_story_title')}
|
title={t('com_home_story_title')}
|
||||||
description={t('com_home_story_slogan')}
|
description={t('com_home_story_slogan')}
|
||||||
description_bold={t('com_home_story_slogan_bold')}
|
description_bold={t('com_home_story_slogan_bold')}
|
||||||
|
locale={locale}
|
||||||
/>
|
/>
|
||||||
<div className="grid grid-cols-2 gap-3">
|
<div className="grid grid-cols-2 gap-3">
|
||||||
{[images.homeBanner, images.aboutImg_1].map((e, i) => (
|
{[images.homeBanner, images.aboutImg_1].map((e, i) => (
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { getProductCategories } from '@/services/products';
|
|||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import routeFactory from '@/assets/constants/routeFactory';
|
import routeFactory from '@/assets/constants/routeFactory';
|
||||||
import { getTranslations } from 'next-intl/server';
|
import { getTranslations } from 'next-intl/server';
|
||||||
import { ILayoutLocaleParams } from '@/models/layout';
|
|
||||||
import { TLocales } from '@/models/layout';
|
import { TLocales } from '@/models/layout';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@@ -30,6 +29,7 @@ export default async function HomePageProducts({ locale }: Props) {
|
|||||||
title={t('pages_product_categories_title')}
|
title={t('pages_product_categories_title')}
|
||||||
description={t('com_home_products_title')}
|
description={t('com_home_products_title')}
|
||||||
reverseColor
|
reverseColor
|
||||||
|
locale={locale}
|
||||||
/>
|
/>
|
||||||
<h4 className="pt-6 text-base font-extralight tracking-normal text-white lg:pt-10">
|
<h4 className="pt-6 text-base font-extralight tracking-normal text-white lg:pt-10">
|
||||||
{t('com_home_products_description')}
|
{t('com_home_products_description')}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ export default async function HomePageProjects({ locale }: Props) {
|
|||||||
title={t('pages_projects_title')}
|
title={t('pages_projects_title')}
|
||||||
description={t('com_home_projects_title')}
|
description={t('com_home_projects_title')}
|
||||||
description_bold={t('com_home_projects_title_bold')}
|
description_bold={t('com_home_projects_title_bold')}
|
||||||
|
locale={locale}
|
||||||
/>
|
/>
|
||||||
<h4 className="pt-10 text-base font-extralight tracking-normal max-lg:hidden">
|
<h4 className="pt-10 text-base font-extralight tracking-normal max-lg:hidden">
|
||||||
{t('com_home_projects_description')}
|
{t('com_home_projects_description')}
|
||||||
|
|||||||
Reference in New Issue
Block a user