Major Changes: - Moved legacy system to Legacy/ folder for archival - Built new modular architecture with strict separation of concerns - Created core system: Module, EventBus, ModuleLoader, Router - Added Application bootstrap with auto-start functionality - Implemented development server with ES6 modules support - Created comprehensive documentation and project context - Converted SBS-7-8 content to JSON format - Copied all legacy games and content to new structure New Architecture Features: - Sealed modules with WeakMap private data - Strict dependency injection system - Event-driven communication only - Inviolable responsibility patterns - Auto-initialization without commands - Component-based UI foundation ready Technical Stack: - Vanilla JS/HTML/CSS only - ES6 modules with proper imports/exports - HTTP development server (no file:// protocol) - Modular CSS with component scoping - Comprehensive error handling and debugging Ready for Phase 2: Converting legacy modules to new architecture 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
81 lines
2.5 KiB
JavaScript
81 lines
2.5 KiB
JavaScript
// Example content module with image support for Word Discovery game
|
||
window.ContentModules = window.ContentModules || {};
|
||
window.ContentModules.ExampleWithImages = {
|
||
name: "Basic Vocabulary with Images",
|
||
description: "Simple English words with visual support for beginners",
|
||
difficulty: "easy",
|
||
language: "en-US",
|
||
|
||
// Vocabulary with image support
|
||
vocabulary: {
|
||
"apple": {
|
||
translation: "pomme",
|
||
pronunciation: "æpəl",
|
||
type: "noun",
|
||
image: "assets/images/vocabulary/apple.png",
|
||
audioFile: "assets/audio/vocabulary/apple.mp3"
|
||
},
|
||
"cat": {
|
||
translation: "chat",
|
||
pronunciation: "kæt",
|
||
type: "noun",
|
||
image: "assets/images/vocabulary/cat.png",
|
||
audioFile: "assets/audio/vocabulary/cat_broken.mp3" // Broken path to test fallback
|
||
},
|
||
"house": {
|
||
translation: "maison",
|
||
pronunciation: "haʊs",
|
||
type: "noun",
|
||
image: "assets/images/vocabulary/house.png"
|
||
},
|
||
"car": {
|
||
translation: "voiture",
|
||
pronunciation: "kɑr",
|
||
type: "noun",
|
||
image: "assets/images/vocabulary/car.png"
|
||
},
|
||
"tree": {
|
||
translation: "arbre",
|
||
pronunciation: "tri",
|
||
type: "noun",
|
||
image: "assets/images/vocabulary/tree.png"
|
||
},
|
||
"book": {
|
||
translation: "livre",
|
||
pronunciation: "bʊk",
|
||
type: "noun",
|
||
image: "assets/images/vocabulary/book.png"
|
||
},
|
||
"sun": {
|
||
translation: "soleil",
|
||
pronunciation: "sʌn",
|
||
type: "noun",
|
||
image: "assets/images/vocabulary/sun.png"
|
||
},
|
||
"dog": {
|
||
translation: "chien",
|
||
pronunciation: "dɔg",
|
||
type: "noun",
|
||
image: "assets/images/vocabulary/dog.png"
|
||
}
|
||
},
|
||
|
||
// Backward compatibility for other games
|
||
sentences: [
|
||
{
|
||
english: "The apple is red",
|
||
chinese: "La pomme est rouge",
|
||
prononciation: "ðə æpəl ɪz red"
|
||
},
|
||
{
|
||
english: "The cat is sleeping",
|
||
chinese: "Le chat dort",
|
||
prononciation: "ðə kæt ɪz slipɪŋ"
|
||
},
|
||
{
|
||
english: "I live in a house",
|
||
chinese: "J'habite dans une maison",
|
||
prononciation: "aɪ lɪv ɪn ə haʊs"
|
||
}
|
||
]
|
||
}; |