diff --git a/src/components/markdown/MDXProvider.tsx b/src/components/markdown/MDXProvider.tsx index e4eb332..f2df11f 100644 --- a/src/components/markdown/MDXProvider.tsx +++ b/src/components/markdown/MDXProvider.tsx @@ -34,7 +34,7 @@ const components = { /> -
+

{title}

{children}
@@ -87,7 +87,7 @@ const components = { Optional{title ? `: ${title}` : ''}
-
{children}
+
{children}
), 'problems-list': ProblemsListComponent, @@ -127,9 +127,33 @@ const components = { /> ), h3: props => ( -

+

), + h4: props => ( +

+ ), + p: props =>

, + 'ul.li': ({ children, ...props }) => ( +

  • + + + + + +
    {children}
    +
  • + ), }; export default function ({ children }) { diff --git a/src/components/markdown/Markdown.tsx b/src/components/markdown/Markdown.tsx index 7e1d9fd..3e45dd8 100644 --- a/src/components/markdown/Markdown.tsx +++ b/src/components/markdown/Markdown.tsx @@ -3,9 +3,9 @@ import * as React from 'react'; import 'katex/dist/katex.min.css'; import { MDXRenderer } from 'gatsby-plugin-mdx'; -const Markdown = ({ body, className }) => { +const Markdown = ({ body }) => { return ( -
    +
    {body}
    ); diff --git a/src/components/markdown/Resources.tsx b/src/components/markdown/Resources.tsx index f9b45e7..dbfb49f 100644 --- a/src/components/markdown/Resources.tsx +++ b/src/components/markdown/Resources.tsx @@ -6,10 +6,8 @@ export function ResourcesListComponent(props) { return (
    p + p { @apply mt-6; } @@ -37,10 +33,6 @@ @apply font-bold; } -.markdown h4 { - @apply leading-none text-base font-semibold mb-4 mt-6; -} - .markdown h5 { @apply leading-tight text-sm font-semibold mb-4 mt-6; } @@ -53,32 +45,55 @@ @apply text-base border-l-4 border-gray-300 pl-4 pr-4 text-gray-600; } -.markdown ul { - @apply text-base list-disc mb-4; +.markdown ul, +.markdown ol { + @apply pl-4 mb-6; } .markdown ul ul { - list-style-type: circle; + @apply mt-1 pl-2 mb-0; } -.markdown ul ul ul { - list-style-type: square; +.markdown ul > li { + @apply mb-3; } -.markdown--module ul { - @apply pl-8; -} - -.markdown ul ul { +.markdown ul > li:last-of-type { @apply mb-0; } +.markdown ul ul > li { + @apply mb-1; +} + +.markdown ol > li { + @apply mb-3; +} + +.markdown ol > li:last-of-type { + @apply mb-0; +} + +.markdown ol ol > li { + @apply mb-1; +} + .markdown ul p { @apply mb-0; } .markdown ol { - @apply text-base pl-8 list-decimal mb-4; + counter-reset: number; +} + +.markdown ol li { + display: flex; + counter-increment: number; +} + +.markdown ol li:before { + content: counters(number, '.') '.'; + @apply text-blue-600 font-bold mr-2; } .markdown kbd { @@ -90,10 +105,6 @@ @apply bg-gray-100 !important; } -.markdown--module .syllabus-only { - display: none; -} - .spoiler-body > pre { margin-left: -1rem !important; margin-right: -1rem !important; diff --git a/src/templates/moduleTemplate.tsx b/src/templates/moduleTemplate.tsx index 618b02a..02ab507 100644 --- a/src/templates/moduleTemplate.tsx +++ b/src/templates/moduleTemplate.tsx @@ -73,7 +73,7 @@ export default function Template(props) {
    )} - +