fix: update scroll behavior for lesson navigation and adjust lesson description width for better scrolling
This commit is contained in:
@@ -235,7 +235,9 @@ export function updateActiveLessonInSidebar(moduleId, lessonIndex) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scroll to ensure the item is visible
|
// Scroll to the top of the page
|
||||||
|
document.querySelector("html").scrollTop = 0;
|
||||||
|
// Scroll to the current lesson item
|
||||||
currentLessonItem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
currentLessonItem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -332,6 +332,7 @@ code {
|
|||||||
|
|
||||||
.lesson-description pre {
|
.lesson-description pre {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
font-family: var(--font-code);
|
font-family: var(--font-code);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
background-color: var(--code-bg);
|
background-color: var(--code-bg);
|
||||||
|
|||||||
Reference in New Issue
Block a user