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:
@@ -20,7 +20,7 @@ export default async function ErrorLayout({
|
||||
const fontClass = locale === 'fa' ? 'font-fa' : 'font-en';
|
||||
let messages;
|
||||
try {
|
||||
messages = (await import(`../../../messages/${locale}.json`)).default;
|
||||
messages = (await import(`../../../../messages/${locale}.json`)).default;
|
||||
} catch (error) {
|
||||
notFound();
|
||||
}
|
||||
@@ -27,7 +27,7 @@ export async function generateMetadata({ params }: { params: IPageParams }) {
|
||||
locale,
|
||||
url,
|
||||
},
|
||||
authors: [{ name: t('meta.author') }],
|
||||
// authors: [{ name: t('meta.author') }],
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export default function Footer() {
|
||||
const whoAreWeLinks = getWhoAreWeLinks(t, locale);
|
||||
|
||||
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="w-1/2 md:w-2/5">
|
||||
<Image
|
||||
@@ -33,7 +33,9 @@ export default function Footer() {
|
||||
</div>
|
||||
<div className="relative z-20 container mx-auto">
|
||||
<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">
|
||||
{t('footer_description')}
|
||||
</h5>
|
||||
@@ -77,7 +79,9 @@ export default function Footer() {
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
@@ -40,8 +40,8 @@ export default function Navbar() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<nav className="relative z-50 container mx-auto bg-transparent pt-7 pb-3 md:py-11">
|
||||
<div className="flex items-center justify-between border-b-0 border-white/10 pb-6 md:border-b">
|
||||
<nav className="relative z-50 bg-gradient-to-b from-black to-black/0 pt-7 md:pt-11">
|
||||
<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">
|
||||
<Image
|
||||
alt="logo"
|
||||
|
||||
@@ -6,6 +6,7 @@ export default function SectionTitle({
|
||||
description,
|
||||
description_bold,
|
||||
reverseColor,
|
||||
locale,
|
||||
}: ISectionTitleProps) {
|
||||
return (
|
||||
<div
|
||||
@@ -13,7 +14,11 @@ export default function SectionTitle({
|
||||
>
|
||||
<div className={`flex items-center gap-2`}>
|
||||
<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>
|
||||
<h2 className="text-3xl font-extralight tracking-tight md:text-[3.25rem] md:leading-14">
|
||||
{description}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { TLocales } from '@/models/layout';
|
||||
|
||||
export interface ISectionTitleProps {
|
||||
title: string;
|
||||
description: string;
|
||||
description_bold?: string;
|
||||
reverseColor?: boolean;
|
||||
locale: TLocales;
|
||||
}
|
||||
|
||||
@@ -5,13 +5,14 @@ import images from '@/assets/images/images';
|
||||
import AchievementTextBox from '@/components/layout/achievementTextBox';
|
||||
import SectionTitle from '@/components/layout/sectionTitle';
|
||||
import Button from '@/components/uikit/button';
|
||||
import { TLocales } from '@/models/layout';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useParams } from 'next/navigation';
|
||||
|
||||
export default function AboutTopInfo() {
|
||||
const t = useTranslations();
|
||||
const params = useParams();
|
||||
const locale = params.locale as string;
|
||||
const locale = params.locale as TLocales;
|
||||
const routes = routeFactory(t, locale);
|
||||
|
||||
const topInfoAchievementTitles = [
|
||||
@@ -34,6 +35,7 @@ export default function AboutTopInfo() {
|
||||
title={t('pages_about_title')}
|
||||
description={t('com_about_info_title')}
|
||||
description_bold={t('com_about_info_title_bold')}
|
||||
locale={locale}
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-3">
|
||||
@@ -72,6 +74,7 @@ export default function AboutTopInfo() {
|
||||
title={t('pages_about_title')}
|
||||
description={t('com_about_info_title')}
|
||||
description_bold={t('com_about_info_title_bold')}
|
||||
locale={locale}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -2,10 +2,14 @@
|
||||
|
||||
import SectionTitle from '@/components/layout/sectionTitle';
|
||||
import { Icon } from '@/components/uikit/icons';
|
||||
import { TLocales } from '@/models/layout';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useParams } from 'next/navigation';
|
||||
|
||||
const TouchUs = () => {
|
||||
const t = useTranslations();
|
||||
const params = useParams();
|
||||
const locale = params.locale as TLocales;
|
||||
|
||||
return (
|
||||
<div className="w-full p-8 md:w-1/2">
|
||||
@@ -13,6 +17,7 @@ const TouchUs = () => {
|
||||
title={t('pages_contact_title')}
|
||||
description={t('com_contact_touch_title')}
|
||||
description_bold={t('com_contact_touch_title_bold')}
|
||||
locale={locale}
|
||||
/>
|
||||
<p className="mt-4 mb-10 text-base font-normal text-gray-600">
|
||||
{t('com_contact_touch_description')}
|
||||
|
||||
@@ -4,6 +4,8 @@ import images from '@/assets/images/images';
|
||||
import SectionTitle from '@/components/layout/sectionTitle';
|
||||
import Image from 'next/image';
|
||||
import { useTranslations } from 'next-intl';
|
||||
import { useParams } from 'next/navigation';
|
||||
import { TLocales } from '@/models/layout';
|
||||
|
||||
export default function HomeStorySection({
|
||||
className = '',
|
||||
@@ -11,6 +13,8 @@ export default function HomeStorySection({
|
||||
className?: string;
|
||||
}) {
|
||||
const t = useTranslations();
|
||||
const params = useParams();
|
||||
const locale = params.locale as TLocales;
|
||||
|
||||
const statisticsData = [
|
||||
{
|
||||
@@ -36,6 +40,7 @@ export default function HomeStorySection({
|
||||
title={t('com_home_story_title')}
|
||||
description={t('com_home_story_slogan')}
|
||||
description_bold={t('com_home_story_slogan_bold')}
|
||||
locale={locale}
|
||||
/>
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
{[images.homeBanner, images.aboutImg_1].map((e, i) => (
|
||||
|
||||
@@ -5,7 +5,6 @@ import { getProductCategories } from '@/services/products';
|
||||
import Link from 'next/link';
|
||||
import routeFactory from '@/assets/constants/routeFactory';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
import { ILayoutLocaleParams } from '@/models/layout';
|
||||
import { TLocales } from '@/models/layout';
|
||||
|
||||
interface Props {
|
||||
@@ -30,6 +29,7 @@ export default async function HomePageProducts({ locale }: Props) {
|
||||
title={t('pages_product_categories_title')}
|
||||
description={t('com_home_products_title')}
|
||||
reverseColor
|
||||
locale={locale}
|
||||
/>
|
||||
<h4 className="pt-6 text-base font-extralight tracking-normal text-white lg:pt-10">
|
||||
{t('com_home_products_description')}
|
||||
|
||||
@@ -20,6 +20,7 @@ export default async function HomePageProjects({ locale }: Props) {
|
||||
title={t('pages_projects_title')}
|
||||
description={t('com_home_projects_title')}
|
||||
description_bold={t('com_home_projects_title_bold')}
|
||||
locale={locale}
|
||||
/>
|
||||
<h4 className="pt-10 text-base font-extralight tracking-normal max-lg:hidden">
|
||||
{t('com_home_projects_description')}
|
||||
|
||||
Reference in New Issue
Block a user