|
|
|
@ -51,9 +51,9 @@ export function QuestionCard(props: QuestionCardProps) { |
|
|
|
|
<> |
|
|
|
|
<div |
|
|
|
|
ref={questionRef} |
|
|
|
|
className={`flex flex-grow flex-col items-center justify-center py-8`} |
|
|
|
|
className={`flex flex-grow flex-col items-center justify-center py-5 sm:py-8`} |
|
|
|
|
> |
|
|
|
|
<div className="text-gray-400"> |
|
|
|
|
<div className="hidden text-gray-400 sm:block"> |
|
|
|
|
{question.topics?.map((topic, counter) => { |
|
|
|
|
const totalTopics = question.topics?.length || 0; |
|
|
|
|
|
|
|
|
@ -68,8 +68,8 @@ export function QuestionCard(props: QuestionCardProps) { |
|
|
|
|
})} |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div className="mx-auto flex max-w-[550px] flex-1 items-center justify-center py-8"> |
|
|
|
|
<p className="text-3xl font-semibold leading-normal text-black"> |
|
|
|
|
<div className="mx-auto flex max-w-[550px] flex-1 items-center justify-center py-3 sm:py-8"> |
|
|
|
|
<p className="px-4 text-xl font-semibold !leading-snug text-black sm:text-3xl"> |
|
|
|
|
{question.question} |
|
|
|
|
</p> |
|
|
|
|
</div> |
|
|
|
@ -79,7 +79,7 @@ export function QuestionCard(props: QuestionCardProps) { |
|
|
|
|
onClick={() => { |
|
|
|
|
setIsAnswerVisible(true); |
|
|
|
|
}} |
|
|
|
|
className="cursor-pointer text-gray-500 underline underline-offset-4 transition-colors hover:text-black" |
|
|
|
|
className="cursor-pointer text-sm text-gray-500 underline underline-offset-4 transition-colors hover:text-black sm:text-base" |
|
|
|
|
> |
|
|
|
|
Click to Reveal the Answer |
|
|
|
|
</button> |
|
|
|
@ -88,13 +88,13 @@ export function QuestionCard(props: QuestionCardProps) { |
|
|
|
|
|
|
|
|
|
<div |
|
|
|
|
ref={answerRef} |
|
|
|
|
className={`absolute left-0 right-0 flex flex-col items-center justify-center rounded-[7px] bg-neutral-100 py-8 text-xl leading-normal text-black transition-all duration-300 ${ |
|
|
|
|
isAnswerVisible ? 'top-0 min-h-[398px]' : 'top-full' |
|
|
|
|
className={`absolute left-0 right-0 flex flex-col items-center justify-center rounded-[7px] bg-neutral-100 py-4 text-sm leading-normal text-black transition-all duration-300 sm:py-8 sm:text-xl ${ |
|
|
|
|
isAnswerVisible ? 'top-0 min-h-[248px] sm:min-h-[398px]' : 'top-full' |
|
|
|
|
}`}
|
|
|
|
|
> |
|
|
|
|
{!question.isLongAnswer && ( |
|
|
|
|
<div |
|
|
|
|
className={`mx-auto flex max-w-[600px] flex-grow flex-col items-center justify-center py-0 px-5 text-center text-xl leading-normal`} |
|
|
|
|
className={`mx-auto flex max-w-[600px] flex-grow flex-col items-center justify-center py-0 px-5 text-center text-base leading-normal sm:text-xl`} |
|
|
|
|
dangerouslySetInnerHTML={{ |
|
|
|
|
__html: markdownToHtml(question.answer, false), |
|
|
|
|
}} |
|
|
|
@ -103,7 +103,7 @@ export function QuestionCard(props: QuestionCardProps) { |
|
|
|
|
|
|
|
|
|
{question.isLongAnswer && ( |
|
|
|
|
<div |
|
|
|
|
className={`qa-answer prose prose-sm prose-quoteless mx-auto flex w-full max-w-[600px] flex-grow flex-col items-start justify-center py-0 px-5 text-left text-lg prose-h1:mb-2.5 prose-h1:mt-7 prose-h2:mb-3 prose-h2:mt-0 prose-h3:mb-[5px] prose-h3:mt-[10px] prose-p:mb-4 prose-p:mt-0 prose-blockquote:font-normal prose-blockquote:not-italic prose-blockquote:text-gray-700 prose-pre:w-full prose-pre:!mb-6 prose-li:m-0 prose-li:mb-0.5`} |
|
|
|
|
className={`qa-answer prose prose-sm prose-quoteless mx-auto flex w-full max-w-[600px] flex-grow flex-col items-start justify-center py-0 px-4 text-left text-sm prose-h1:mb-2.5 prose-h1:mt-7 prose-h2:mb-3 prose-h2:mt-0 prose-h3:mb-[5px] prose-h3:mt-[10px] prose-p:mb-2 prose-p:mt-0 prose-blockquote:font-normal prose-blockquote:not-italic prose-blockquote:text-gray-700 prose-pre:!mb-6 prose-pre:w-full prose-ul:my-2 prose-li:m-0 prose-li:mb-0.5 sm:px-5 sm:text-lg sm:prose-p:mb-4`} |
|
|
|
|
dangerouslySetInnerHTML={{ |
|
|
|
|
__html: markdownToHtml(question.answer, false), |
|
|
|
|
}} |
|
|
|
@ -114,7 +114,7 @@ export function QuestionCard(props: QuestionCardProps) { |
|
|
|
|
onClick={() => { |
|
|
|
|
setIsAnswerVisible(false); |
|
|
|
|
}} |
|
|
|
|
className="cursor-pointer text-base text-gray-500 underline underline-offset-4 transition-colors hover:text-black" |
|
|
|
|
className="cursor-pointer text-sm text-gray-500 underline underline-offset-4 transition-colors hover:text-black sm:text-base" |
|
|
|
|
> |
|
|
|
|
Hide the Answer |
|
|
|
|
</button> |
|
|
|
|