mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-30 12:40:03 +02:00
Make topic overlay renderer agnostic
This commit is contained in:
@@ -3,11 +3,10 @@ import Icon from '../Icon.astro';
|
|||||||
import Loader from '../Loader.astro';
|
import Loader from '../Loader.astro';
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
roadmapId: string;
|
contentContributionLink: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { roadmapId } = Astro.props;
|
const { contentContributionLink } = Astro.props;
|
||||||
const githubLink = `https://github.com/kamranahmedse/developer-roadmap/tree/master/src/roadmaps/${roadmapId}/content`;
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<div id='topic-overlay' class='hidden'>
|
<div id='topic-overlay' class='hidden'>
|
||||||
@@ -60,7 +59,7 @@ const githubLink = `https://github.com/kamranahmedse/developer-roadmap/tree/mast
|
|||||||
brief description and a few links to learn more about this topic <a
|
brief description and a few links to learn more about this topic <a
|
||||||
target='_blank'
|
target='_blank'
|
||||||
class='underline text-blue-700'
|
class='underline text-blue-700'
|
||||||
href={githubLink}>on GitHub repository.</a
|
href={contentContributionLink}>on GitHub repository.</a
|
||||||
>.
|
>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -47,6 +47,8 @@ if (roadmapData.schema) {
|
|||||||
if (roadmapFAQs.length) {
|
if (roadmapFAQs.length) {
|
||||||
jsonLdSchema.push(generateFAQSchema(roadmapFAQs));
|
jsonLdSchema.push(generateFAQSchema(roadmapFAQs));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const contentContributionLink = `https://github.com/kamranahmedse/developer-roadmap/tree/master/src/roadmaps/${roadmapId}/content`;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout
|
<BaseLayout
|
||||||
@@ -75,7 +77,7 @@ if (roadmapFAQs.length) {
|
|||||||
!roadmapData.isUpcoming && roadmapData.jsonUrl && (
|
!roadmapData.isUpcoming && roadmapData.jsonUrl && (
|
||||||
<div class='max-w-[1000px] container relative'>
|
<div class='max-w-[1000px] container relative'>
|
||||||
<ShareIcons description={roadmapData.featuredDescription} pageUrl={`https://roadmap.sh/${roadmapId}`} />
|
<ShareIcons description={roadmapData.featuredDescription} pageUrl={`https://roadmap.sh/${roadmapId}`} />
|
||||||
<TopicOverlay roadmapId={roadmapId} />
|
<TopicOverlay contentContributionLink={contentContributionLink} />
|
||||||
|
|
||||||
<FrameRenderer roadmapId={roadmapId} jsonUrl={roadmapData.jsonUrl} dimensions={roadmapData.dimensions} />
|
<FrameRenderer roadmapId={roadmapId} jsonUrl={roadmapData.jsonUrl} dimensions={roadmapData.dimensions} />
|
||||||
</div>
|
</div>
|
||||||
|
@@ -4,6 +4,7 @@ import CaptchaScripts from '../../components/Captcha/CaptchaScripts.astro';
|
|||||||
import FrameRenderer from '../../components/FrameRenderer/FrameRenderer.astro';
|
import FrameRenderer from '../../components/FrameRenderer/FrameRenderer.astro';
|
||||||
import MarkdownFile from '../../components/MarkdownFile.astro';
|
import MarkdownFile from '../../components/MarkdownFile.astro';
|
||||||
import ShareIcons from '../../components/ShareIcons/ShareIcons.astro';
|
import ShareIcons from '../../components/ShareIcons/ShareIcons.astro';
|
||||||
|
import TopicOverlay from '../../components/TopicOverlay/TopicOverlay.astro';
|
||||||
import UpcomingForm from '../../components/UpcomingForm.astro';
|
import UpcomingForm from '../../components/UpcomingForm.astro';
|
||||||
import BaseLayout from '../../layouts/BaseLayout.astro';
|
import BaseLayout from '../../layouts/BaseLayout.astro';
|
||||||
import { BestPracticeFrontmatter, getBestPracticeIds } from '../../lib/best-pratice';
|
import { BestPracticeFrontmatter, getBestPracticeIds } from '../../lib/best-pratice';
|
||||||
@@ -40,6 +41,8 @@ if (bestPracticeData.schema) {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const contentContributionLink = `https://github.com/kamranahmedse/developer-roadmap/tree/master/src/best-practices/${bestPracticeId}/content`;
|
||||||
---
|
---
|
||||||
|
|
||||||
<BaseLayout
|
<BaseLayout
|
||||||
@@ -69,6 +72,7 @@ if (bestPracticeData.schema) {
|
|||||||
description={bestPracticeData.featuredDescription}
|
description={bestPracticeData.featuredDescription}
|
||||||
pageUrl={`https://roadmap.sh/best-practices/${bestPracticeId}`}
|
pageUrl={`https://roadmap.sh/best-practices/${bestPracticeId}`}
|
||||||
/>
|
/>
|
||||||
|
<TopicOverlay contentContributionLink={contentContributionLink} />
|
||||||
|
|
||||||
<FrameRenderer
|
<FrameRenderer
|
||||||
roadmapId={bestPracticeId}
|
roadmapId={bestPracticeId}
|
||||||
|
Reference in New Issue
Block a user