diff --git a/apps/web/package.json b/apps/web/package.json index e5f2faf..418095a 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -16,6 +16,8 @@ "dependencies": { "@clerk/clerk-react": "^5.61.8", "@clerk/themes": "^2.4.57", + "@fontsource-variable/hanken-grotesk": "^5.3.0", + "@fontsource-variable/jetbrains-mono": "^5.3.0", "@hookform/resolvers": "^3.10.0", "@radix-ui/react-accordion": "^1.2.11", "@radix-ui/react-alert-dialog": "^1.1.14", diff --git a/apps/web/public/theme-init.js b/apps/web/public/theme-init.js index fe7cf0c..39941a2 100644 --- a/apps/web/public/theme-init.js +++ b/apps/web/public/theme-init.js @@ -5,6 +5,10 @@ (value === 'system' && window.matchMedia && !window.matchMedia('(prefers-color-scheme: dark)').matches); if (useLightTheme) document.documentElement.setAttribute('data-theme', 'light'); + // The calm redesign (src/lib/design-mode.ts) is opt-in from the sidebar. + if (localStorage.getItem('waggle-design') === 'calm') { + document.documentElement.setAttribute('data-design', 'calm'); + } } catch (_error) { // Storage can be unavailable in hardened webviews; dark is the default. } diff --git a/apps/web/src/app-entry.tsx b/apps/web/src/app-entry.tsx index 5c0833a..9e7a69a 100644 --- a/apps/web/src/app-entry.tsx +++ b/apps/web/src/app-entry.tsx @@ -2,6 +2,10 @@ import { createRoot } from 'react-dom/client'; import { flushSync } from 'react-dom'; import App from './App.tsx'; import './index.css'; +// Bundled fonts and the opt-in calm design layer (src/lib/design-mode.ts). +import '@fontsource-variable/hanken-grotesk'; +import '@fontsource-variable/jetbrains-mono'; +import './styles/calm.css'; import { applyStoredThemeEarly } from '@/providers/ThemeProvider'; export function mountApp(): void { diff --git a/apps/web/src/components/os/AppShell.tsx b/apps/web/src/components/os/AppShell.tsx index 0a8476f..5a45818 100644 --- a/apps/web/src/components/os/AppShell.tsx +++ b/apps/web/src/components/os/AppShell.tsx @@ -452,7 +452,7 @@ const ShellLayout = () => { return (
- +
{ const navigate = useNavigate(); const { pathname } = useLocation(); + const [design, setDesign] = useDesignMode(); + const calm = design === "calm"; const isActive = (item: SidebarNavItem): boolean => item.activeWhen @@ -95,7 +98,7 @@ const Sidebar = ({ {active && ( )} + {/* Design switch: the classic look or the calm redesign (styles/calm.css) */} + + + + {/* User row → Settings */}