This commit is contained in:
Batyr 2025-06-06 17:10:02 +05:00
parent 9be1bed8f2
commit d25230e441
12 changed files with 46 additions and 64 deletions

File diff suppressed because one or more lines are too long

1
dist/assets/index-Cw8L3ftj.css vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/assets/index-DlUFizdK.js vendored Normal file

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

6
dist/index.html vendored
View File

@ -66,10 +66,10 @@
})(window, document, "script", "dataLayer", "GTM-NK394LVK");
</script>
<title>Turkmen Textile</title>
<script type="module" crossorigin src="/assets/index-z0THaZxk.js"></script>
<script type="module" crossorigin src="/assets/index-DlUFizdK.js"></script>
<link rel="modulepreload" crossorigin href="/assets/react-vendor-CE_Ks92h.js">
<link rel="modulepreload" crossorigin href="/assets/ui-library-C3-VTg0c.js">
<link rel="stylesheet" crossorigin href="/assets/index-BebVnGkB.css">
<link rel="modulepreload" crossorigin href="/assets/ui-library-D1ylK2mW.js">
<link rel="stylesheet" crossorigin href="/assets/index-Cw8L3ftj.css">
</head>
<body>
<div id="root"></div>

View File

@ -44,27 +44,21 @@ export const HomeActions: FC<Props> = ({ className }) => {
</Button>
</Link>
) : (
<Link
target={item.blank ? "_blank" : ""}
<Menu
key={i}
to={item.link ?? ""}
className="w-full"
dropDownContent={item.items}
triggerClassName="w-full"
className="!w-full"
>
<Menu
dropDownContent={item.items}
triggerClassName="w-full"
className="!w-full"
<Button
size={"lg"}
variant={"teritary"}
className="w-full drop-shadow-sm shadow-md md:text-xl text-lg bg-teritary text-on_teritary hover:bg-teritary/90"
>
<Button
size={"lg"}
variant={"teritary"}
className="w-full drop-shadow-sm shadow-md md:text-xl text-lg bg-teritary text-on_teritary hover:bg-teritary/90"
>
{item.text}
<Chevron w={"40"} h={"40"} color="white" />
</Button>
</Menu>
</Link>
{item.text}
<Chevron w={"40"} h={"40"} color="white" />
</Button>
</Menu>
)
)}
</div>

View File

@ -17,6 +17,7 @@ interface Props {
hoverItems?: {
text: string;
link?: string;
blank?: boolean;
}[];
setIsOpen: (val: boolean) => void;
}
@ -51,7 +52,9 @@ export const HoverMenu: FC<Props> = ({
}}
className="h-14 py-2 flex items-center w-40 cursor-pointer px-4 hover:bg-slate-300/50 transition-all"
>
<Link to={item.link ?? ""}>{item.text}</Link>
<Link target={item.blank ? "_blank" : ""} to={item.link ?? ""}>
{item.text}
</Link>
</NavigationMenuLink>
))}
</NavigationMenuContent>

View File

@ -24,7 +24,6 @@ export const Menu: FC<PropsWithChildren<Props>> = ({
children,
}) => {
const [isOpen, setIsOpen] = useState(false);
const [isHover, setIsHover] = useState(false);
const setSheet = useUiStore((state) => state.setSheet);
return (
@ -49,14 +48,15 @@ export const Menu: FC<PropsWithChildren<Props>> = ({
<HoverMenu setIsOpen={setIsOpen} key={i} {...item} />
) : item.link ? (
<Link
key={i}
to={item.link ?? ""}
onClick={() => {
setIsOpen(false);
setSheet(false);
}}
className="h-14 px-3 flex gap-3 justify-between cursor-pointer items-center hover:bg-slate-300/50 transition-all"
key={item.text}
target={item.blank ? "_blank" : ""}
to={item.link}
className="h-14 px-3 flex gap-3 relative justify-between cursor-pointer items-center hover:bg-slate-300/50 transition-all"
target={item.blank ? "_blank" : undefined}
rel={item.blank ? "noopener noreferrer" : undefined}
>
{item.text}
{item.blank && <img src="/pdf.svg" />}
@ -64,14 +64,8 @@ export const Menu: FC<PropsWithChildren<Props>> = ({
) : item.modal ? (
<Modal key={item.text} title={item.text} />
) : (
<div
onMouseEnter={() => setIsHover(item.hover ? true : false)}
onMouseLeave={() => setIsHover(false)}
className="relative"
key={i}
>
<div className="relative" key={i}>
<div
key={item.text}
className="h-14 px-3 py-2 flex items-center cursor-pointer hover:bg-slate-300/50 transition-all"
onClick={() => {
setIsOpen(false);
@ -80,19 +74,6 @@ export const Menu: FC<PropsWithChildren<Props>> = ({
>
{item.text}
</div>
{isHover && (
<div className="absolute bottom-0 flex flex-col -right-40 bg-surface_container">
{item.hoverItems?.map((item, i) => (
<Link
key={i}
to={item.link ?? ""}
className="h-14 px-3 py-2"
>
{item.text}
</Link>
))}
</div>
)}
</div>
)
)}

View File

@ -54,7 +54,7 @@
},
{
"text": "Programme",
"link": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/agenda/agenda_ru.pdf",
"link": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/agenda/agenda_en.pdf",
"blank": "blank"
},
{
@ -68,11 +68,13 @@
"hoverItems": [
{
"text": "For designers",
"link": "/impressions"
"link": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/Masterclasses_d/Masterclasses_eng.pdf",
"blank": true
},
{
"text": "For visitors",
"link": ""
"link": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/Masterclasses_v/Masterclasses_eng.pdf",
"blank": true
}
]
}

View File

@ -3,7 +3,7 @@
{
"title": "Путеводитель",
"link": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/travel_guide/Travel_guide_ru.pdf",
"blank": "blank"
"blank": true
},
{
"title": "Новости",
@ -54,12 +54,12 @@
{
"text": "Программа",
"link": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/agenda/agenda_ru.pdf",
"blank": "blank"
"blank": true
},
{
"text": "Путеводитель",
"link": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/travel_guide/Travel_guide_ru.pdf",
"blank": "blank"
"blank": true
},
{
"text": "Матстер классы",
@ -67,11 +67,13 @@
"hoverItems": [
{
"text": "Для дизайнеров",
"link": "/impressions"
"link": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/Masterclasses_d/Masterclasses_ru.pdf",
"blank": true
},
{
"text": "Для посетителей",
"link": ""
"link": "https://turkmentextile.turkmenexpo.com/app/storage/app/media/Masterclasses_v/Masterclasses_ru.pdf",
"blank": true
}
]
}

View File

@ -10,7 +10,7 @@ export interface DropDownContent {
text: string;
link?: string;
modal?: boolean;
blank?: string;
blank?: boolean;
hover?: boolean;
hoverItems?: {
text: "string";