From 7952cceb7b2ee4bef7da3a016663cc02fefeee7c Mon Sep 17 00:00:00 2001 From: rishabhsharma1997 Date: Fri, 21 Jun 2024 05:30:24 +0530 Subject: [PATCH 1/2] fix: ul line for TOC Signed-off-by: rishabhsharma1997 --- src/custom/TOCChapter/style.tsx | 46 +++------------------------------ 1 file changed, 3 insertions(+), 43 deletions(-) diff --git a/src/custom/TOCChapter/style.tsx b/src/custom/TOCChapter/style.tsx index 761e1860..916be1c8 100644 --- a/src/custom/TOCChapter/style.tsx +++ b/src/custom/TOCChapter/style.tsx @@ -44,7 +44,7 @@ export const TOCWrapper = styled('div')(({ theme }) => ({ MozPaddingStart: '2.65rem', '&::after': { position: 'absolute', - inset: '1rem auto 1rem 31px', + inset: '1rem auto 1rem 27px', width: 'auto', height: 'auto', borderLeft: `1px solid rgba(177, 182, 184, 0.25)`, @@ -78,50 +78,10 @@ export const TOCWrapper = styled('div')(({ theme }) => ({ } } }, - '@media(max-width: 992px)': { + '@media(max-width: 1200px)': { '.toc-list ul': { '&::after': { - inset: '1rem auto 1rem 32.4px' - } - } - }, - '@media(max-width: 767px)': { - position: 'initial', - '.toc-list ul': { - display: 'flex', - flexFlow: 'wrap', - margin: '1.5rem 0', - flexDirection: 'column', - paddingInlineStart: '0rem', - '&::after': { - display: 'none' - }, - '& li': { - listStyleType: 'none', - margin: '0.5rem', - display: 'none' - } - }, - '.toc-ul': { - opacity: 0, - height: 0, - transition: 'none', - paddingLeft: '1rem' - }, - '.toc-ul-open': { - height: 'auto', - opacity: 1, - transition: 'all .4s', - '& li': { - display: 'inline-block' - } - }, - '.chapter-back': { - '& h4': { - margin: '0 1rem' - }, - '.toc-toggle-btn': { - display: 'flex' + inset: '1rem auto 1rem 24px' } } } From f091357a2e94eeb089683a0707d504ff36b3af51 Mon Sep 17 00:00:00 2001 From: rishabhsharma1997 Date: Fri, 21 Jun 2024 05:56:58 +0530 Subject: [PATCH 2/2] refactor: Challenges and learning-paths Signed-off-by: rishabhsharma1997 --- src/custom/LearningCard/LearningCard.tsx | 2 +- src/custom/TOCChapter/style.tsx | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/custom/LearningCard/LearningCard.tsx b/src/custom/LearningCard/LearningCard.tsx index 2fcf0343..9ef01a1c 100644 --- a/src/custom/LearningCard/LearningCard.tsx +++ b/src/custom/LearningCard/LearningCard.tsx @@ -79,7 +79,7 @@ const LearningCard: React.FC = ({ tutorial, path, courseCount, courseType

{courseCount} {courseType} - {courseCount === 1 ? '' : 's'} + {courseCount > 1 ? 's' : ''}

diff --git a/src/custom/TOCChapter/style.tsx b/src/custom/TOCChapter/style.tsx index 916be1c8..0819f465 100644 --- a/src/custom/TOCChapter/style.tsx +++ b/src/custom/TOCChapter/style.tsx @@ -44,7 +44,7 @@ export const TOCWrapper = styled('div')(({ theme }) => ({ MozPaddingStart: '2.65rem', '&::after': { position: 'absolute', - inset: '1rem auto 1rem 27px', + inset: '1rem auto 1rem 1.7rem', width: 'auto', height: 'auto', borderLeft: `1px solid rgba(177, 182, 184, 0.25)`, @@ -77,12 +77,5 @@ export const TOCWrapper = styled('div')(({ theme }) => ({ } } } - }, - '@media(max-width: 1200px)': { - '.toc-list ul': { - '&::after': { - inset: '1rem auto 1rem 24px' - } - } } }));