From eda202c6a28d2dbbfc86fafb16b6bef20d836a83 Mon Sep 17 00:00:00 2001 From: austinkelsay Date: Sun, 6 Jul 2025 17:18:51 -0500 Subject: [PATCH 1/3] enforce correct lesson order in course sidebar, improve styling and seperation of course sidebar --- .../content/courses/layout/CourseSidebar.js | 10 +- src/pages/course/[slug]/index.js | 111 ++++++++---------- 2 files changed, 51 insertions(+), 70 deletions(-) diff --git a/src/components/content/courses/layout/CourseSidebar.js b/src/components/content/courses/layout/CourseSidebar.js index 7a6af8e..99fc82e 100644 --- a/src/components/content/courses/layout/CourseSidebar.js +++ b/src/components/content/courses/layout/CourseSidebar.js @@ -91,7 +91,7 @@ const CourseSidebar = ({ /> )} -
+
    {lessons.map((lesson, index) => ( @@ -128,13 +128,11 @@ const CourseSidebar = ({ {!isMobileView && sidebarVisible && (
    -
    {/* Adjusted to match new header spacing */} -
    - -
    +
    diff --git a/src/pages/course/[slug]/index.js b/src/pages/course/[slug]/index.js index 5b9542f..245fa16 100644 --- a/src/pages/course/[slug]/index.js +++ b/src/pages/course/[slug]/index.js @@ -226,14 +226,13 @@ const Course = () => { />
- {/* Main content area with fixed width */} -
-
- + {/* Main content area with flex layout */} +
+ {/* Main Content */} +
{/* Overview tab content */}
- { toggleToContentTab={() => toggleTab(1)} // Assuming content tab is at index 1 />
- + {/* Content tab content */}
{!isAuthorized ? ( @@ -266,11 +265,11 @@ const Course = () => {
) : ( - @@ -279,68 +278,52 @@ const Course = () => { {/* QA tab content */}
- +
+ + {/* Mobile: Lessons are a tab */} + {isMobileView && ( +
+ { + setSidebarVisible(false); + toggleTab(getActiveTabIndex()); + }} + sidebarVisible={sidebarVisible} + setSidebarVisible={setSidebarVisible} + hideToggleButton={true} + /> +
+ )}
- {/* Course Sidebar - positioned absolutely on desktop when visible */} - {!isMobileView ? ( -
- -
- ) : ( -
- { - setSidebarVisible(false); - toggleTab(getActiveTabIndex()); - }} - sidebarVisible={sidebarVisible} - setSidebarVisible={setSidebarVisible} - hideToggleButton={true} - /> + {sidebarVisible && ( + + )}
)}
From 41afe6a8ae61f2fb5dbd22ecf4345c81c8d9979d Mon Sep 17 00:00:00 2001 From: Austin Kelsay <53542748+AustinKelsay@users.noreply.github.com> Date: Sun, 6 Jul 2025 17:26:05 -0500 Subject: [PATCH 2/3] Update src/pages/course/[slug]/index.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/pages/course/[slug]/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/course/[slug]/index.js b/src/pages/course/[slug]/index.js index 245fa16..994d8f2 100644 --- a/src/pages/course/[slug]/index.js +++ b/src/pages/course/[slug]/index.js @@ -314,7 +314,7 @@ const Course = () => { > {sidebarVisible && ( a.index - b.index)} activeIndex={activeIndex} onLessonSelect={handleLessonSelect} completedLessons={completedLessons} From da0c6cad2a0b08b05c16704bb4b3a0a6a0ff9f65 Mon Sep 17 00:00:00 2001 From: Austin Kelsay <53542748+AustinKelsay@users.noreply.github.com> Date: Sun, 6 Jul 2025 17:36:59 -0500 Subject: [PATCH 3/3] Update src/pages/course/[slug]/index.js Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- src/pages/course/[slug]/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/course/[slug]/index.js b/src/pages/course/[slug]/index.js index 994d8f2..1868d46 100644 --- a/src/pages/course/[slug]/index.js +++ b/src/pages/course/[slug]/index.js @@ -285,7 +285,7 @@ const Course = () => { {isMobileView && (
a.index - b.index)} activeIndex={activeIndex} onLessonSelect={handleLessonSelect} completedLessons={completedLessons}