diff --git a/pages/exercises/[lessonSlug].tsx b/pages/exercises/[lessonSlug].tsx index 6992d03b0..cdb48d486 100644 --- a/pages/exercises/[lessonSlug].tsx +++ b/pages/exercises/[lessonSlug].tsx @@ -16,6 +16,7 @@ import { NewButton } from '../../components/theme/Button' import ExerciseCard, { ExerciseCardProps } from '../../components/ExerciseCard' import { ArrowLeftIcon } from '@primer/octicons-react' import GET_EXERCISES from '../../graphql/queries/getExercises' +import styles from '../../scss/exercises.module.scss' const exampleProblem = `const a = 5 a = a + 10 @@ -24,6 +25,11 @@ a = a + 10 const mockExercisePreviews: ExercisePreviewCardProps[] = [ { moduleName: 'Variables', state: 'ANSWERED', problem: exampleProblem }, { moduleName: 'Variables', state: 'NOT ANSWERED', problem: exampleProblem }, + { moduleName: 'Variables', state: 'NOT ANSWERED', problem: exampleProblem }, + { moduleName: 'Variables', state: 'NOT ANSWERED', problem: exampleProblem }, + { moduleName: 'Variables', state: 'NOT ANSWERED', problem: exampleProblem }, + { moduleName: 'Variables', state: 'NOT ANSWERED', problem: exampleProblem }, + { moduleName: 'Variables', state: 'NOT ANSWERED', problem: exampleProblem }, { moduleName: 'Variables', state: 'ANSWERED', problem: exampleProblem } ] @@ -163,27 +169,29 @@ const ExerciseList = ({ tabs={tabs} /> -
-

{lessonTitle}

- setExerciseIndex(0)}> - SOLVE EXERCISES - -
-
-
- {mockExercisePreviews.map((exercisePreview, i) => ( - - ))} +
+

{lessonTitle}

+
+ setExerciseIndex(0)} + > + SOLVE EXERCISES +
+
+ {mockExercisePreviews.map((exercisePreview, i) => ( + + ))} +
) } diff --git a/scss/exercises.module.scss b/scss/exercises.module.scss new file mode 100644 index 000000000..59a0e5c92 --- /dev/null +++ b/scss/exercises.module.scss @@ -0,0 +1,11 @@ +.exerciseList__container { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); + gap: 2em; +} + +.exerciseList__solveExercisesButtonContainer { + @media (max-width: 767px) { + width: 100%; + } +}