docs(production): standardiserad produktionsberedskap och gap-analys
Lägger docs/production-readiness.md och siax/production-gaps.json enligt SIAX Master Definition of Done. Underlag: git-, kod- och live-evidens 2026-11-11. Nivån är evidensbaserad, inte ett leveransgodkännande.
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
'use client'
|
||||
|
||||
import { useEffect } from 'react'
|
||||
|
||||
/**
|
||||
* Mirrors the app's real background into <meta name="theme-color"> so the
|
||||
* browser chrome (iOS status bar, Android address bar) always matches what
|
||||
* is on screen. A static viewport color cannot: dark mode is a class toggle
|
||||
* (next-themes) and color palettes swap --background at runtime via
|
||||
* data-palette, both on <html>.
|
||||
*/
|
||||
export function ThemeColorSync() {
|
||||
useEffect(() => {
|
||||
const root = document.documentElement
|
||||
const sync = () => {
|
||||
const bg = getComputedStyle(root).getPropertyValue('--background').trim()
|
||||
if (!bg) return
|
||||
document
|
||||
.querySelector('meta[name="theme-color"]')
|
||||
?.setAttribute('content', `hsl(${bg})`)
|
||||
}
|
||||
sync()
|
||||
const observer = new MutationObserver(sync)
|
||||
observer.observe(root, { attributes: true, attributeFilter: ['class', 'data-palette'] })
|
||||
return () => observer.disconnect()
|
||||
}, [])
|
||||
return null
|
||||
}
|
||||
Reference in New Issue
Block a user