|
|
@ -1,20 +1,19 @@ |
|
|
|
import React, { useState } from "react"; |
|
|
|
import React, { useState } from "react"; |
|
|
|
import { Link } from "react-router-dom"; |
|
|
|
import { Link } from "react-router-dom"; |
|
|
|
import { Carousel } from "@trendyol-js/react-carousel"; |
|
|
|
import { Carousel } from "@trendyol-js/react-carousel"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//components
|
|
|
|
|
|
|
|
import Video from "../../../../../components/JolPlayer"; |
|
|
|
import Book from "../../../Landscape/Page1/Book"; |
|
|
|
import Book from "../../../Landscape/Page1/Book"; |
|
|
|
import Lights from "../../../Landscape/Page1/Lights"; |
|
|
|
import Lights from "../../../Landscape/Page1/Lights"; |
|
|
|
import Video from "../../../../../components/JolPlayer"; |
|
|
|
|
|
|
|
|
|
|
|
//assets
|
|
|
|
import arrow from "../../../../../assets/icons/dropdown-blue.svg"; |
|
|
|
import arrow from "../../../../../assets/icons/dropdown-blue.svg"; |
|
|
|
import olum1Image from "../../../../../assets/images/olum-1.svg"; |
|
|
|
|
|
|
|
import olum2Image from "../../../../../assets/images/olum-2.svg"; |
|
|
|
|
|
|
|
import olum4Image from "../../../../../assets/images/olum-4.svg"; |
|
|
|
|
|
|
|
import olum7Image from "../../../../../assets/images/olum-7.svg"; |
|
|
|
|
|
|
|
import zist11Image from "../../../../../assets/images/zist-11.svg"; |
|
|
|
|
|
|
|
import sheffImage from "../../../../../assets/images/sheff.svg"; |
|
|
|
import sheffImage from "../../../../../assets/images/sheff.svg"; |
|
|
|
import flatFlower from "../../../../../assets/icons/flat-flower-white.svg"; |
|
|
|
import flatFlower from "../../../../../assets/icons/flat-flower-white.svg"; |
|
|
|
import jojoImage from "../../../../../assets/images/jojo.svg"; |
|
|
|
import jojoImage from "../../../../../assets/images/jojo.svg"; |
|
|
|
|
|
|
|
|
|
|
|
function Header({ list }) { |
|
|
|
function Header({ bookList }) { |
|
|
|
const [show, setShow] = useState(2); |
|
|
|
const [show, setShow] = useState(2); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
@ -32,37 +31,41 @@ function Header({ list }) { |
|
|
|
className="absolute transform left-1/2 top-0 -translate-x-1/2 opacity-30" |
|
|
|
className="absolute transform left-1/2 top-0 -translate-x-1/2 opacity-30" |
|
|
|
/> |
|
|
|
/> |
|
|
|
<Lights degrees={[0, 0]} /> |
|
|
|
<Lights degrees={[0, 0]} /> |
|
|
|
<div className="w-full flex flex-col lg:px-8 relative"> |
|
|
|
{bookList?.length ? ( |
|
|
|
<div className="w-full relative z-10 px-4" style={{ direction: "ltr" }}> |
|
|
|
<div className="w-full flex flex-col lg:px-8 relative"> |
|
|
|
<Carousel |
|
|
|
<div className="w-full relative z-10 px-4 ltr"> |
|
|
|
show={show} |
|
|
|
<Carousel |
|
|
|
slide={1} |
|
|
|
show={show} |
|
|
|
swiping={true} |
|
|
|
slide={1} |
|
|
|
swipeOn={0.05} |
|
|
|
key={bookList?.length} |
|
|
|
// useArrowKeys={true}
|
|
|
|
swiping={true} |
|
|
|
transition={0.5} |
|
|
|
swipeOn={0.05} |
|
|
|
rightArrow={ |
|
|
|
// useArrowKeys={true}
|
|
|
|
<img |
|
|
|
transition={0.5} |
|
|
|
className="w-5 absolute top-1/2 transform -translate-y-1/2 cursor-pointer -rotate-90" |
|
|
|
rightArrow={ |
|
|
|
src={arrow} |
|
|
|
<img |
|
|
|
alt="" |
|
|
|
className="w-5 absolute top-1/2 transform -translate-y-1/2 cursor-pointer -rotate-90" |
|
|
|
/> |
|
|
|
src={arrow} |
|
|
|
} |
|
|
|
alt="" |
|
|
|
leftArrow={ |
|
|
|
/> |
|
|
|
<img |
|
|
|
} |
|
|
|
className="w-5 absolute top-1/2 transform -translate-y-1/2 -translate-x-5 cursor-pointer rotate-90" |
|
|
|
leftArrow={ |
|
|
|
src={arrow} |
|
|
|
<img |
|
|
|
alt="" |
|
|
|
className="w-5 absolute top-1/2 transform -translate-y-1/2 -translate-x-5 cursor-pointer rotate-90" |
|
|
|
/> |
|
|
|
src={arrow} |
|
|
|
} |
|
|
|
alt="" |
|
|
|
> |
|
|
|
/> |
|
|
|
{list.map((book, index) => ( |
|
|
|
} |
|
|
|
<Book book={book} key={index} /> |
|
|
|
> |
|
|
|
))} |
|
|
|
{bookList?.map((book, index) => ( |
|
|
|
</Carousel> |
|
|
|
<Book book={book} key={index} /> |
|
|
|
|
|
|
|
))} |
|
|
|
|
|
|
|
</Carousel> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<img src={sheffImage} alt="" className="w-full absolute bottom-0" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<img src={sheffImage} alt="" className="w-full absolute bottom-0" /> |
|
|
|
) : null} |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className="w-full flex justify-center mt-5"> |
|
|
|
<div className="w-full flex justify-center mt-5"> |
|
|
|
<Link |
|
|
|
<Link |
|
|
|
to="/products" |
|
|
|
to="/products" |
|
|
@ -100,54 +103,15 @@ function Header({ list }) { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="w-full p-4 transform translate-y-1/3 relative"> |
|
|
|
<div className="w-full p-4 transform translate-y-1/3 relative"> |
|
|
|
<img |
|
|
|
{/* <img |
|
|
|
src={jojoImage} |
|
|
|
src={jojoImage} |
|
|
|
alt="" |
|
|
|
alt="" |
|
|
|
className="w-full z-10 absolute top-0 left-0" |
|
|
|
className="w-full z-10 absolute top-0 left-0" |
|
|
|
/> |
|
|
|
/> */} |
|
|
|
<Video /> |
|
|
|
{/* <Video /> */} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default Header; |
|
|
|
export default Header; |
|
|
|
|
|
|
|
|
|
|
|
Header.defaultProps = { |
|
|
|
|
|
|
|
list: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: window.t("زیست یازدهم"), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
imageUrl: zist11Image, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: window.t("علوم دوم"), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
imageUrl: olum2Image, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: window.t("علوم اول"), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
imageUrl: olum1Image, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: window.t("علوم هفتم"), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
imageUrl: olum7Image, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: window.t("علوم چهارم"), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
imageUrl: olum4Image, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: window.t("علوم چهارم"), |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
imageUrl: olum4Image, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
name: window.t("علوم چهارم"), |
|
|
|
|
|
|
|
imageUrl: olum4Image, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
], |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|