|
|
@ -1,5 +1,6 @@ |
|
|
|
import { useEffect, useState } from "react"; |
|
|
|
import { useEffect, useState } from "react"; |
|
|
|
import { RiErrorWarningLine } from "react-icons/ri"; |
|
|
|
import { RiErrorWarningLine } from "react-icons/ri"; |
|
|
|
|
|
|
|
import './index.css'; |
|
|
|
import img1 from "../../assets/img/4bea9a991c6b23d3dcaf231513ee94bd.jpg"; |
|
|
|
import img1 from "../../assets/img/4bea9a991c6b23d3dcaf231513ee94bd.jpg"; |
|
|
|
|
|
|
|
|
|
|
|
let data = [ |
|
|
|
let data = [ |
|
|
@ -61,8 +62,12 @@ let data = [ |
|
|
|
// text: "این سوال برای تست قرار داده میشود و ادامه پیدا میکند تا طول متن بلندتر شود و در پایان علامت سوال قرار میگیرد؟",
|
|
|
|
// text: "این سوال برای تست قرار داده میشود و ادامه پیدا میکند تا طول متن بلندتر شود و در پایان علامت سوال قرار میگیرد؟",
|
|
|
|
// img: "",
|
|
|
|
// img: "",
|
|
|
|
// choices: [
|
|
|
|
// choices: [
|
|
|
|
// "لورم ایپسوم متن ساختگی با تولید سادگی نامفهوم از صنعت چاپ ",
|
|
|
|
// "تیرتسیذر",
|
|
|
|
// "22",
|
|
|
|
// "22",
|
|
|
|
|
|
|
|
// "بتربدر",
|
|
|
|
|
|
|
|
// "تیدرتسر",
|
|
|
|
|
|
|
|
// "تشدتنسدر",
|
|
|
|
|
|
|
|
// "ستیذزتن"
|
|
|
|
// ],
|
|
|
|
// ],
|
|
|
|
// guidance:"",
|
|
|
|
// guidance:"",
|
|
|
|
// choiceWidth: null,
|
|
|
|
// choiceWidth: null,
|
|
|
@ -71,7 +76,7 @@ let data = [ |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
//badgeList-------------
|
|
|
|
//badgeList-------------
|
|
|
|
let badgeList = ["الف", "ب", "ج", "د"]; |
|
|
|
let badgeList = ["الف", "ب", "ج", "د","هـ","ز"]; |
|
|
|
|
|
|
|
|
|
|
|
const Questions = () => { |
|
|
|
const Questions = () => { |
|
|
|
const [Data, setData] = useState(data); |
|
|
|
const [Data, setData] = useState(data); |
|
|
@ -126,6 +131,12 @@ const Questions = () => { |
|
|
|
} else if (wMax < 0.48 * examSize && choiceNumber === 4) { |
|
|
|
} else if (wMax < 0.48 * examSize && choiceNumber === 4) { |
|
|
|
newData[i].choiceWidth = 48; |
|
|
|
newData[i].choiceWidth = 48; |
|
|
|
console.log("oooo"); |
|
|
|
console.log("oooo"); |
|
|
|
|
|
|
|
} else if (wMax < 0.18 * examSize && choiceNumber === 5) { |
|
|
|
|
|
|
|
newData[i].choiceWidth = 18; |
|
|
|
|
|
|
|
console.log("oo"); |
|
|
|
|
|
|
|
} else if (wMax < 0.15 * examSize && choiceNumber === 6) { |
|
|
|
|
|
|
|
newData[i].choiceWidth = 15; |
|
|
|
|
|
|
|
console.log("oo"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
newData[i].choiceWidth = "full"; |
|
|
|
newData[i].choiceWidth = "full"; |
|
|
|
console.log("ooooo"); |
|
|
|
console.log("ooooo"); |
|
|
@ -156,13 +167,13 @@ const Questions = () => { |
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="Questions w-full mt-10"> |
|
|
|
<div className="Questions w-full mt-10"> |
|
|
|
{Data.map((item, index) => ( |
|
|
|
{Data.map((item, index) => ( |
|
|
|
<div key={index} className="w-full mb-24"> |
|
|
|
<div key={index} className="Questions-item w-full mb-24"> |
|
|
|
{/* -----question-text----------------------- */} |
|
|
|
{/* -----question-text----------------------- */} |
|
|
|
<div className="w-full flex flex-row-reverse"> |
|
|
|
<div className="Questions-item-text-container w-full flex flex-row-reverse"> |
|
|
|
<div className="w-10 h-10 rounded-md flex items-center justify-center text-sm bg-[#D5DEEA]"> |
|
|
|
<div className="Qitc-badge w-10 h-10 rounded-md flex items-center justify-center text-sm bg-[#D5DEEA]"> |
|
|
|
{index + 1} |
|
|
|
{index + 1} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div className="w-full mr-2"> |
|
|
|
<div className="Qitc-text w-full mr-2"> |
|
|
|
{item.text && ( |
|
|
|
{item.text && ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="w-full text-right text-base" |
|
|
|
className="w-full text-right text-base" |
|
|
@ -230,8 +241,9 @@ const Questions = () => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
))} |
|
|
|
))} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
{/* -----guidance----------------------------- */} |
|
|
|
{item.guidance && ( |
|
|
|
{item.guidance && ( |
|
|
|
<div className="w-full pr-12 mt-4"> |
|
|
|
<div className="guidance w-full pr-12 mt-4"> |
|
|
|
<div className="w-full px-2 py-3 flex flex-row-reverse rounded-md border border-[##D7DFEA] bg-[#FAFBFB] gap-x-2"> |
|
|
|
<div className="w-full px-2 py-3 flex flex-row-reverse rounded-md border border-[##D7DFEA] bg-[#FAFBFB] gap-x-2"> |
|
|
|
<RiErrorWarningLine className="text-xl text-black" /> |
|
|
|
<RiErrorWarningLine className="text-xl text-black" /> |
|
|
|
<div |
|
|
|
<div |
|
|
@ -245,7 +257,8 @@ const Questions = () => { |
|
|
|
)} |
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
))} |
|
|
|
))} |
|
|
|
<div className="w-full mt-20 pr-12"> |
|
|
|
{/* -----Footer----------------------------- */} |
|
|
|
|
|
|
|
<div className="Footer w-full mt-20 pr-12"> |
|
|
|
<div className="w-full px-2 py-3 flex flex-row-reverse rounded-md border border-[##D7DFEA] bg-[#FAFBFB] gap-x-2"> |
|
|
|
<div className="w-full px-2 py-3 flex flex-row-reverse rounded-md border border-[##D7DFEA] bg-[#FAFBFB] gap-x-2"> |
|
|
|
<RiErrorWarningLine className="text-xl text-black" /> |
|
|
|
<RiErrorWarningLine className="text-xl text-black" /> |
|
|
|
<div |
|
|
|
<div |
|
|
|