Merge branch 'main' of https://github.com/batyr-Ashyrberdiyev/turkmen-textile-react
This commit is contained in:
commit
6e53b61259
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -66,9 +66,9 @@
|
|||
})(window, document, "script", "dataLayer", "GTM-NK394LVK");
|
||||
</script>
|
||||
<title>Turkmen Textile</title>
|
||||
<script type="module" crossorigin src="/assets/index-CRgmjeVo.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-ALoH8XND.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/react-vendor-CE_Ks92h.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/ui-library-D1ylK2mW.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/ui-library-Kiotq6MA.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-Cw8L3ftj.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export const Burger: FC<Props> = () => {
|
|||
</div>
|
||||
</SheetTrigger>
|
||||
|
||||
<SheetContent className="overflow-y-auto">
|
||||
<SheetContent className="overflow-y-auto z-[100]">
|
||||
<SheetClose />
|
||||
|
||||
<SheetHeader className="mt-16 flex flex-col gap-2">
|
||||
|
|
|
|||
|
|
@ -19,9 +19,20 @@ export const HomeHero: FC = () => {
|
|||
const md = useMediaQuery("(min-width: 768px)");
|
||||
|
||||
function getBanners() {
|
||||
if (lg) return t("banners.lg", { returnObjects: true }) as string[];
|
||||
if (md) return t("banners.md", { returnObjects: true }) as string[];
|
||||
return t("banners.sm", { returnObjects: true }) as string[];
|
||||
if (lg)
|
||||
return t("banners.lg", { returnObjects: true }) as {
|
||||
path: string;
|
||||
link: string;
|
||||
}[];
|
||||
if (md)
|
||||
return t("banners.md", { returnObjects: true }) as {
|
||||
path: string;
|
||||
link: string;
|
||||
}[];
|
||||
return t("banners.sm", { returnObjects: true }) as {
|
||||
path: string;
|
||||
link: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
const banners = getBanners();
|
||||
|
|
@ -32,23 +43,21 @@ export const HomeHero: FC = () => {
|
|||
<div ref={emblaRef} className="embla overflow-hidden">
|
||||
<div className="embla__container flex">
|
||||
{banners?.map((item, i) =>
|
||||
i === 0 ? (
|
||||
!item.link ? (
|
||||
<div key={i} className="embla__slide flex-[0_0_100%]">
|
||||
<img
|
||||
src={item}
|
||||
alt=""
|
||||
src={item.path}
|
||||
className="size-full object-cover lg:max-h-[600px] lg:min-h-[320px]"
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<Link
|
||||
key={i}
|
||||
to={"/impressions"}
|
||||
to={item.link}
|
||||
className="embla__slide flex-[0_0_100%]"
|
||||
>
|
||||
<img
|
||||
src={item}
|
||||
alt=""
|
||||
src={item.path}
|
||||
className="size-full object-cover lg:max-h-[600px] lg:min-h-[320px]"
|
||||
/>
|
||||
</Link>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import { Container } from "@/components/layout";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useLangStore } from "@/store/lang";
|
||||
import Autoplay from "embla-carousel-autoplay";
|
||||
import useEmblaCarousel from "embla-carousel-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link, useLocation } from "react-router-dom";
|
||||
|
||||
|
|
@ -8,6 +10,17 @@ const Hero = () => {
|
|||
const { t } = useTranslation("main");
|
||||
const lang = useLangStore((state) => state.lang);
|
||||
const { pathname } = useLocation();
|
||||
const [emblaRef] = useEmblaCarousel(
|
||||
{
|
||||
loop: true,
|
||||
},
|
||||
[
|
||||
Autoplay({
|
||||
delay: 5000,
|
||||
stopOnInteraction: false,
|
||||
}),
|
||||
]
|
||||
);
|
||||
|
||||
const { title, texts, button, button2 } = t("impressions.hero", {
|
||||
returnObjects: true,
|
||||
|
|
@ -30,15 +43,29 @@ const Hero = () => {
|
|||
else return value2;
|
||||
};
|
||||
|
||||
const banners = [
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng2.jpg",
|
||||
];
|
||||
|
||||
return (
|
||||
<section className="">
|
||||
<img
|
||||
src={
|
||||
lang === "ru" ? "/impressions-cover.png" : "/impressions-cover-en.png"
|
||||
}
|
||||
alt=""
|
||||
className="w-full object-cover object-top max-h-[610px]"
|
||||
/>
|
||||
{pathname === "/impressions-tm" ? (
|
||||
<div ref={emblaRef} className="embla overflow-hidden">
|
||||
<div className="flex">
|
||||
{banners.map((banner, i) => (
|
||||
<img
|
||||
key={i}
|
||||
src={banner}
|
||||
alt="imperssions"
|
||||
className="w-full object-cover flex-[0_0_100%] object-top max-h-[610px]"
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<img src={t("impressions.banner")} />
|
||||
)}
|
||||
<h1 className="absolute opacity-0 top-0 left-0">Модные показы</h1>
|
||||
|
||||
<div className="bg-[url('/impressions-bg.png')]">
|
||||
|
|
|
|||
|
|
@ -36,3 +36,8 @@
|
|||
|
||||
// "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/Turkmen%20Designers/en/S%20Eng.png",
|
||||
// "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/International%20Designers/Eng.png"
|
||||
|
||||
// {
|
||||
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/en/l.jpg",
|
||||
// "link": ""
|
||||
// },
|
||||
|
|
|
|||
|
|
@ -1,16 +1,46 @@
|
|||
{
|
||||
"banners": {
|
||||
"lg": [
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/en/l.jpg",
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg"
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg",
|
||||
"link": "/impressions"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
|
||||
"link": "/impressions-tm"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng2.jpg",
|
||||
"link": "/impressions-tm"
|
||||
}
|
||||
],
|
||||
"md": [
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/en/m.jpg",
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg"
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg",
|
||||
"link": "/impressions"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
|
||||
"link": "/impressions-tm"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng2.jpg",
|
||||
"link": "/impressions-tm"
|
||||
}
|
||||
],
|
||||
"sm": [
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/en/s.jpg",
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg"
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg",
|
||||
"link": "/impressions"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
|
||||
"link": "/impressions-tm"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng2.jpg",
|
||||
"link": "/impressions-tm"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"impressions": {
|
||||
"banner": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_eng.jpg",
|
||||
"hero": {
|
||||
"title": "TurkmenTextile Expo-2025 – A Crossroads of Style on the Silk Road!",
|
||||
"texts": [
|
||||
|
|
|
|||
|
|
@ -36,3 +36,8 @@
|
|||
|
||||
// "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/Turkmen%20Designers/ru/S%20Rus.png",
|
||||
// "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/International%20Designers/Rus.png"
|
||||
|
||||
// {
|
||||
// "path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/ru/l.jpg",
|
||||
// "link": ""
|
||||
// },
|
||||
|
|
|
|||
|
|
@ -1,16 +1,46 @@
|
|||
{
|
||||
"banners": {
|
||||
"lg": [
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/ru/l.jpg",
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg"
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg",
|
||||
"link": "/impressions"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
|
||||
"link": "/impressions-tm"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng2.jpg",
|
||||
"link": "/impressions-tm"
|
||||
}
|
||||
],
|
||||
"md": [
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/ru/m.jpg",
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg"
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg",
|
||||
"link": "/impressions"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
|
||||
"link": "/impressions-tm"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng2.jpg",
|
||||
"link": "/impressions-tm"
|
||||
}
|
||||
],
|
||||
"sm": [
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/ru/s.jpg",
|
||||
"https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg"
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg",
|
||||
"link": "/impressions"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng1.jpg",
|
||||
"link": "/impressions-tm"
|
||||
},
|
||||
{
|
||||
"path": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/new2/eng2.jpg",
|
||||
"link": "/impressions-tm"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"impressions": {
|
||||
"banner": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/surat/new/web_ru.jpg",
|
||||
"hero": {
|
||||
"title": "TurkmenTextile Expo-2025 – Перекресток стиля на Шелковом Пути!",
|
||||
"texts": [
|
||||
|
|
|
|||
Loading…
Reference in New Issue