Refactor roadmaps

pull/3356/head
Kamran Ahmed 2 years ago
parent a12ec64af5
commit f675f08d83
  1. 2
      src/components/MarkdownFile.astro
  2. 2
      src/components/UpcomingForm.astro
  3. 9
      src/pages/[roadmapId]/index.astro
  4. 9
      src/pages/best-practices/[bestPracticeId].astro

@ -1,4 +1,4 @@
<div class='bg-gray-50 py-2'> <div class='bg-gray-50'>
<div <div
class='container prose-blockquote:font-normal prose prose-code:bg-transparent prose-h2:text-3xl prose-h2:mt-4 prose-h2:mb-2 prose-h3:mt-2 prose-img:mt-1' class='container prose-blockquote:font-normal prose prose-code:bg-transparent prose-h2:text-3xl prose-h2:mt-4 prose-h2:mb-2 prose-h3:mt-2 prose-img:mt-1'
> >

@ -8,7 +8,7 @@ import Icon from './Icon.astro';
> >
<div class='sm:max-w-[400px] mx-auto'> <div class='sm:max-w-[400px] mx-auto'>
<div class='hidden sm:block'><Icon icon='bell' /></div> <div class='hidden sm:block'><Icon icon='bell' /></div>
<h2 class='text-3xl mb-1 font-medium hidden sm:block'>Upcoming Roadmap</h2> <h2 class='text-3xl mb-1 font-medium hidden sm:block'>Upcoming</h2>
<p class='text-gray-600 mb-0 sm:mb-5'> <p class='text-gray-600 mb-0 sm:mb-5'>
Please check back later or subscribe below. Please check back later or subscribe below.
</p> </p>

@ -3,12 +3,11 @@ import CaptchaScripts from '../../components/Captcha/CaptchaScripts.astro';
import FAQs from '../../components/FAQs/FAQs.astro'; import FAQs from '../../components/FAQs/FAQs.astro';
import InteractiveRoadmap from '../../components/InteractiveRoadmap/InteractiveRoadmap.astro'; import InteractiveRoadmap from '../../components/InteractiveRoadmap/InteractiveRoadmap.astro';
import MarkdownFile from '../../components/MarkdownFile.astro'; import MarkdownFile from '../../components/MarkdownFile.astro';
import MarkdownRoadmap from '../../components/MarkdownRoadmap.astro';
import RoadmapHeader from '../../components/RoadmapHeader.astro'; import RoadmapHeader from '../../components/RoadmapHeader.astro';
import UpcomingRoadmap from '../../components/UpcomingRoadmap.astro'; import UpcomingForm from '../../components/UpcomingForm.astro';
import BaseLayout from '../../layouts/BaseLayout.astro'; import BaseLayout from '../../layouts/BaseLayout.astro';
import { generateArticleSchema, generateFAQSchema } from '../../lib/jsonld-schema'; import { generateArticleSchema,generateFAQSchema } from '../../lib/jsonld-schema';
import { getRoadmapIds, RoadmapFrontmatter } from '../../lib/roadmap'; import { getRoadmapIds,RoadmapFrontmatter } from '../../lib/roadmap';
export async function getStaticPaths() { export async function getStaticPaths() {
const roadmapIds = await getRoadmapIds(); const roadmapIds = await getRoadmapIds();
@ -87,7 +86,7 @@ if (roadmapFAQs.length) {
) )
} }
{roadmapData.isUpcoming && <UpcomingRoadmap />} {roadmapData.isUpcoming && <UpcomingForm />}
<FAQs faqs={roadmapFAQs} /> <FAQs faqs={roadmapFAQs} />

@ -1,10 +1,9 @@
--- ---
import CaptchaScripts from '../../components/Captcha/CaptchaScripts.astro'; import CaptchaScripts from '../../components/Captcha/CaptchaScripts.astro';
import FAQs from '../../components/FAQs/FAQs.astro';
import InteractiveRoadmap from '../../components/InteractiveRoadmap/InteractiveRoadmap.astro'; import InteractiveRoadmap from '../../components/InteractiveRoadmap/InteractiveRoadmap.astro';
import MarkdownFile from '../../components/MarkdownFile.astro'; import MarkdownFile from '../../components/MarkdownFile.astro';
import RoadmapHeader from '../../components/RoadmapHeader.astro'; import RoadmapHeader from '../../components/RoadmapHeader.astro';
import UpcomingRoadmap from '../../components/UpcomingRoadmap.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';
import { generateArticleSchema } from '../../lib/jsonld-schema'; import { generateArticleSchema } from '../../lib/jsonld-schema';
@ -23,7 +22,6 @@ interface Params extends Record<string, string | undefined> {
const { bestPracticeId } = Astro.params as Params; const { bestPracticeId } = Astro.params as Params;
const bestPracticeFile = await import(`../../best-practices/${bestPracticeId}/${bestPracticeId}.md`); const bestPracticeFile = await import(`../../best-practices/${bestPracticeId}/${bestPracticeId}.md`);
const { faqs: roadmapFAQs = [] } = await import(`../../roadmaps/${bestPracticeId}/faqs.astro`);
const bestPracticeData = bestPracticeFile.frontmatter as BestPracticeFrontmatter; const bestPracticeData = bestPracticeFile.frontmatter as BestPracticeFrontmatter;
let jsonLdSchema = []; let jsonLdSchema = [];
@ -78,9 +76,6 @@ if (bestPracticeData.schema) {
) )
} }
{bestPracticeData.isUpcoming && <UpcomingRoadmap />} {bestPracticeData.isUpcoming && <UpcomingForm />}
<FAQs faqs={roadmapFAQs} />
<CaptchaScripts slot='after-footer' /> <CaptchaScripts slot='after-footer' />
</BaseLayout> </BaseLayout>

Loading…
Cancel
Save