feat: add landing pages and section navigation

- Add home landing page with section cards (CSS, HTML, Tailwind)
- Add section landing pages with module grid and progress tracking
- Implement extended URL routing for pages, sections, and lessons
- Create sections.js configuration for module categorization
- Exclude welcome/goodbye modules from progress stats
- Add main navigation links in header (desktop only)
- Update logo click to navigate to home landing

Routes:
- # → Home landing
- #css, #html, #tailwind → Section landing pages
- #module/index → Lesson (unchanged)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
This commit is contained in:
2026-01-14 23:15:34 +01:00
parent 0f14568d2c
commit 7125b7adc9
13 changed files with 679 additions and 42 deletions

View File

@@ -463,9 +463,12 @@ export class LessonEngine {
let totalCompleted = 0;
this.modules.forEach((module) => {
// Skip modules excluded from progress (e.g., welcome, goodbye)
if (module.excludeFromProgress) return;
totalLessons += module.lessons.length;
const progress = this.userProgress[module.id];
if (progress && progress.completed) {
if (progress?.completed) {
totalCompleted += progress.completed.length;
}
});