web: move the section jumps to their own strip and grow the Theme menu
The six section links leave the top bar for a thin shelf under it, each a bordered pill at the page's normal text size, so the bar itself stays a row of actions and the jumps still read as buttons. The Theme menu gains the workspace's colour groups — the landing palette now takes its hue from the accent tokens — an Auto mode that follows the OS scheme live, and a dropdown in place of the three font chips.
This commit is contained in:
@@ -21,6 +21,12 @@ export function ThemeProvider({ children }: { children: ReactNode }) {
|
||||
|
||||
useEffect(() => {
|
||||
applyTheme(mode, accent, fonts);
|
||||
// Auto has to follow the OS while the page is open, not just at mount.
|
||||
if (mode !== 'auto') return;
|
||||
const media = window.matchMedia('(prefers-color-scheme: light)');
|
||||
const onChange = () => applyTheme(mode, accent, fonts);
|
||||
media.addEventListener('change', onChange);
|
||||
return () => media.removeEventListener('change', onChange);
|
||||
}, [mode, accent, fonts]);
|
||||
|
||||
const setMode = useCallback((next: ThemeMode) => setModeState(next), []);
|
||||
|
||||
Reference in New Issue
Block a user