Skip to content

Commit

Permalink
chore: improve course ui
Browse files Browse the repository at this point in the history
  • Loading branch information
leofvo committed Feb 15, 2023
1 parent f87de9b commit c9ddcf5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions apps/polyflix/public/locales/en/courses.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}
},
"collections": "Modules",
"collectionNumber": "Module {{number}}",
"introduction": "Getting started",
"courseCard": {
"footerElements": "{{count}} module(s) in this course",
Expand Down
1 change: 1 addition & 0 deletions apps/polyflix/public/locales/fr/courses.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
}
},
"collections": "Modules",
"collectionNumber": "Module {{number}}",
"introduction": "Présentation",
"courseCard": {
"footerElements": "{{count}} module(s) dans ce cours",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const ItemCollectionTimeline = ({
<TimelineSeparator>
<TimelineDot
color={+query.get('index')! === index ? 'primary' : 'grey'}
sx={{ textAlign: 'center' }}
>
<Icon name={elementIcon(element.type)} />
</TimelineDot>
Expand All @@ -116,7 +117,7 @@ export const ItemCollectionTimeline = ({
variant="body1"
sx={{
textDecoration: isHover ? 'underline' : 'none',
color: 'black',
color: +query.get('index')! === index ? 'red' : 'grey',
}}
>
{element.name}
Expand All @@ -125,7 +126,8 @@ export const ItemCollectionTimeline = ({
variant="caption"
sx={{
textTransform: 'capitalize',
color: 'black',
color: 'grey',
opacity: 0.7,
}}
>
{element.type}
Expand Down
4 changes: 3 additions & 1 deletion apps/polyflix/src/modules/courses/pages/[slug].page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export const CourseSlugPage = () => {
<>
<Stack spacing={2}>
<Typography variant="h4">{t('collections')}</Typography>
{course?.modules?.map((module) => (
{course?.modules?.map((module, index) => (
<>
{module.visibility === 'private' &&
user?.id != module.user?.id &&
Expand All @@ -230,6 +230,7 @@ export const CourseSlugPage = () => {
width: 'auto',
}}
>
{t('collectionNumber', { number: index + 1 })} -{' '}
{module.name}
</Typography>
<Alert severity="error">
Expand All @@ -251,6 +252,7 @@ export const CourseSlugPage = () => {
width: 'auto',
}}
>
{t('collectionNumber', { number: index + 1 })} -{' '}
{module.name}
</Typography>
</Link>
Expand Down

0 comments on commit c9ddcf5

Please sign in to comment.