refactor: merge playground into welcome module

- Rename welcome lessons to Get Started, Overview, Playground
- Remove separate playground module files
- Fix playground detection to check lesson.mode instead of module.id
This commit is contained in:
2025-12-31 00:46:42 +01:00
parent 6390e29caf
commit 89ad5228b4
6 changed files with 40 additions and 64 deletions

View File

@@ -390,7 +390,7 @@ function loadCurrentLesson() {
const lesson = engineState.lesson;
const mode = lesson.mode || engineState.module?.mode || "css";
const isPlayground = engineState.module.id === "playground";
const isPlayground = lesson.mode === "playground";
// Handle playground mode - hide instructions, full height editor
if (isPlayground) {
@@ -581,7 +581,7 @@ function resetCode() {
function runCode() {
const userCode = codeEditor ? codeEditor.getValue() : "";
const engineState = lessonEngine.getCurrentState();
const isPlayground = engineState.module?.id === "playground";
const isPlayground = engineState.lesson?.mode === "playground";
// Rotate the Run button icon
const runButtonImg = document.querySelector("#run-btn img");