turkmen-textile-front/src/components/shared/impressions/hero.tsx

66 lines
2.1 KiB
TypeScript
Raw Normal View History

2025-05-28 10:27:48 +00:00
import { Container } from "@/components/layout";
import { Button } from "@/components/ui/button";
2025-05-30 11:44:48 +00:00
import { useLangStore } from "@/store/lang";
2025-05-28 10:27:48 +00:00
import { useTranslation } from "react-i18next";
2025-05-28 12:06:46 +00:00
import { Link } from "react-router-dom";
2025-05-28 10:27:48 +00:00
const Hero = () => {
const { t } = useTranslation("main");
2025-05-30 11:44:48 +00:00
const lang = useLangStore((state) => state.lang);
2025-05-28 10:27:48 +00:00
const { title, texts, button, button2 } = t("impressions.hero", {
returnObjects: true,
}) as { title: string; texts: string[]; button: string; button2: string };
return (
<section className="">
<img
2025-05-30 11:44:48 +00:00
src={
lang === "ru" ? "/impressions-cover.png" : "/impressions-cover-en.png"
}
2025-05-28 10:27:48 +00:00
alt=""
2025-05-28 12:06:46 +00:00
className="w-full object-cover object-top max-h-[610px]"
2025-05-28 10:27:48 +00:00
/>
<h1 className="absolute opacity-0 top-0 left-0">Показы</h1>
<div className="bg-[url('/impressions-bg.png')]">
2025-05-30 11:44:48 +00:00
<Container className="md:py-20 py-10">
<h2 className="md:text-5xl text-2xl leading-[120%] md:mb-10 mb-6">
{title}
</h2>
2025-05-28 10:27:48 +00:00
<div className="text-on_surface_v flex flex-col gap-3">
{texts.map((item, i) => (
2025-05-30 11:44:48 +00:00
<p className="md:text-lg !normal" key={i}>
2025-05-29 15:17:28 +00:00
{item}
</p>
2025-05-28 10:27:48 +00:00
))}
</div>
2025-05-30 11:44:48 +00:00
<div className="flex md:flex-row flex-col items-center gap-6 mt-6">
2025-05-28 12:06:46 +00:00
<Link
target="_blank"
to="https://turkmentextile.turkmenexpo.com/app/storage/app/media/ICS%20file/TurkmenTextile%20Expo-2025.ics"
className="w-full"
>
<Button size={"sm"} className="w-full">
{button}
</Button>
</Link>
2025-05-29 15:17:28 +00:00
<Link
to="https://turkmentextile.turkmenexpo.com/app/storage/app/media/agenda/agenda_ru.pdf"
target="_blank"
className="w-full"
>
<Button size={"sm"} className="w-full">
{button2}
</Button>
</Link>
2025-05-28 10:27:48 +00:00
</div>
</Container>
</div>
</section>
);
};
export default Hero;