feat: Add floating sidebar navigation and dark theme support
- Add floating pill-shaped sidebar with navigation icons - Implement dark/light theme toggle with localStorage persistence - Update all figure factories for transparent backgrounds - Use carto-darkmatter map style for choropleths - Add methodology link button to Toronto dashboard header - Add back to dashboard button on methodology page - Remove social links from home page (now in sidebar) - Update CLAUDE.md to Sprint 7 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
import dash
|
||||
import dash_mantine_components as dmc
|
||||
from dash import dcc, html
|
||||
|
||||
from .components import create_sidebar
|
||||
from .config import get_settings
|
||||
|
||||
|
||||
@@ -17,14 +19,31 @@ def create_app() -> dash.Dash:
|
||||
)
|
||||
|
||||
app.layout = dmc.MantineProvider(
|
||||
dash.page_container,
|
||||
id="mantine-provider",
|
||||
children=[
|
||||
dcc.Location(id="url", refresh=False),
|
||||
dcc.Store(id="theme-store", storage_type="local", data="dark"),
|
||||
dcc.Store(id="theme-init-dummy"), # Dummy store for theme init callback
|
||||
html.Div(
|
||||
[
|
||||
create_sidebar(),
|
||||
html.Div(
|
||||
dash.page_container,
|
||||
className="page-content-wrapper",
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
theme={
|
||||
"primaryColor": "blue",
|
||||
"fontFamily": "'Inter', sans-serif",
|
||||
},
|
||||
forceColorScheme="light",
|
||||
defaultColorScheme="dark",
|
||||
)
|
||||
|
||||
# Import callbacks to register them
|
||||
from . import callbacks # noqa: F401
|
||||
|
||||
return app
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user