Class_generator/Legacy/js/content/example-minimal.js
StillHammer 38920cc858 Complete architectural rewrite with ultra-modular system
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>
2025-09-22 07:08:39 +08:00

59 lines
1.6 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Example content module with minimal data (no images, some missing pronunciation)
window.ContentModules = window.ContentModules || {};
window.ContentModules.ExampleMinimal = {
name: "Minimal Vocabulary Test",
description: "Test content with missing images and audio",
difficulty: "easy",
language: "en-US",
// Vocabulary with mixed availability of features
vocabulary: {
"hello": {
translation: "bonjour",
pronunciation: "həˈloʊ",
type: "greeting"
// No image
},
"goodbye": {
translation: "au revoir",
type: "greeting"
// No image, no pronunciation
},
"water": {
translation: "eau",
pronunciation: "ˈːtər",
type: "noun"
// No image
},
"food": {
translation: "nourriture",
type: "noun"
// No image, no pronunciation
},
"happy": {
translation: "heureux",
pronunciation: "ˈhæpi",
type: "adjective"
// No image
},
"sad": {
translation: "triste",
type: "adjective"
// No image, no pronunciation
}
},
// Backward compatibility for other games
sentences: [
{
english: "Hello, how are you?",
chinese: "Bonjour, comment allez-vous?",
prononciation: "həˈloʊ haʊ ɑr ju"
},
{
english: "I need some water",
chinese: "J'ai besoin d'eau",
prononciation: "aɪ nid sʌm ˈːtər"
}
]
};