From aa1ca65e7c9807c6d6020e39166536297fe1cdae Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sat, 15 Jan 2022 22:45:57 +0100 Subject: chore: update sidebar and widgets styles I'm now using a widget that can be expanded/collapsed. It also allows me to handle more effectively widgets overflow and to avoid styles repetitions. However, with stylelint rule "no-descending-specificity", I'm not sure if the stylesheets are really logical... Maybe I should deactivate this rule. --- src/pages/article/[slug].tsx | 9 ++++----- src/pages/blog/index.tsx | 4 ++-- src/pages/contact.tsx | 4 ++-- src/pages/cv.tsx | 9 ++++----- src/pages/mentions-legales.tsx | 7 ++++--- src/pages/recherche/index.tsx | 4 ++-- src/pages/sujet/[slug].tsx | 12 ++++++------ src/pages/thematique/[slug].tsx | 12 ++++++------ 8 files changed, 30 insertions(+), 31 deletions(-) (limited to 'src/pages') diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx index fb79b41..509be4f 100644 --- a/src/pages/article/[slug].tsx +++ b/src/pages/article/[slug].tsx @@ -3,7 +3,6 @@ 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 { config } from '@config/website'; import { getAllPostsSlug, getPostBySlug } from '@services/graphql/queries'; import { NextPageWithLayout } from '@ts/types/app'; @@ -17,7 +16,7 @@ import Prism from 'prismjs'; import { ParsedUrlQuery } from 'querystring'; import { useEffect } from 'react'; import styles from '@styles/pages/Page.module.scss'; -import { Sharing } from '@components/Widget'; +import { Sharing, ToC } from '@components/Widgets'; import Sidebar from '@components/Sidebar/Sidebar'; const SingleArticle: NextPageWithLayout = ({ post }) => { @@ -60,15 +59,15 @@ const SingleArticle: NextPageWithLayout = ({ post }) => {
- +
- +
diff --git a/src/pages/blog/index.tsx b/src/pages/blog/index.tsx index e0d35cd..b20b647 100644 --- a/src/pages/blog/index.tsx +++ b/src/pages/blog/index.tsx @@ -12,7 +12,7 @@ import useSWRInfinite from 'swr/infinite'; import { Button } from '@components/Buttons'; import { getPublishedPosts } from '@services/graphql/queries'; import PostHeader from '@components/PostHeader/PostHeader'; -import { ThematicsList, TopicsList } from '@components/Widget'; +import { ThematicsList, TopicsList } from '@components/Widgets'; import Sidebar from '@components/Sidebar/Sidebar'; import styles from '@styles/pages/Page.module.scss'; import { useRef } from 'react'; @@ -74,7 +74,7 @@ const Blog: NextPageWithLayout = ({ fallback }) => { >{t`Load more?`} )} - + diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx index 5e6d138..bafa5e9 100644 --- a/src/pages/contact.tsx +++ b/src/pages/contact.tsx @@ -11,7 +11,7 @@ import Head from 'next/head'; import { FormEvent, useState } from 'react'; import PostHeader from '@components/PostHeader/PostHeader'; import styles from '@styles/pages/Page.module.scss'; -import { SocialMedia } from '@components/Widget'; +import { SocialMedia } from '@components/Widgets'; import Sidebar from '@components/Sidebar/Sidebar'; const ContactPage: NextPageWithLayout = () => { @@ -113,7 +113,7 @@ const ContactPage: NextPageWithLayout = () => { - + { className={`${styles.article} ${styles['article--no-comments']}`} > - +
- + { const dates = { @@ -33,9 +34,9 @@ const LegalNotice: NextPageWithLayout = () => { className={`${styles.article} ${styles['article--no-comments']}`} > - +
diff --git a/src/pages/recherche/index.tsx b/src/pages/recherche/index.tsx index 57f40e2..c45f9f0 100644 --- a/src/pages/recherche/index.tsx +++ b/src/pages/recherche/index.tsx @@ -14,7 +14,7 @@ import { useRouter } from 'next/router'; import { useEffect, useRef, useState } from 'react'; import useSWRInfinite from 'swr/infinite'; import Sidebar from '@components/Sidebar/Sidebar'; -import { ThematicsList, TopicsList } from '@components/Widget'; +import { ThematicsList, TopicsList } from '@components/Widgets'; import styles from '@styles/pages/Page.module.scss'; const Search: NextPageWithLayout = () => { @@ -97,7 +97,7 @@ const Search: NextPageWithLayout = () => { >{t`Load more?`} )} - + diff --git a/src/pages/sujet/[slug].tsx b/src/pages/sujet/[slug].tsx index a7adf89..b373041 100644 --- a/src/pages/sujet/[slug].tsx +++ b/src/pages/sujet/[slug].tsx @@ -13,10 +13,10 @@ import { } from '@services/graphql/queries'; import PostHeader from '@components/PostHeader/PostHeader'; import { ArticleMeta } from '@ts/types/articles'; -import ToC from '@components/ToC/ToC'; -import { RelatedThematics, TopicsList } from '@components/Widget'; +import { RelatedThematics, ToC, TopicsList } from '@components/Widgets'; import { useRef } from 'react'; import Head from 'next/head'; +import Sidebar from '@components/Sidebar/Sidebar'; const Subject: NextPageWithLayout = ({ subject }) => { const relatedThematics = useRef([]); @@ -64,9 +64,9 @@ const Subject: NextPageWithLayout = ({ subject }) => { meta={meta} title={subject.title} /> - +
{subject.posts.length > 0 && ( @@ -76,10 +76,10 @@ const Subject: NextPageWithLayout = ({ subject }) => {
)} - +
); diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx index f23ad5b..4eee656 100644 --- a/src/pages/thematique/[slug].tsx +++ b/src/pages/thematique/[slug].tsx @@ -12,11 +12,11 @@ import { getThematicBySlug, } from '@services/graphql/queries'; import PostHeader from '@components/PostHeader/PostHeader'; -import ToC from '@components/ToC/ToC'; -import { RelatedTopics, ThematicsList } from '@components/Widget'; +import { RelatedTopics, ThematicsList, ToC } from '@components/Widgets'; import { useRef } from 'react'; import { ArticleMeta } from '@ts/types/articles'; import Head from 'next/head'; +import Sidebar from '@components/Sidebar/Sidebar'; const Thematic: NextPageWithLayout = ({ thematic }) => { const relatedSubjects = useRef([]); @@ -58,9 +58,9 @@ const Thematic: NextPageWithLayout = ({ thematic }) => { className={`${styles.article} ${styles['article--no-comments']}`} > - +
{thematic.posts.length > 0 && ( @@ -70,10 +70,10 @@ const Thematic: NextPageWithLayout = ({ thematic }) => { )}
- + ); -- cgit v1.2.3