Skip to content

Commit

Permalink
Merge pull request #655 from rishabhsharma1997/master
Browse files Browse the repository at this point in the history
[LEARNING-PATH] TOC list fix
  • Loading branch information
leecalcote authored Jun 21, 2024
2 parents 6a2d010 + f091357 commit 4bc0a4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 49 deletions.
2 changes: 1 addition & 1 deletion src/custom/LearningCard/LearningCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const LearningCard: React.FC<Props> = ({ tutorial, path, courseCount, courseType
<CardSubdata className="card-subdata">
<p>
{courseCount} {courseType}
{courseCount === 1 ? '' : 's'}
{courseCount > 1 ? 's' : ''}
</p>
</CardSubdata>
<CardImage>
Expand Down
49 changes: 1 addition & 48 deletions src/custom/TOCChapter/style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 1.7rem',
width: 'auto',
height: 'auto',
borderLeft: `1px solid rgba(177, 182, 184, 0.25)`,
Expand Down Expand Up @@ -77,52 +77,5 @@ export const TOCWrapper = styled('div')(({ theme }) => ({
}
}
}
},
'@media(max-width: 992px)': {
'.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'
}
}
}
}));

0 comments on commit 4bc0a4b

Please sign in to comment.