update link and header styling

pull/26459/head^2
Paul Wackerow 2 years ago
parent f6962d5b85
commit b382a5ad1a
No known key found for this signature in database
GPG Key ID: BB63E296FE9CAB8D
  1. 5
      src/components/MDXComponents.tsx
  2. 10
      src/pages/[...slug].tsx

@ -80,7 +80,7 @@ const MDXComponents = {
<NextLink href={href} passHref> <NextLink href={href} passHref>
<Link <Link
isExternal={href.startsWith('http') && !href.includes('geth.ethereum.org')} isExternal={href.startsWith('http') && !href.includes('geth.ethereum.org')}
color='primary' variant='light'
> >
{children} {children}
</Link> </Link>
@ -97,7 +97,7 @@ const MDXComponents = {
}, },
h2: ({ children }: any) => { h2: ({ children }: any) => {
return ( return (
<Heading as='h2' textAlign='start' mb={4} {...header2}> <Heading as='h2' textAlign='start' mt='16 !important' mb={4} {...header2}>
{children} {children}
</Heading> </Heading>
); );
@ -116,7 +116,6 @@ const MDXComponents = {
</Heading> </Heading>
); );
}, },
// lists
// tables // tables
table: ({ children }: any) => ( table: ({ children }: any) => (
<Flex maxW='min(100%, 100vw)' overflowX='scroll'> <Flex maxW='min(100%, 100vw)' overflowX='scroll'>

@ -2,7 +2,7 @@ import fs from 'fs';
import matter from 'gray-matter'; import matter from 'gray-matter';
import yaml from 'js-yaml'; import yaml from 'js-yaml';
import ReactMarkdown from 'react-markdown'; import ReactMarkdown from 'react-markdown';
import { Heading } from '@chakra-ui/react'; import { Stack, Heading } from '@chakra-ui/react';
import MDXComponents from '../components/'; import MDXComponents from '../components/';
import { ParsedUrlQuery } from 'querystring'; import { ParsedUrlQuery } from 'querystring';
import type { GetStaticPaths, GetStaticProps, NextPage } from 'next'; import type { GetStaticPaths, GetStaticProps, NextPage } from 'next';
@ -74,7 +74,13 @@ const DocPage: NextPage<Props> = ({ frontmatter, content }) => {
return ( return (
<> <>
<main> <main>
<Heading as='h1' mb={5} {...textStyles.header1}>{frontmatter.title}</Heading> <Stack mb={16}>
{/* TODO: <BREADCRUMBS/> */}
<Heading as='h1' mt='4 !important' mb={0} {...textStyles.header1}>
{frontmatter.title}
</Heading>
{/* <Text as='span' mt='0 !important'>last edited {TODO: get last edited date}</Text> */}
</Stack>
<ReactMarkdown remarkPlugins={[gfm]} components={ChakraUIRenderer(MDXComponents)}>{content}</ReactMarkdown> <ReactMarkdown remarkPlugins={[gfm]} components={ChakraUIRenderer(MDXComponents)}>{content}</ReactMarkdown>
</main> </main>
</> </>

Loading…
Cancel
Save