Refactor markdown styles

astro
Kamran Ahmed 2 years ago
parent cb08ead276
commit 6d68542f25
  1. 2
      src/components/Breadcrumbs.astro
  2. 4
      src/components/MarkdownRoadmap.astro
  3. 2
      src/layouts/BaseLayout.astro
  4. 16
      src/pages/[...topicId].astro
  5. 6
      src/pages/[roadmapId].astro
  6. 0
      src/styles/global.css
  7. 0
      src/styles/prism.css

@ -9,7 +9,7 @@ export interface Props {
const { breadcrumbs, roadmapId } = Astro.props; const { breadcrumbs, roadmapId } = Astro.props;
--- ---
<div class='py-7 pb-6 -mb-7'> <div class='py-7 pb-6'>
<!-- Desktop breadcrums --> <!-- Desktop breadcrums -->
<p class='text-gray-500 container hidden sm:block'> <p class='text-gray-500 container hidden sm:block'>
<a href='/roadmaps' class='hover:text-gray-800'>Roadmaps</a> <a href='/roadmaps' class='hover:text-gray-800'>Roadmaps</a>

@ -1,9 +1,9 @@
--- ---
import "./Prism.css"; import "../styles/prism.css";
--- ---
<div class="bg-gray-50 py-4 sm:py-10"> <div class="bg-gray-50 py-4 sm:py-10">
<div class="container prose prose-headings:mt-4 prose-headings:mb-2 prose-p:mb-0.5 "> <div class="container prose prose-headings:mt-4 prose-headings:mb-2 prose-p:mb-0.5">
<slot /> <slot />
</div> </div>
</div> </div>

@ -1,5 +1,5 @@
--- ---
import "../global.css"; import "../styles/global.css";
import Navigation from '../components/Navigation.astro'; import Navigation from '../components/Navigation.astro';
export interface Props { export interface Props {

@ -1,9 +1,9 @@
--- ---
import Breadcrumbs from '../components/Breadcrumbs.astro'; import Breadcrumbs from '../components/Breadcrumbs.astro';
import MarkdownContent from '../components/MarkdownContent/MarkdownContent.astro';
import RoadmapBanner from '../components/RoadmapBanner.astro'; import RoadmapBanner from '../components/RoadmapBanner.astro';
import BaseLayout from '../layouts/BaseLayout.astro'; import BaseLayout from '../layouts/BaseLayout.astro';
import { getTopicFiles, TopicFileType } from '../lib/topic'; import { getTopicFiles, TopicFileType } from '../lib/topic';
import '../styles/prism.css';
export async function getStaticPaths() { export async function getStaticPaths() {
const topicPathMapping = await getTopicFiles(); const topicPathMapping = await getTopicFiles();
@ -20,11 +20,13 @@ const { file, breadcrumbs, roadmapId, roadmap } = Astro.props as TopicFileType;
<BaseLayout title="What is this"> <BaseLayout title="What is this">
<RoadmapBanner roadmapId={roadmapId} roadmap={roadmap} /> <RoadmapBanner roadmapId={roadmapId} roadmap={roadmap} />
<Breadcrumbs breadcrumbs={breadcrumbs} roadmapId={roadmapId} /> <div class="bg-gray-50">
<Breadcrumbs breadcrumbs={breadcrumbs} roadmapId={roadmapId} />
<MarkdownContent> <div class="container pb-16 prose prose-p:mt-0 prose-h1:mb-4">
<main id="main-content"> <main id="main-content">
<file.Content /> <file.Content />
</main> </main>
</MarkdownContent> </div>
</div>
</BaseLayout> </BaseLayout>

@ -1,6 +1,6 @@
--- ---
import InteractiveRoadamp from "../components/InteractiveRoadmap/InteractiveRoadmap.astro"; import InteractiveRoadamp from "../components/InteractiveRoadmap/InteractiveRoadmap.astro";
import MarkdownContent from "../components/MarkdownContent/MarkdownContent.astro"; import MarkdownRoadmap from "../components/MarkdownRoadmap.astro";
import RoadmapHeader from "../components/RoadmapHeader.astro"; import RoadmapHeader from "../components/RoadmapHeader.astro";
import BaseLayout from "../layouts/BaseLayout.astro"; import BaseLayout from "../layouts/BaseLayout.astro";
import { getRoadmapIds, RoadmapFrontmatter } from "../lib/roadmap"; import { getRoadmapIds, RoadmapFrontmatter } from "../lib/roadmap";
@ -41,7 +41,7 @@ const frontmatter = file.frontmatter as RoadmapFrontmatter;
) )
} }
<MarkdownContent> <MarkdownRoadmap>
<file.Content /> <file.Content />
</MarkdownContent> </MarkdownRoadmap>
</BaseLayout> </BaseLayout>

Loading…
Cancel
Save