2025-06-09 17:14:44 +03:30
|
|
|
import SectionTitle from '@/components/layout/sectionTitle';
|
|
|
|
|
import { getTranslations } from 'next-intl/server';
|
|
|
|
|
import { TLocales } from '@/models/layout';
|
2025-06-10 17:30:21 +03:30
|
|
|
import { getProjects } from '@/services/projects';
|
|
|
|
|
import ProjectsGrid from '../project/ProjectGrid';
|
2025-06-18 20:02:27 +03:30
|
|
|
import Button from '@/components/uikit/button';
|
|
|
|
|
import routeFactory from '@/assets/constants/routeFactory';
|
2025-06-09 17:14:44 +03:30
|
|
|
interface Props {
|
|
|
|
|
locale: TLocales;
|
|
|
|
|
}
|
|
|
|
|
export default async function HomePageProjects({ locale }: Props) {
|
|
|
|
|
const t = await getTranslations({ locale });
|
2025-06-18 20:02:27 +03:30
|
|
|
const projects = await getProjects();
|
|
|
|
|
|
|
|
|
|
const routes = routeFactory(t, locale);
|
2025-06-09 17:14:44 +03:30
|
|
|
return (
|
|
|
|
|
<div className="w-full">
|
2025-06-19 15:48:47 +03:30
|
|
|
<div className="relative container mx-auto w-full bg-white">
|
2025-06-18 20:02:27 +03:30
|
|
|
<div className="relative z-20 grid grid-cols-1 lg:grid-cols-2 lg:gap-28">
|
2025-06-09 17:14:44 +03:30
|
|
|
<SectionTitle
|
2025-06-10 17:30:21 +03:30
|
|
|
title={t('pages_projects_title')}
|
|
|
|
|
description={t('com_home_projects_title')}
|
|
|
|
|
description_bold={t('com_home_projects_title_bold')}
|
2025-06-16 15:21:44 +03:30
|
|
|
locale={locale}
|
2025-06-09 17:14:44 +03:30
|
|
|
/>
|
2025-06-18 20:02:27 +03:30
|
|
|
<div className="pt-10 max-lg:hidden">
|
|
|
|
|
<h4 className="text-base font-extralight tracking-normal max-lg:hidden">
|
|
|
|
|
{t('com_home_projects_description')}
|
|
|
|
|
</h4>
|
|
|
|
|
<Button
|
|
|
|
|
link={routes.projects.route()}
|
|
|
|
|
endIcon="showMore"
|
|
|
|
|
className="mt-5"
|
|
|
|
|
>
|
|
|
|
|
{t('com_home_projects_show_more')}
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
2025-06-09 17:14:44 +03:30
|
|
|
</div>
|
|
|
|
|
|
2025-06-18 20:02:27 +03:30
|
|
|
<ProjectsGrid projects={projects.data?.slice(3)} className="mt-10" />
|
|
|
|
|
<Button
|
|
|
|
|
link={routes.projects.route()}
|
|
|
|
|
endIcon="showMore"
|
|
|
|
|
className="mx-auto mt-5 lg:hidden"
|
|
|
|
|
>
|
|
|
|
|
{t('com_home_projects_show_more')}
|
|
|
|
|
</Button>
|
2025-06-09 17:14:44 +03:30
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|