feat(marketing-website): add BreakPilot marketing website with CMP integration
Multi-page marketing website positioned as "Deterministic Regulatory Engineering Platform": - 7 pages: Home, Plattform, CE-Prozess, Product Compliance, Architektur, Team, Preise - Platform Bridge animation (adapted from pitch-deck USP slide) - Cookie-Banner with consent-service integration (breakpilot-marketing site) - DE/EN language toggle + Dark/Light theme - Docker service on port 3014 [guardrail-change] PlatformBridgeSection.tsx added to loc-exceptions (816 LOC, SVG animation) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
'use client'
|
||||
|
||||
import { createContext, useContext, useState, useCallback, useEffect, ReactNode } from 'react'
|
||||
|
||||
type Language = 'de' | 'en'
|
||||
type Theme = 'dark' | 'light'
|
||||
|
||||
interface AppContextType {
|
||||
lang: Language
|
||||
theme: Theme
|
||||
toggleLang: () => void
|
||||
toggleTheme: () => void
|
||||
}
|
||||
|
||||
const AppContext = createContext<AppContextType>({
|
||||
lang: 'de',
|
||||
theme: 'dark',
|
||||
toggleLang: () => {},
|
||||
toggleTheme: () => {},
|
||||
})
|
||||
|
||||
export function AppProvider({ children }: { children: ReactNode }) {
|
||||
const [lang, setLang] = useState<Language>('de')
|
||||
const [theme, setTheme] = useState<Theme>('dark')
|
||||
|
||||
const toggleLang = useCallback(() => {
|
||||
setLang(prev => prev === 'de' ? 'en' : 'de')
|
||||
}, [])
|
||||
|
||||
const toggleTheme = useCallback(() => {
|
||||
setTheme(prev => {
|
||||
const next = prev === 'dark' ? 'light' : 'dark'
|
||||
document.documentElement.classList.toggle('theme-light', next === 'light')
|
||||
return next
|
||||
})
|
||||
}, [])
|
||||
|
||||
useEffect(() => {
|
||||
document.documentElement.classList.toggle('theme-light', theme === 'light')
|
||||
}, [theme])
|
||||
|
||||
return (
|
||||
<AppContext.Provider value={{ lang, theme, toggleLang, toggleTheme }}>
|
||||
{children}
|
||||
</AppContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
export function useApp() {
|
||||
return useContext(AppContext)
|
||||
}
|
||||
Reference in New Issue
Block a user