diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-10 12:36:12 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-10 16:21:20 +0100 |
| commit | c9d5f6be49a89fad5a778c0342a27fc3452d863d (patch) | |
| tree | ff821ba32fc929b45bec6a79847f0e9d58e8452f | |
| parent | f0b4057f15006b3b77530f68ebd754ed4ea98b89 (diff) | |
refactor(aside): move width from aside to sharing widget
Only the Sharing widget needs the "min-content" width.
| -rw-r--r-- | src/components/Widget/Sharing/Sharing.module.scss (renamed from src/components/Sharing/Sharing.module.scss) | 1 | ||||
| -rw-r--r-- | src/components/Widget/Sharing/Sharing.tsx (renamed from src/components/Sharing/Sharing.tsx) | 0 | ||||
| -rw-r--r-- | src/components/Widget/index.tsx | 3 | ||||
| -rw-r--r-- | src/pages/article/[slug].tsx | 3 | ||||
| -rw-r--r-- | src/styles/pages/Page.module.scss | 1 |
5 files changed, 4 insertions, 4 deletions
diff --git a/src/components/Sharing/Sharing.module.scss b/src/components/Widget/Sharing/Sharing.module.scss index fe13125..a1ba094 100644 --- a/src/components/Sharing/Sharing.module.scss +++ b/src/components/Widget/Sharing/Sharing.module.scss @@ -3,6 +3,7 @@ @use "@styles/abstracts/placeholders"; .wrapper { + width: min-content; max-height: 100vh; padding-bottom: var(--spacing-sm); position: sticky; diff --git a/src/components/Sharing/Sharing.tsx b/src/components/Widget/Sharing/Sharing.tsx index 4df8e0d..4df8e0d 100644 --- a/src/components/Sharing/Sharing.tsx +++ b/src/components/Widget/Sharing/Sharing.tsx diff --git a/src/components/Widget/index.tsx b/src/components/Widget/index.tsx index e4e346f..d5374ea 100644 --- a/src/components/Widget/index.tsx +++ b/src/components/Widget/index.tsx @@ -1,5 +1,6 @@ import RecentPosts from './RecentPosts/RecentPosts'; +import Sharing from './Sharing/Sharing'; import ThematicsList from './ThematicsList/ThematicsList'; import TopicsList from './TopicsList/TopicsList'; -export { RecentPosts, ThematicsList, TopicsList }; +export { RecentPosts, Sharing, ThematicsList, TopicsList }; diff --git a/src/pages/article/[slug].tsx b/src/pages/article/[slug].tsx index 889af43..7d25843 100644 --- a/src/pages/article/[slug].tsx +++ b/src/pages/article/[slug].tsx @@ -3,10 +3,8 @@ 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 Sharing from '@components/Sharing/Sharing'; import ToC from '@components/ToC/ToC'; import { config } from '@config/website'; -import { t } from '@lingui/macro'; import { getAllPostsSlug, getPostBySlug } from '@services/graphql/queries'; import { NextPageWithLayout } from '@ts/types/app'; import { ArticleMeta, ArticleProps } from '@ts/types/articles'; @@ -19,6 +17,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'; const SingleArticle: NextPageWithLayout<ArticleProps> = ({ post }) => { const { diff --git a/src/styles/pages/Page.module.scss b/src/styles/pages/Page.module.scss index b3615f6..41172a3 100644 --- a/src/styles/pages/Page.module.scss +++ b/src/styles/pages/Page.module.scss @@ -45,7 +45,6 @@ grid-column: 3; grid-row: 2 / 5; align-self: stretch; - max-width: min-content; padding: 0 var(--spacing-sm); } |
