feat(ZEE-29): implement design system, dark mode, and JSON content management
- Add comprehensive design system with CSS variables, animations, and utility classes - Implement dark mode with ThemeProvider (system preference + manual toggle) - Create JSON-based content management system in src/content/ - Update all pages to use structured JSON content - Add ThemeProvider component with theme toggle button - Update Header with glass effect and animated mobile menu - Update Footer with dark mode support - Update documentation (README.md, CLAUDE.md, knowledge.md, proto/README.md) - Sync with Linear (ZEE-29 completed)
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Content Loader - Centralized content management
|
||||
*
|
||||
* This module provides type-safe access to all JSON content files.
|
||||
* Content can be easily modified by editing the JSON files without code changes.
|
||||
*
|
||||
* Usage:
|
||||
* import { content, getPageContent } from '@/content'
|
||||
*
|
||||
* // Access specific page content
|
||||
* const aboutContent = content.pages.about
|
||||
*
|
||||
* // Or use the helper function
|
||||
* const servicesContent = getPageContent('services')
|
||||
*/
|
||||
|
||||
import type {
|
||||
SiteContent,
|
||||
CommonContent,
|
||||
HomePageContent,
|
||||
AboutPageContent,
|
||||
ServicesPageContent,
|
||||
ContactPageContent
|
||||
} from './types'
|
||||
|
||||
// Import JSON files
|
||||
import commonJson from './common.json'
|
||||
import homeJson from './pages/home.json'
|
||||
import aboutJson from './pages/about.json'
|
||||
import servicesJson from './pages/services.json'
|
||||
import contactJson from './pages/contact.json'
|
||||
|
||||
// Type assertions for JSON imports
|
||||
const common: CommonContent = commonJson as CommonContent
|
||||
const home: HomePageContent = homeJson as HomePageContent
|
||||
const about: AboutPageContent = aboutJson as AboutPageContent
|
||||
const services: ServicesPageContent = servicesJson as ServicesPageContent
|
||||
const contact: ContactPageContent = contactJson as ContactPageContent
|
||||
|
||||
// Combined content object
|
||||
export const content: SiteContent = {
|
||||
common,
|
||||
pages: {
|
||||
home,
|
||||
about,
|
||||
services,
|
||||
contact
|
||||
}
|
||||
}
|
||||
|
||||
// Helper function to get page content with type safety
|
||||
export function getPageContent<T extends keyof SiteContent['pages']>(
|
||||
page: T
|
||||
): SiteContent['pages'][T] {
|
||||
return content.pages[page]
|
||||
}
|
||||
|
||||
// Export individual content for direct imports
|
||||
export { common, home, about, services, contact }
|
||||
|
||||
// Re-export types
|
||||
export * from './types'
|
||||
Reference in New Issue
Block a user