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