refactor: update styles and improve layout
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
"description": "An interactive platform for learning CSS through practical challenges",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"start": "npm run dev",
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Code Crispies - Learn CSS Interactively</title>
|
||||
<title>CODE CRISPIES - Learn CSS Interactively</title>
|
||||
<link rel="stylesheet" href="./styles/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="app-container">
|
||||
<header class="header">
|
||||
<div class="logo">
|
||||
<h1>Code Crispies</h1>
|
||||
<h1>🏵️ CODE CRISPIES</h1>
|
||||
</div>
|
||||
<nav class="main-nav">
|
||||
<ul>
|
||||
<li><button id="module-selector-btn" class="btn">Modules</button></li>
|
||||
<li><button id="module-selector-btn" class="btn">Progress</button></li>
|
||||
<li><button id="reset-btn" class="btn">Reset Progress</button></li>
|
||||
<li><button id="help-btn" class="btn">Help</button></li>
|
||||
</ul>
|
||||
|
||||
@@ -212,7 +212,6 @@ function runCode() {
|
||||
|
||||
// Show the module selector modal
|
||||
function showModuleSelector() {
|
||||
debugger;
|
||||
elements.modalTitle.textContent = 'Select a Module';
|
||||
|
||||
// Create module buttons
|
||||
@@ -228,7 +227,6 @@ function showModuleSelector() {
|
||||
// Add completion status
|
||||
const progress = state.userProgress[module.id];
|
||||
const completedCount = progress ? progress.completed.length : 0;
|
||||
debugger;
|
||||
const totalLessons = module.lessons.length;
|
||||
const percentComplete = Math.round((completedCount / totalLessons) * 100);
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ import basicsConfig from './configs/basics.json';
|
||||
|
||||
// Module store
|
||||
const moduleStore = [
|
||||
// flexboxConfig,
|
||||
// gridConfig,
|
||||
flexboxConfig,
|
||||
gridConfig,
|
||||
basicsConfig
|
||||
];
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ body {
|
||||
}
|
||||
|
||||
.logo h1 {
|
||||
color: var(--primary-color);
|
||||
color: var(--text-color);
|
||||
font-size: 1.7rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -321,4 +321,40 @@ code {
|
||||
border-radius: 4px;
|
||||
background-color: rgba(231, 76, 60, 0.1);
|
||||
border-left: 3px solid var(--error-color);
|
||||
}
|
||||
|
||||
/* Add these styles to your main.css file */
|
||||
|
||||
/* Success highlight for lesson container */
|
||||
.success-highlight {
|
||||
box-shadow: 0 0 0 3px var(--success-color);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
/* Success text color for headings */
|
||||
.success-text {
|
||||
color: var(--success-color);
|
||||
transition: color 0.3s ease;
|
||||
}
|
||||
|
||||
/* Friendlier error feedback */
|
||||
.feedback-error {
|
||||
color: #996633;
|
||||
font-weight: 500;
|
||||
margin-top: 1rem;
|
||||
padding: 0.5rem;
|
||||
border-radius: 4px;
|
||||
background-color: rgba(255, 248, 230, 0.5);
|
||||
border-left: 3px solid #cc9944;
|
||||
}
|
||||
|
||||
/* Module selector button with progress */
|
||||
#module-selector-btn {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Button disabled state */
|
||||
.btn-disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
@@ -9,7 +9,7 @@ export default defineConfig({
|
||||
sourcemap: true
|
||||
},
|
||||
server: {
|
||||
port: 3000,
|
||||
open: true
|
||||
port: 1312,
|
||||
open: false
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user