build
This commit is contained in:
parent
ee03e03e52
commit
878fd860c2
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,10 +66,10 @@
|
|||
})(window, document, "script", "dataLayer", "GTM-NK394LVK");
|
||||
</script>
|
||||
<title>Turkmen Textile</title>
|
||||
<script type="module" crossorigin src="/assets/index-B96Mtra6.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-DneGHC-R.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="/assets/react-vendor-CE_Ks92h.js">
|
||||
<link rel="modulepreload" crossorigin href="/assets/ui-library-_5RJ9fWZ.js">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DszKizJh.css">
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-B4zWz087.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,23 @@
|
|||
import { Container } from "@/components/layout";
|
||||
import { useVideos } from "@/hooks/tanstack/use-videos";
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useLocation } from "react-router-dom";
|
||||
|
||||
const Videos = () => {
|
||||
const { t } = useTranslation("main");
|
||||
const { pathname } = useLocation();
|
||||
const [activeVideo, setActiveVideo] = useState(1);
|
||||
|
||||
const { data } = useVideos(1);
|
||||
|
||||
const fashionData = data?.videos.filter(
|
||||
(item) => item.sections[0] === "fashion_shows"
|
||||
);
|
||||
|
||||
const filteredData = [...(fashionData ?? [])].sort(
|
||||
(a, b) => a?.fashion_shows_order_id + b?.fashion_shows_order_id
|
||||
);
|
||||
|
||||
const { videosTitle, videosTitle2 } = t("impressions", {
|
||||
returnObjects: true,
|
||||
|
|
@ -19,12 +32,12 @@ const Videos = () => {
|
|||
{filter() ? videosTitle : videosTitle2}
|
||||
</h2>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-1 mx-0 lg:mx-48 gap-4 text-white overflow-hidden h-auto md:h-[497px]">
|
||||
<div className="flex flex-col lg:flex-row lg:mx-20 gap-4 text-white overflow-hidden h-fit lg:h-[490px]">
|
||||
{/* FIRST BLOCK */}
|
||||
<div className="bg-gray_10 p-2 rounded-[8px] border border-gray_09 flex flex-col h-full">
|
||||
<div className="maxh-[453px]">
|
||||
<div className="bg-gray_10 flex-auto p-2 rounded-[8px] border border-gray_09 flex flex-col justify-center h-full">
|
||||
<div className="max-h-[450px]">
|
||||
<video
|
||||
src="https://turkmentextile.turkmenexpo.com/app/storage/app/media/video/Textile2025.mp4"
|
||||
src={data?.videos?.[activeVideo]?.video?.path}
|
||||
muted
|
||||
controls
|
||||
autoPlay
|
||||
|
|
@ -32,42 +45,37 @@ const Videos = () => {
|
|||
className="w-full size-full mb-2 rounded"
|
||||
/>
|
||||
</div>
|
||||
{/* <div className="flex items-center justify-between mt-auto">
|
||||
<h3 className="text-sm">
|
||||
<div className="flex items-center justify-between mt-auto">
|
||||
{/* <h3 className="text-sm">
|
||||
Алена Ахмадуллина | 'Царевна-Лебедь' (74 симв.)
|
||||
</h3>
|
||||
<span className="text-xs normal">1/10</span>
|
||||
</div> */}
|
||||
</h3> */}
|
||||
{/* <span className="text-xs normal">1/10</span> */}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* SECOND BLOCK */}
|
||||
{/* <div className="bg-gray_10 px-2 pt-2 rounded-[8px] border border-gray_09 flex flex-col h-full min-h-0">
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<div className="bg-gray_10 flex-[0_0_20%] px-2 pt-2 rounded-[8px] border border-gray_09 flex flex-col h-full">
|
||||
{/* <div className="flex items-center justify-between mb-2">
|
||||
<h3 className="text-sm">Смотрите также</h3>
|
||||
<span className="text-xs normal">1/10</span>
|
||||
</div>
|
||||
</div> */}
|
||||
|
||||
<div className="flex flex-col gap-2 overflow-y-auto flex-grow">
|
||||
{[...Array(10)].map((_, i) => (
|
||||
<div className="flex flex-col gap-2 w-full overflow-y-auto overflow-x-hidden h-full">
|
||||
{filteredData?.map((item, i) => (
|
||||
<div
|
||||
key={i}
|
||||
className="h-[59px] w-full flex items-center gap-2"
|
||||
onClick={() => setActiveVideo(i + 1)}
|
||||
className="basis-[80px] cursor-pointer hover:scale-105 transition-transform overflow-hidden"
|
||||
>
|
||||
<div className="flex-[0_0_27%]">
|
||||
<img
|
||||
src="/impressions/test.png"
|
||||
alt=""
|
||||
className="object-contain rounded-tl rounded-bl"
|
||||
/>
|
||||
</div>
|
||||
<h3 className="text-sm">
|
||||
Алена Ахмадуллина | 'Царевна-Лебедь' 'Царевна-Лебедь' |
|
||||
Алена Ахмадуллина
|
||||
</h3>
|
||||
<img
|
||||
src={item?.video_photo?.path}
|
||||
alt=""
|
||||
className="object-contain size-full rounded-tl rounded-bl"
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
{/* SECOND BLOCK */}
|
||||
</div>
|
||||
</Container>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import { PartnersType } from "@/hooks/tanstack/use-partners";
|
|||
import { NewsInnerType, NewsType } from "./types/news.type";
|
||||
import { ParticipantsType } from "./types/participants.type";
|
||||
import { PhotoTypes } from "./types/photo.type";
|
||||
import { VideoTypes } from "./types/videos.type";
|
||||
import { DesignersType } from "./types/designers.type";
|
||||
import { VideoTypes } from "./types/videos.type";
|
||||
|
||||
const axios_url = axios.create({
|
||||
baseURL: "https://turkmentextile.turkmenexpo.com/app/api/v1/",
|
||||
|
|
|
|||
|
|
@ -1,38 +1,42 @@
|
|||
export interface VideoTypes {
|
||||
status: string;
|
||||
data: Data;
|
||||
}
|
||||
|
||||
export interface Data {
|
||||
id: number;
|
||||
name: string;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
videos: VideoElement[];
|
||||
}
|
||||
|
||||
export interface VideoElement {
|
||||
id: number;
|
||||
name: string;
|
||||
category_video_media_id: number;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
video: VideoPhotoClass;
|
||||
video_photo: VideoPhotoClass;
|
||||
}
|
||||
|
||||
export interface VideoPhotoClass {
|
||||
type VideoFile = {
|
||||
id: number;
|
||||
disk_name: string;
|
||||
file_name: string;
|
||||
file_size: number;
|
||||
content_type: string;
|
||||
title: null;
|
||||
description: null;
|
||||
title: string | null;
|
||||
description: string | null;
|
||||
field: string;
|
||||
sort_order: number;
|
||||
created_at: Date;
|
||||
updated_at: Date;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
path: string;
|
||||
extension: string;
|
||||
}
|
||||
};
|
||||
|
||||
type VideoItem = {
|
||||
id: number;
|
||||
category_video_media_id: number;
|
||||
name: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
sections: string[] | string; // может быть строкой или массивом строк
|
||||
fashion_shows_order_id: number;
|
||||
title: string;
|
||||
text: string;
|
||||
video: VideoFile;
|
||||
video_photo: VideoFile;
|
||||
};
|
||||
|
||||
type TurkmentextileData = {
|
||||
id: number;
|
||||
name: string;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
videos: VideoItem[];
|
||||
};
|
||||
|
||||
export type VideoTypes = {
|
||||
status: "success" | "error";
|
||||
data: TurkmentextileData;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue