diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-16 19:40:23 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-16 19:40:23 +0200 |
| commit | c77c58e18143233be042c4980a6ed08ae9beac52 (patch) | |
| tree | 94f7d828571a86470ae299fff7dffd32fb38de7c /src/pages/cv.tsx | |
| parent | 2155550fa36a3bc3c8f66e0926530123b4018cd4 (diff) | |
chore: adjust and complete missing styles
* add logo to topics pages and links
* add Prism styles to articles
* and a few other adjustements
Diffstat (limited to 'src/pages/cv.tsx')
| -rw-r--r-- | src/pages/cv.tsx | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/pages/cv.tsx b/src/pages/cv.tsx index b3dec10..7936c84 100644 --- a/src/pages/cv.tsx +++ b/src/pages/cv.tsx @@ -1,4 +1,6 @@ +import Heading from '@components/atoms/headings/heading'; import Link from '@components/atoms/links/link'; +import List from '@components/atoms/lists/list'; import ImageWidget from '@components/organisms/widgets/image-widget'; import SocialMedia from '@components/organisms/widgets/social-media'; import PageLayout, { @@ -9,11 +11,12 @@ import styles from '@styles/pages/cv.module.scss'; import { loadTranslation } from '@utils/helpers/i18n'; import useBreadcrumb from '@utils/hooks/use-breadcrumb'; import useSettings from '@utils/hooks/use-settings'; +import { NestedMDXComponents } from 'mdx/types'; import { GetStaticProps, NextPage } from 'next'; import Head from 'next/head'; import { useRouter } from 'next/router'; import Script from 'next/script'; -import { ReactNode } from 'react'; +import React, { ReactNode } from 'react'; import { useIntl } from 'react-intl'; import { AboutPage, Graph, WebPage } from 'schema-dts'; @@ -141,6 +144,18 @@ const CVPage: NextPage = () => { '@graph': [webpageSchema, cvSchema], }; + const components: NestedMDXComponents = { + a: (props) => <Link external={true} {...props} />, + h1: (props) => <Heading level={1} {...props} />, + h2: (props) => <Heading level={2} {...props} />, + h3: (props) => <Heading level={3} {...props} />, + h4: (props) => <Heading level={4} {...props} />, + h5: (props) => <Heading level={5} {...props} />, + h6: (props) => <Heading level={6} {...props} />, + Link: (props) => <Link {...props} />, + List: (props) => <List {...props} />, + }; + return ( <PageLayout breadcrumb={breadcrumbItems} @@ -166,7 +181,7 @@ const CVPage: NextPage = () => { type="application/ld+json" dangerouslySetInnerHTML={{ __html: JSON.stringify(schemaJsonLd) }} /> - <CVContent /> + <CVContent components={components} /> </PageLayout> ); }; |
