From 926e1df1e9a7de29134293fe2306c9d9ecb594a6 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 21 Dec 2021 15:20:17 +0100 Subject: chore: add a table of contents --- src/pages/article/[slug].tsx | 2 ++ src/pages/cv.tsx | 12 ++++++++++-- src/pages/mentions-legales.tsx | 12 ++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) (limited to 'src/pages') diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx index 621b2e2..1fa65fa 100644 --- a/src/pages/article/[slug].tsx +++ b/src/pages/article/[slug].tsx @@ -3,6 +3,7 @@ import CommentsList from '@components/CommentsList/CommentsList'; import { getLayout } from '@components/Layouts/Layout'; import PostFooter from '@components/PostFooter/PostFooter'; import PostHeader from '@components/PostHeader/PostHeader'; +import ToC from '@components/ToC/ToC'; import { t } from '@lingui/macro'; import { getAllPostsSlug, getPostBySlug } from '@services/graphql/queries'; import { NextPageWithLayout } from '@ts/types/app'; @@ -39,6 +40,7 @@ const SingleArticle: NextPageWithLayout = ({ post }) => { title={title} thematics={thematics} /> +
diff --git a/src/pages/cv.tsx b/src/pages/cv.tsx index de63ec6..44d943c 100644 --- a/src/pages/cv.tsx +++ b/src/pages/cv.tsx @@ -1,4 +1,5 @@ import { getLayout } from '@components/Layouts/Layout'; +import ToC from '@components/ToC/ToC'; import { seo } from '@config/seo'; import { getPageByUri } from '@services/graphql/queries'; import { NextPageWithLayout } from '@ts/types/app'; @@ -17,9 +18,16 @@ const CV: NextPageWithLayout = ({ page }) => {

{page.title}

-
+ {page.content && ( +
+ )}
-
+ +
); diff --git a/src/pages/mentions-legales.tsx b/src/pages/mentions-legales.tsx index 6155132..41e9a0c 100644 --- a/src/pages/mentions-legales.tsx +++ b/src/pages/mentions-legales.tsx @@ -1,4 +1,5 @@ import { getLayout } from '@components/Layouts/Layout'; +import ToC from '@components/ToC/ToC'; import { seo } from '@config/seo'; import { getPageByUri } from '@services/graphql/queries'; import { NextPageWithLayout } from '@ts/types/app'; @@ -17,9 +18,16 @@ const LegalNotice: NextPageWithLayout = ({ page }) => {

{page.title}

-
+ {page.content && ( +
+ )}
-
+ +
); -- cgit v1.2.3