diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-06 17:55:24 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-06 18:14:42 +0100 |
| commit | b9c1953c79688fc3f536b7927692309c9780b5da (patch) | |
| tree | 673a26c0b0a9cc587f89d1eea9af739c3f17daf2 /src/pages/cv.tsx | |
| parent | 544f8cd400f888464a18ee30836f63d4b93a0822 (diff) | |
refactor: reuse PostMeta components on single articles/pages
Diffstat (limited to 'src/pages/cv.tsx')
| -rw-r--r-- | src/pages/cv.tsx | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/pages/cv.tsx b/src/pages/cv.tsx index 5107f6a..3faa941 100644 --- a/src/pages/cv.tsx +++ b/src/pages/cv.tsx @@ -6,8 +6,19 @@ import { loadTranslation } from '@utils/helpers/i18n'; import { GetStaticProps, GetStaticPropsContext } from 'next'; import Head from 'next/head'; import CVContent, { intro, meta } from '@content/pages/cv.mdx'; +import PostHeader from '@components/PostHeader/PostHeader'; +import { ArticleMeta } from '@ts/types/articles'; const CV: NextPageWithLayout = () => { + const dates = { + publication: meta.publishedOn, + update: meta.updatedOn, + }; + + const pageMeta: ArticleMeta = { + dates, + }; + return ( <> <Head> @@ -15,12 +26,13 @@ const CV: NextPageWithLayout = () => { <meta name="description" content={seo.cv.description} /> </Head> <article> - <header> - <h1>{meta.title}</h1> - <div dangerouslySetInnerHTML={{ __html: intro }}></div> - </header> - <ToC /> - <CVContent /> + <PostHeader intro={intro} meta={pageMeta} title={meta.title} /> + <aside> + <ToC /> + </aside> + <div> + <CVContent /> + </div> </article> </> ); |
