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 8c1683f3f3
commit 7744468aaa
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");

View File

@@ -19,7 +19,6 @@ import htmlTablesEN from "../../lessons/30-html-tables.json";
import htmlMarqueeEN from "../../lessons/31-html-marquee.json";
import htmlSvgEN from "../../lessons/32-html-svg.json";
import flexboxEN from "../../lessons/flexbox.json";
import playgroundEN from "../../lessons/99-playground.json";
// German lesson imports
import welcomeDE from "../../lessons/de/00-welcome.json";
@@ -37,7 +36,6 @@ import htmlTablesDE from "../../lessons/de/30-html-tables.json";
import htmlMarqueeDE from "../../lessons/de/31-html-marquee.json";
import htmlSvgDE from "../../lessons/de/32-html-svg.json";
import flexboxDE from "../../lessons/de/flexbox.json";
import playgroundDE from "../../lessons/de/99-playground.json";
// English module store - ordered by learning path
const moduleStoreEN = [
@@ -62,9 +60,7 @@ const moduleStoreEN = [
flexboxEN,
responsiveEN,
// CSS Animationen
transitionsAnimationsEN,
// Playground
playgroundEN
transitionsAnimationsEN
];
// German module store - ordered by learning path
@@ -90,9 +86,7 @@ const moduleStoreDE = [
flexboxDE,
responsiveDE,
// CSS Animationen
transitionsAnimationsDE,
// Playground
playgroundDE
transitionsAnimationsDE
];
/**