Skip to content

Commit 48ef3e0

Browse files
committed
feat: update module titles and enhance button styles
1 parent e9ce5f9 commit 48ef3e0

File tree

10 files changed

+43
-12
lines changed

10 files changed

+43
-12
lines changed

lessons/00-basics.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"id": "css-fundamentals",
3-
"title": "CSS Fundamentals: The Language of Web Design",
3+
"title": "101 Rules and Selectors",
44
"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.",
55
"difficulty": "beginner",
66
"lessons": [
77
{
88
"id": "css-syntax-structure",
99
"title": "CSS Syntax: The Building Blocks",
10-
"description": "CSS (Cascading Style Sheets) follows a structured syntax that consists of selectors targeting HTML elements and declaration blocks defining their styling. A declaration block contains one or more declarations separated by semicolons, with each declaration consisting of a property and value pair. This fundamental structure forms the basis of all CSS rules and allows for precise control over web page presentation. Understanding this syntax is critical for effectively implementing any styling on the web.",
10+
"description": "CSS (Cascading Style Sheets) follows a structured syntax that consists of selectors targeting HTML elements and declaration blocks defining their styling. A declaration block contains one or more declarations separated by semicolons, with each declaration consisting of a property and value pair. This fundamental structure forms the basis of all CSS rules and allows for precise control over web page presentation. Understanding this syntax is critical for effectively implementing any styling on the web.<br><br><pre>/* Element selctor */\np {\n color: orangered;\n /* │ └─── Indicates the value of the expression\n\n └─────────── Indicates the property of the expression */\n}</pre>",
1111
"task": "Complete the CSS rule by providing a valid selector that targets all paragraph elements (p). This selector should apply to every paragraph on the page. Notice how the declaration block is already structured with the property-value pair 'color: blue;'.",
1212
"previewHTML": "<p>This paragraph should be blue.</p><p>This paragraph should also be blue.</p><div>This div element should remain unchanged.</div>",
1313
"previewBaseCSS": "body { font-family: Arial, sans-serif; padding: 20px; line-height: 1.6; }",
@@ -35,7 +35,7 @@
3535
"previewHTML": "<h2>This is a heading that needs styling</h2><p>This is a paragraph that should remain unchanged.</p><h2>This is another heading that needs the same styling</h2>",
3636
"previewBaseCSS": "body { font-family: Arial, sans-serif; padding: 20px; line-height: 1.6; }",
3737
"sandboxCSS": "h2, p { border: 1px dashed #ccc; padding: 10px; margin-bottom: 10px; }",
38-
"codePrefix": "/* Write an element selector for h2 elements and set their color and text-decoration */\n",
38+
"codePrefix": "",
3939
"initialCode": "",
4040
"codeSuffix": " {\n color: red;\n text-decoration: underline;\n}",
4141
"previewContainer": "preview-area",

lessons/01-box-model.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "box-model",
3-
"title": "CSS Box Model & Layout Principles",
3+
"title": "Padding, Borders, and Margins",
44
"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.",
55
"difficulty": "beginner",
66
"lessons": [

lessons/02-selectors.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "selectors",
3-
"title": "CSS Selectors Deep Dive",
3+
"title": "Specificity",
44
"description": "Master the art of targeting HTML elements using various CSS selectors, from basics to specificity rules.",
55
"difficulty": "beginner",
66
"lessons": [

lessons/05-units-variables.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "units-variables",
3-
"title": "CSS Units & Variables",
3+
"title": "Units, var() and calc()",
44
"description": "Understand the variety of CSS measurement units and how to define and use custom properties for maintainable styles.",
55
"difficulty": "beginner",
66
"lessons": [

lessons/06-transitions-animations.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "transitions-animations",
3-
"title": "CSS Transitions & Animations",
3+
"title": "Transitions & Animations",
44
"description": "Bring interactivity to your UI by smoothly transitioning properties and creating keyframe-driven animations.",
55
"difficulty": "beginner",
66
"lessons": [

lessons/07-layouts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "layouts",
3-
"title": "Advanced Layouts: Flexbox & Grid",
3+
"title": "Flexbox & Grid",
44
"description": "Master modern CSS layout techniques with Flexbox and Grid for responsive, powerful designs.",
55
"difficulty": "intermediate",
66
"lessons": [

public/gear.svg

Lines changed: 5 additions & 0 deletions
Loading

src/app.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ function selectModule(moduleId) {
154154
function resetSuccessIndicators() {
155155
elements.codeEditor.classList.remove("success-highlight");
156156
elements.lessonTitle.classList.remove("success-text");
157-
elements.runBtn.classList.remove("hidden");
158157
elements.nextBtn.classList.remove("success");
159158
elements.taskInstruction.classList.remove("success-instruction");
160159
}
@@ -266,7 +265,6 @@ function runCode() {
266265
// Add success visual indicators
267266
elements.codeEditor.classList.add("success-highlight");
268267
elements.lessonTitle.classList.add("success-text");
269-
elements.runBtn.classList.add("hidden");
270268
elements.nextBtn.classList.add("success");
271269
elements.taskInstruction.classList.add("success-instruction");
272270

src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h2 id="lesson-title">Loading...</h2>
5151
<div class="code-editor">
5252
<div class="editor-header">
5353
<span>CSS Editor</span>
54-
<button id="run-btn" class="btn btn-primary">Run</button>
54+
<button id="run-btn" class="btn btn-secondary"><img src="./gear.svg" />Run</button>
5555
</div>
5656
<div class="editor-content">
5757
<pre><code id="editor-prefix"></code></pre>

src/main.css

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
--primary-color: #dd3b59;
33
--primary-light: #ff5f7f;
44
--primary-dark: #af2740;
5-
--secondary-color: #ff7e5f;
5+
--secondary-color: #393939;
6+
--secondary-dark: #1e1e1e;
67
--text-color: #13181c;
78
--light-text: #777;
89
--bg-color: #f9f9f9;
@@ -158,6 +159,17 @@ body {
158159
width: 72%;
159160
}
160161

162+
.lesson-description pre {
163+
display: inline-block;
164+
font-family: "JetBrains Mono", "Fira Code", monospace;
165+
font-size: 0.9rem;
166+
background-color: #f5f5f5;
167+
padding: 2rem 3rem 2rem 2rem;
168+
border-radius: 6px;
169+
overflow-x: auto;
170+
margin-bottom: 1.5rem;
171+
}
172+
161173
/* Challenge Container */
162174
.challenge-container {
163175
display: flex;
@@ -319,6 +331,22 @@ code {
319331
background-color: var(--primary-dark);
320332
}
321333

334+
.btn-secondary {
335+
background-color: var(--secondary-color);
336+
color: white;
337+
border: 1px solid var(--secondary-dark);
338+
}
339+
340+
.btn-secondary:hover {
341+
background-color: var(--secondary-dark);
342+
}
343+
344+
.btn img {
345+
width: 0.8rem;
346+
height: 0.8rem;
347+
margin-right: 0.3rem;
348+
}
349+
322350
/* Modal */
323351
.modal-container {
324352
position: fixed;

0 commit comments

Comments
 (0)