feat: add contact section and smooth lesson transitions
- Add contact section to help dialog with librete.ch, GitHub, Gitea, LinkedIn links - Add HTML/CSS prefixes to English module titles for consistency with German - Add CSS transitions for smooth lesson switching - Add transitioning class to prevent content flash during lesson changes
This commit is contained in:
@@ -20,6 +20,7 @@ const elements = {
|
||||
helpBtn: document.getElementById("help-btn"),
|
||||
|
||||
// Left panel
|
||||
editorSection: document.querySelector(".editor-section"),
|
||||
modulePill: document.getElementById("module-pill"),
|
||||
moduleName: document.querySelector(".module-name"),
|
||||
lessonTitle: document.getElementById("lesson-title"),
|
||||
@@ -313,6 +314,9 @@ function loadCurrentLesson() {
|
||||
const lesson = engineState.lesson;
|
||||
const mode = lesson.mode || engineState.module?.mode || "css";
|
||||
|
||||
// Add transition class for smooth content swap
|
||||
elements.editorSection?.classList.add("transitioning");
|
||||
|
||||
// Update UI based on mode
|
||||
updateEditorForMode(mode);
|
||||
|
||||
@@ -388,6 +392,11 @@ function loadCurrentLesson() {
|
||||
|
||||
// Render the expected/solution preview
|
||||
lessonEngine.renderExpectedPreview();
|
||||
|
||||
// Remove transition class after content is updated
|
||||
requestAnimationFrame(() => {
|
||||
elements.editorSection?.classList.remove("transitioning");
|
||||
});
|
||||
}
|
||||
|
||||
// ================= LIVE PREVIEW =================
|
||||
|
||||
Reference in New Issue
Block a user