From 1d26a70b388d80c7ba95326891bc337cb4595e8c Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Mon, 22 Dec 2025 10:38:53 +0100 Subject: [PATCH] fix: rename solutionCode to solution in HTML lesson files Consistent property naming across all lesson files - the LessonEngine expects 'solution' property for rendering expected preview. --- lessons/20-html-elements.json | 6 +++--- lessons/21-html-forms-basic.json | 6 +++--- lessons/22-html-forms-validation.json | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lessons/20-html-elements.json b/lessons/20-html-elements.json index b7a9c39..961a612 100644 --- a/lessons/20-html-elements.json +++ b/lessons/20-html-elements.json @@ -15,7 +15,7 @@ "previewBaseCSS": "body { font-family: system-ui, sans-serif; padding: 20px; } p { background: #e3f2fd; padding: 10px; } strong { background: #ffecb3; }", "sandboxCSS": "", "initialCode": "

This is a paragraph with an important word.

", - "solutionCode": "

This is a paragraph with an important word.

", + "solution": "

This is a paragraph with an important word.

", "previewContainer": "preview-area", "validations": [ { @@ -39,7 +39,7 @@ "previewBaseCSS": "body { font-family: system-ui; margin: 0; } header { background: #1976d2; color: white; padding: 15px; } main { padding: 20px; min-height: 100px; } footer { background: #424242; color: white; padding: 10px; text-align: center; }", "sandboxCSS": "", "initialCode": "", - "solutionCode": "
\n

My Website

\n
\n
\n

Welcome to my site!

\n
\n", + "solution": "
\n

My Website

\n
\n
\n

Welcome to my site!

\n
\n", "previewContainer": "preview-area", "validations": [ { @@ -73,7 +73,7 @@ "previewBaseCSS": "body { font-family: Georgia, serif; padding: 20px; } div { background: #f5f5f5; padding: 15px; border-left: 4px solid #1976d2; } span { background: #fff59d; padding: 2px 4px; }", "sandboxCSS": "", "initialCode": "The most highlighted moment was unforgettable.", - "solutionCode": "
The most highlighted moment was unforgettable.
", + "solution": "
The most highlighted moment was unforgettable.
", "previewContainer": "preview-area", "validations": [ { diff --git a/lessons/21-html-forms-basic.json b/lessons/21-html-forms-basic.json index a59ef13..1ee44ec 100644 --- a/lessons/21-html-forms-basic.json +++ b/lessons/21-html-forms-basic.json @@ -15,7 +15,7 @@ "previewBaseCSS": "body { font-family: system-ui; padding: 20px; } form { max-width: 300px; } label { display: block; margin-bottom: 5px; font-weight: 500; } input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }", "sandboxCSS": "", "initialCode": "", - "solutionCode": "
\n \n \n
", + "solution": "
\n \n \n
", "previewContainer": "preview-area", "validations": [ { @@ -54,7 +54,7 @@ "previewBaseCSS": "body { font-family: system-ui; padding: 20px; } form { max-width: 300px; } .form-group { margin-bottom: 15px; } label { display: block; margin-bottom: 5px; } input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }", "sandboxCSS": "", "initialCode": "
\n \n
", - "solutionCode": "
\n
\n \n \n
\n
\n \n \n
\n
", + "solution": "
\n
\n \n \n
\n
\n \n \n
\n
", "previewContainer": "preview-area", "validations": [ { @@ -83,7 +83,7 @@ "previewBaseCSS": "body { font-family: system-ui; padding: 20px; } form { max-width: 300px; } .form-group { margin-bottom: 15px; } label { display: block; margin-bottom: 5px; } input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; } button { width: 100%; padding: 10px; background: #1976d2; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; } button:hover { background: #1565c0; }", "sandboxCSS": "", "initialCode": "
\n
\n \n \n
\n
\n \n \n
\n \n
", - "solutionCode": "
\n
\n \n \n
\n
\n \n \n
\n \n
", + "solution": "
\n
\n \n \n
\n
\n \n \n
\n \n
", "previewContainer": "preview-area", "validations": [ { diff --git a/lessons/22-html-forms-validation.json b/lessons/22-html-forms-validation.json index bebf3ed..150cd9b 100644 --- a/lessons/22-html-forms-validation.json +++ b/lessons/22-html-forms-validation.json @@ -15,7 +15,7 @@ "previewBaseCSS": "body { font-family: system-ui; padding: 20px; } form { max-width: 350px; } .form-group { margin-bottom: 15px; } label { display: block; margin-bottom: 5px; } label .required { color: #d32f2f; } input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; } input:invalid { border-color: #d32f2f; } button { padding: 10px 20px; background: #1976d2; color: white; border: none; border-radius: 4px; cursor: pointer; }", "sandboxCSS": "", "initialCode": "
\n
\n \n \n
\n
\n \n \n
\n \n
", - "solutionCode": "
\n
\n \n \n
\n
\n \n \n
\n \n
", + "solution": "
\n
\n \n \n
\n
\n \n \n
\n \n
", "previewContainer": "preview-area", "validations": [ { @@ -39,7 +39,7 @@ "previewBaseCSS": "body { font-family: system-ui; padding: 20px; } form { max-width: 350px; } .form-group { margin-bottom: 15px; } label { display: block; margin-bottom: 5px; } input { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; } input:invalid:not(:placeholder-shown) { border-color: #d32f2f; } .hint { font-size: 12px; color: #666; margin-top: 4px; } button { padding: 10px 20px; background: #1976d2; color: white; border: none; border-radius: 4px; cursor: pointer; }", "sandboxCSS": "", "initialCode": "
\n
\n \n \n
Must be 8-20 characters
\n
\n \n
", - "solutionCode": "
\n
\n \n \n
Must be 8-20 characters
\n
\n \n
", + "solution": "
\n
\n \n \n
Must be 8-20 characters
\n
\n \n
", "previewContainer": "preview-area", "validations": [ { @@ -68,7 +68,7 @@ "previewBaseCSS": "body { font-family: system-ui; padding: 20px; } form { max-width: 400px; background: #f5f5f5; padding: 25px; border-radius: 8px; } h2 { margin-top: 0; margin-bottom: 20px; } .form-group { margin-bottom: 18px; } label { display: block; margin-bottom: 5px; font-weight: 500; } .required { color: #d32f2f; } input[type='text'], input[type='email'], input[type='password'] { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-size: 14px; } input:focus { outline: 2px solid #1976d2; border-color: transparent; } .checkbox-group { display: flex; align-items: flex-start; gap: 8px; } .checkbox-group input { width: auto; margin-top: 3px; } .checkbox-group label { margin: 0; font-weight: normal; } button { width: 100%; padding: 12px; background: #1976d2; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; font-weight: 500; } button:hover { background: #1565c0; }", "sandboxCSS": "", "initialCode": "
\n

Create Account

\n \n
\n \n \n
\n \n
\n \n \n
\n \n
\n \n \n
\n \n
\n \n \n
\n \n \n
", - "solutionCode": "
\n

Create Account

\n \n
\n \n \n
\n \n
\n \n \n
\n \n
\n \n \n
\n \n
\n \n \n
\n \n \n
", + "solution": "
\n

Create Account

\n \n
\n \n \n
\n \n
\n \n \n
\n \n
\n \n \n
\n \n
\n \n \n
\n \n \n
", "previewContainer": "preview-area", "validations": [ {