feat: add JSON schema for course modules and update module files
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "css-fundamentals",
|
"id": "css-fundamentals",
|
||||||
"title": "101 Rules and Selectors",
|
"title": "101 Rules and Selectors",
|
||||||
"description": "Cascading Style Sheets (CSS) form the cornerstone of modern web presentation. This module provides a comprehensive introduction to CSS syntax, selectors, properties, and core design concepts. You'll develop a deep understanding of how CSS empowers web developers to control visual aesthetics, layout, and responsive behavior across digital interfaces. Throughout these lessons, we'll build a robust foundation that prepares you for more advanced web engineering topics.",
|
"description": "Cascading Style Sheets (CSS) form the cornerstone of modern web presentation. This module provides a comprehensive introduction to CSS syntax, selectors, properties, and core design concepts. You'll develop a deep understanding of how CSS empowers web developers to control visual aesthetics, layout, and responsive behavior across digital interfaces. Throughout these lessons, we'll build a robust foundation that prepares you for more advanced web engineering topics.",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "box-model",
|
"id": "box-model",
|
||||||
"title": "Padding, Borders, and Margins",
|
"title": "Padding, Borders, and Margins",
|
||||||
"description": "Master the fundamental principles of space management in web design through the CSS box model. This module explores how content, padding, borders, and margins combine to create layout structures that are both visually appealing and structurally sound.",
|
"description": "Master the fundamental principles of space management in web design through the CSS box model. This module explores how content, padding, borders, and margins combine to create layout structures that are both visually appealing and structurally sound.",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "selectors",
|
"id": "selectors",
|
||||||
"title": "Specificity",
|
"title": "Specificity",
|
||||||
"description": "Master the art of targeting HTML elements using various CSS selectors, from basics to specificity rules.",
|
"description": "Master the art of targeting HTML elements using various CSS selectors, from basics to specificity rules.",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "colors-backgrounds",
|
"id": "colors-backgrounds",
|
||||||
"title": "Colors & Backgrounds",
|
"title": "Colors & Backgrounds",
|
||||||
"description": "Learn how to apply and manipulate colors, backgrounds, and graphical fills using CSS properties.",
|
"description": "Learn how to apply and manipulate colors, backgrounds, and graphical fills using CSS properties.",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "typography-fonts",
|
"id": "typography-fonts",
|
||||||
"title": "Typography & Fonts",
|
"title": "Typography & Fonts",
|
||||||
"description": "Learn how to control text appearance through font selection, sizing, spacing, and decorative effects.",
|
"description": "Learn how to control text appearance through font selection, sizing, spacing, and decorative effects.",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "units-variables",
|
"id": "units-variables",
|
||||||
"title": "Units, var() and calc()",
|
"title": "Units, var() and calc()",
|
||||||
"description": "Understand the variety of CSS measurement units and how to define and use custom properties for maintainable styles.",
|
"description": "Understand the variety of CSS measurement units and how to define and use custom properties for maintainable styles.",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "transitions-animations",
|
"id": "transitions-animations",
|
||||||
"title": "Transitions & Animations",
|
"title": "Transitions & Animations",
|
||||||
"description": "Bring interactivity to your UI by smoothly transitioning properties and creating keyframe-driven animations.",
|
"description": "Bring interactivity to your UI by smoothly transitioning properties and creating keyframe-driven animations.",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "layouts",
|
"id": "layouts",
|
||||||
"title": "Flexbox & Grid",
|
"title": "Flexbox & Grid",
|
||||||
"description": "Master modern CSS layout techniques with Flexbox and Grid for responsive, powerful designs.",
|
"description": "Master modern CSS layout techniques with Flexbox and Grid for responsive, powerful designs.",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "responsive-design",
|
"id": "responsive-design",
|
||||||
"title": "Responsive Design & Media Queries",
|
"title": "Responsive Design & Media Queries",
|
||||||
"description": "Make your layouts adapt to different screen sizes using media queries and fluid design techniques.",
|
"description": "Make your layouts adapt to different screen sizes using media queries and fluid design techniques.",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "flexbox",
|
"id": "flexbox",
|
||||||
"title": "CSS Flexbox",
|
"title": "CSS Flexbox",
|
||||||
"description": "Master the flexible box layout model for modern responsive designs",
|
"description": "Master the flexible box layout model for modern responsive designs",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "grid",
|
"id": "grid",
|
||||||
"title": "CSS Grid",
|
"title": "CSS Grid",
|
||||||
"description": "Master the grid layout system for complex two-dimensional layouts",
|
"description": "Master the grid layout system for complex two-dimensional layouts",
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$schema": "../schemas/code-crispies-module-schema.json",
|
||||||
"id": "tailwindcss-basics",
|
"id": "tailwindcss-basics",
|
||||||
"title": "Tailwind CSS Basics",
|
"title": "Tailwind CSS Basics",
|
||||||
"description": "Learn how to use Tailwind CSS utility classes to quickly style your HTML elements",
|
"description": "Learn how to use Tailwind CSS utility classes to quickly style your HTML elements",
|
||||||
|
|||||||
146
schemas/code-crispies-module-schema.json
Normal file
146
schemas/code-crispies-module-schema.json
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"title": "Code Crispies Module Schema",
|
||||||
|
"description": "Schema for CSS course modules with lessons",
|
||||||
|
"type": "object",
|
||||||
|
"required": ["id", "title", "description", "difficulty", "lessons"],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique identifier for the module"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Title of the module"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Detailed description of the module content and purpose"
|
||||||
|
},
|
||||||
|
"difficulty": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["beginner", "intermediate", "advanced"],
|
||||||
|
"description": "Difficulty level of the module"
|
||||||
|
},
|
||||||
|
"lessons": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Collection of lessons within the module",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"id",
|
||||||
|
"title",
|
||||||
|
"description",
|
||||||
|
"task",
|
||||||
|
"previewHTML",
|
||||||
|
"previewBaseCSS",
|
||||||
|
"sandboxCSS",
|
||||||
|
"codePrefix",
|
||||||
|
"initialCode",
|
||||||
|
"codeSuffix",
|
||||||
|
"previewContainer",
|
||||||
|
"validations"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"id": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Unique identifier for the lesson"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Title of the lesson"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Detailed description of the lesson content and concepts"
|
||||||
|
},
|
||||||
|
"task": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "The specific task instructions for the student to complete"
|
||||||
|
},
|
||||||
|
"previewHTML": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "HTML content used for the interactive preview"
|
||||||
|
},
|
||||||
|
"previewBaseCSS": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Base CSS styles applied to the preview environment"
|
||||||
|
},
|
||||||
|
"sandboxCSS": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Additional CSS for the sandbox environment"
|
||||||
|
},
|
||||||
|
"codePrefix": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Code that appears before the editable area"
|
||||||
|
},
|
||||||
|
"initialCode": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Initial code provided in the editor"
|
||||||
|
},
|
||||||
|
"codeSuffix": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Code that appears after the editable area"
|
||||||
|
},
|
||||||
|
"previewContainer": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "ID of the container element for the preview"
|
||||||
|
},
|
||||||
|
"validations": {
|
||||||
|
"type": "array",
|
||||||
|
"description": "Rules to validate user input",
|
||||||
|
"minItems": 1,
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["type", "value", "message"],
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["contains", "regex", "property_value"],
|
||||||
|
"description": "Type of validation to perform"
|
||||||
|
},
|
||||||
|
"value": {
|
||||||
|
"description": "Value to check against, format depends on validation type",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"required": ["property", "expected"],
|
||||||
|
"properties": {
|
||||||
|
"property": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "CSS property name to validate"
|
||||||
|
},
|
||||||
|
"expected": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Expected value for the CSS property"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Feedback message shown when validation fails"
|
||||||
|
},
|
||||||
|
"options": {
|
||||||
|
"type": "object",
|
||||||
|
"description": "Additional options for validation",
|
||||||
|
"properties": {
|
||||||
|
"caseSensitive": {
|
||||||
|
"type": "boolean",
|
||||||
|
"description": "Whether the validation should be case sensitive"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user