1
0
mirror of https://github.com/kamranahmedse/developer-roadmap.git synced 2025-08-30 20:49:49 +02:00
This commit is contained in:
Arik Chakma
2025-08-18 19:41:01 +06:00
parent 2e162b710a
commit e78ef36d9e
2 changed files with 5 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ export function GuideContent(props: GuideContentProps) {
showTableOfContent && 'lg:border-r', showTableOfContent && 'lg:border-r',
)} )}
> >
<div className="prose prose-xl prose-h2:mb-3 prose-h2:mt-10 prose-h2:scroll-mt-5 prose-h2:text-balance prose-h2:text-3xl prose-h3:mt-2 prose-h4:text-2xl prose-h3:scroll-mt-5 prose-h3:text-balance prose-h4:text-balance prose-h5:text-balance prose-h5:font-medium prose-blockquote:font-normal prose-code:bg-transparent prose-img:mt-1 sm:prose-h2:scroll-mt-10 sm:prose-h3:scroll-mt-10 container"> <div className="prose prose-xl prose-h2:mb-3 prose-h2:mt-10 prose-h2:scroll-mt-5 prose-h2:text-balance prose-h2:text-3xl prose-h3:mt-2 prose-h4:text-2xl prose-h3:scroll-mt-5 prose-h3:text-balance prose-h4:text-balance prose-h5:text-balance prose-h5:font-medium prose-blockquote:font-normal prose-code:bg-transparent prose-img:mt-1 sm:prose-h2:scroll-mt-10 sm:prose-h3:scroll-mt-10 prose-li:[&>p]:m-0 container">
<h1 className="mb-3 text-4xl font-bold text-balance"> <h1 className="mb-3 text-4xl font-bold text-balance">
{guide.title} {guide.title}
</h1> </h1>

View File

@@ -129,8 +129,10 @@ export class GuideRenderer {
const nodes = node.content || []; const nodes = node.content || [];
const headlines: Array<HeadingType> = []; const headlines: Array<HeadingType> = [];
let hasFoundQASection = false;
const extractHeadlines = (node: JSONContent) => { const extractHeadlines = (node: JSONContent) => {
if (node.type === 'qaSection') { if (node.type === 'qaSection' || hasFoundQASection) {
hasFoundQASection = true;
return; return;
} }
@@ -231,7 +233,6 @@ export class GuideRenderer {
node.content?.every( node.content?.every(
(child) => child.type === 'text' && child.text === '', (child) => child.type === 'text' && child.text === '',
); );
if (isEmpty) { if (isEmpty) {
return <></>; return <></>;
} }
@@ -368,7 +369,7 @@ export class GuideRenderer {
return <blockquote>{this.content(node)}</blockquote>; return <blockquote>{this.content(node)}</blockquote>;
} }
private questions(node: JSONContent) { questions(node: JSONContent) {
const content = node.content || []; const content = node.content || [];
const questions: QuestionType[] = []; const questions: QuestionType[] = [];
let currentTopic: string | null = null; let currentTopic: string | null = null;