|
|
@ -3,8 +3,8 @@ import img2 from "../../assets/img/usgs-hoS3dzgpHzw-unsplash.jpg"; |
|
|
|
import stickynote from "../../assets/img/stickynote.svg"; |
|
|
|
import stickynote from "../../assets/img/stickynote.svg"; |
|
|
|
import clockIcon from "../../assets/img/vuesax-linear-clock.svg"; |
|
|
|
import clockIcon from "../../assets/img/vuesax-linear-clock.svg"; |
|
|
|
import Title from "./Title"; |
|
|
|
import Title from "./Title"; |
|
|
|
import './index.css' |
|
|
|
import "./index.css"; |
|
|
|
const FutureExams = () => { |
|
|
|
const FutureExams = ({ seeMoreHandler, seeMoreStatus, deActiveSeeMore }) => { |
|
|
|
let data = [ |
|
|
|
let data = [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
id: 1, |
|
|
|
id: 1, |
|
|
@ -61,11 +61,12 @@ const FutureExams = () => { |
|
|
|
frontBox[index].style.background = "rgba(223,20,82,0.7)"; |
|
|
|
frontBox[index].style.background = "rgba(223,20,82,0.7)"; |
|
|
|
description[index].style.display = "block"; |
|
|
|
description[index].style.display = "block"; |
|
|
|
// rgba(223,20,82,0.7)
|
|
|
|
// rgba(223,20,82,0.7)
|
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const hoverHandle2 = (index) => { |
|
|
|
const hoverHandle2 = (index) => { |
|
|
|
let frontBox = document.querySelectorAll(".frontBox"); |
|
|
|
let frontBox = document.querySelectorAll(".frontBox"); |
|
|
|
let description = document.querySelectorAll(".frontBox-description"); |
|
|
|
let description = document.querySelectorAll(".frontBox-description"); |
|
|
|
|
|
|
|
if (seeMoreStatus !== 1) { |
|
|
|
if (window.innerWidth >= 1490) { |
|
|
|
if (window.innerWidth >= 1490) { |
|
|
|
frontBox[index].style.transform = "translateY(60%)"; |
|
|
|
frontBox[index].style.transform = "translateY(60%)"; |
|
|
|
} else if (window.innerWidth >= 1410) { |
|
|
|
} else if (window.innerWidth >= 1410) { |
|
|
@ -77,6 +78,9 @@ const FutureExams = () => { |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
frontBox[index].style.transform = "translateY(63%)"; |
|
|
|
frontBox[index].style.transform = "translateY(63%)"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
frontBox[index].style.transform = "translateY(72%)"; |
|
|
|
|
|
|
|
} |
|
|
|
frontBox[index].style.background = |
|
|
|
frontBox[index].style.background = |
|
|
|
"linear-gradient(0deg, rgba(223,20,82,1) 65%, rgba(255,255,255,0) 100%)"; |
|
|
|
"linear-gradient(0deg, rgba(223,20,82,1) 65%, rgba(255,255,255,0) 100%)"; |
|
|
|
description[index].style.display = "none"; |
|
|
|
description[index].style.display = "none"; |
|
|
@ -84,34 +88,58 @@ const FutureExams = () => { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="FutureExams w-[55%] h-full border-l border-[#E0E0E0] px-1 pt-1"> |
|
|
|
<div |
|
|
|
|
|
|
|
className="FutureExams w-[55%] h-full border-l border-[#E0E0E0] px-1 pt-1" |
|
|
|
|
|
|
|
style={seeMoreStatus !== 0 ? { width: "100%", border: "none" } : null} |
|
|
|
|
|
|
|
> |
|
|
|
<div className="w-full h-full overflow-y-auto px-4 pt-4"> |
|
|
|
<div className="w-full h-full overflow-y-auto px-4 pt-4"> |
|
|
|
{/* ----title-------- */} |
|
|
|
{/* ----title-------- */} |
|
|
|
<Title titleText="آزمونهای پیشرو" /> |
|
|
|
<Title |
|
|
|
|
|
|
|
titleText="آزمونهای پیشرو" |
|
|
|
|
|
|
|
seeMoreHandler={() => seeMoreHandler(1)} |
|
|
|
|
|
|
|
seeMoreStatus={seeMoreStatus} |
|
|
|
|
|
|
|
deActiveSeeMore={deActiveSeeMore} |
|
|
|
|
|
|
|
/> |
|
|
|
{/* ----body-------- */} |
|
|
|
{/* ----body-------- */} |
|
|
|
<div className="w-full mt-4 flex flex-row-reverse items-start gap-x-[5%] res1:gap-x-[3.5%] gap-y-4 flex-wrap pb-2"> |
|
|
|
<div |
|
|
|
|
|
|
|
className="w-full mt-4 flex flex-row-reverse items-start gap-x-[5%] res1:gap-x-[3.5%] gap-y-4 flex-wrap pb-2" |
|
|
|
|
|
|
|
style={seeMoreStatus === 1 ? { columnGap: "3.5%" } : null} |
|
|
|
|
|
|
|
> |
|
|
|
{data?.map((item, index) => ( |
|
|
|
{data?.map((item, index) => ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
key={index} |
|
|
|
key={index} |
|
|
|
className="w-[47.5%] res1:w-[31%] aspect-square rounded overflow-hidden relative cursor-pointer" |
|
|
|
className="w-[47.5%] res1:w-[31%] aspect-square rounded overflow-hidden relative cursor-pointer" |
|
|
|
onMouseEnter={() => hoverHandler(index)} |
|
|
|
onMouseEnter={() => hoverHandler(index)} |
|
|
|
onMouseLeave={() => hoverHandle2(index)} |
|
|
|
onMouseLeave={() => hoverHandle2(index)} |
|
|
|
|
|
|
|
style={seeMoreStatus === 1 ? { width: "31%" } : null} |
|
|
|
> |
|
|
|
> |
|
|
|
{/* -----back-img------ */} |
|
|
|
{/* -----back-img------ */} |
|
|
|
<img src={item.img} className="w-full" alt="back-img" /> |
|
|
|
<img src={item.img} className="w-full" alt="back-img" /> |
|
|
|
{/* -----front-data------ */} |
|
|
|
{/* -----front-data------ */} |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="frontBox w-full h-full absolute top-0 left-0 p-3 translate-y-[60%] transition-all duration-300" |
|
|
|
className="frontBox w-full h-full absolute top-0 left-0 p-3 translate-y-[60%] transition-all duration-300" |
|
|
|
style={{ |
|
|
|
style={ |
|
|
|
|
|
|
|
seeMoreStatus === 1 |
|
|
|
|
|
|
|
? { |
|
|
|
background: |
|
|
|
background: |
|
|
|
"linear-gradient(0deg, rgba(223,20,82,1) 65%, rgba(255,255,255,0) 100%)", |
|
|
|
"linear-gradient(0deg, rgba(223,20,82,1) 65%, rgba(255,255,255,0) 100%)", |
|
|
|
}} |
|
|
|
transform: "translateY(72%)", |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
: { |
|
|
|
|
|
|
|
background: |
|
|
|
|
|
|
|
"linear-gradient(0deg, rgba(223,20,82,1) 65%, rgba(255,255,255,0) 100%)", |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
<div className="w-full flex items-center flex-row-reverse pb-1 border-b border-white"> |
|
|
|
<div className="w-full flex items-center flex-row-reverse pb-1 border-b border-white"> |
|
|
|
<img src={stickynote} alt="stickynote" className="h-5 ml-1" /> |
|
|
|
<img src={stickynote} alt="stickynote" className="h-5 ml-1" /> |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="text-xs text-white text-right overflow-hidden text-ellipsis whitespace-nowrap" |
|
|
|
className="text-xs text-white text-right overflow-hidden text-ellipsis whitespace-nowrap" |
|
|
|
style={{ direction: "rtl" }} |
|
|
|
style={ |
|
|
|
|
|
|
|
seeMoreStatus === 1 |
|
|
|
|
|
|
|
? { direction: "rtl", fontSize: "16px" } |
|
|
|
|
|
|
|
: { direction: "rtl" } |
|
|
|
|
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
{item.title} |
|
|
|
{item.title} |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -120,11 +148,17 @@ const FutureExams = () => { |
|
|
|
<div className="w-full flex flex-row-reverse items-center justify-between py-1"> |
|
|
|
<div className="w-full flex flex-row-reverse items-center justify-between py-1"> |
|
|
|
<div className="flex flex-row-reverse items-center"> |
|
|
|
<div className="flex flex-row-reverse items-center"> |
|
|
|
<img src={clockIcon} alt="clockIcon" className="ml-1 h-4" /> |
|
|
|
<img src={clockIcon} alt="clockIcon" className="ml-1 h-4" /> |
|
|
|
<div className="text-xs res1:text-[10px] res0_5:text-xs text-white text-right"> |
|
|
|
<div |
|
|
|
|
|
|
|
className="text-xs res1:text-[10px] res0_5:text-xs text-white text-right" |
|
|
|
|
|
|
|
style={seeMoreStatus === 1 ? { fontSize: "14px" } : null} |
|
|
|
|
|
|
|
> |
|
|
|
{item.date} |
|
|
|
{item.date} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="text-xs res1:text-[10px] res0_5:text-xs text-white text-right"> |
|
|
|
<div |
|
|
|
|
|
|
|
className="text-xs res1:text-[10px] res0_5:text-xs text-white text-right" |
|
|
|
|
|
|
|
style={seeMoreStatus === 1 ? { fontSize: "14px" } : null} |
|
|
|
|
|
|
|
> |
|
|
|
ساعت {item.time} |
|
|
|
ساعت {item.time} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|