# UI Theme — current state: MxAccessGateway Repo: `~/Desktop/MxAccessGateway` (Gitea `mxaccessgw`). Stack: .NET 10, Blazor SSR (gateway x64) — UI in `src/ZB.MOM.WW.MxGateway.Server/`. All paths below are relative to the repo root. Verified against source on 2026-06-01. **Summary:** MxAccessGateway uses a sidebar nav layout and the Technical-Light tokens, but the sidebar uses Bootstrap `.sidebar` / `.nav-link` classes rather than the canonical `.side-rail` / `.rail-link` classes, and the overall structure diverges from the spec target. Adoption has the **highest effort and risk** of the three apps — the shell requires migration from its current sidebar idiom to the canonical `ThemeShell` pattern. There is no dedicated login page (authentication gate is integrated into the Dashboard). --- ## 1. CSS / design tokens **`theme.css`** — 379-line hand copy of the Technical-Light design system. Identical in content to OtOpcUa's and ScadaBridge's copies except for the font-path prefix. - Path: `src/ZB.MOM.WW.MxGateway.Server/wwwroot/css/theme.css` - Font path: `url('/fonts/ibm-plex-sans-400.woff2')` (lines 24, 29, 34) - Absolute path (`/fonts/…`) is technically correct (resolves from root of the app), but differs from the canonical `url('../fonts/…')` in the RCL — a deployment path difference, not a loading bug. - Wired in `App.razor` line 6: ``. **`site.css`** — 592 lines of per-app page layout and Dashboard component styling. - Path: `src/ZB.MOM.WW.MxGateway.Server/wwwroot/css/site.css` - Wired in `App.razor` line 7: ``. - Contains: `.sidebar` layout (lines ~24–95), `.dashboard-body`, `.agg-card`, table styles, metric cards, event/alarm grids, and other domain-specific rules. - After adoption: the `.sidebar` layout section is superseded by RCL `layout.css`. The domain-specific table/card/grid rules stay in `site.css`. Note: MxGateway's `App.razor` loads assets from `/css/…` and `/fonts/…` (root-relative paths to `wwwroot/`), not via `_content/…` static-web-asset paths — contrast with OtOpcUa and ScadaBridge which use the RCL `_content/` mechanism. --- ## 2. IBM Plex fonts Three `.woff2` files vendored into: `src/ZB.MOM.WW.MxGateway.Server/wwwroot/fonts/` - `ibm-plex-sans-400.woff2` - `ibm-plex-sans-600.woff2` - `ibm-plex-mono-500.woff2` After adoption: delete all three; the RCL serves them from `_content/ZB.MOM.WW.Theme/fonts/`. --- ## 3. Layout shell **`MainLayout.razor`** — 210-line combined layout + nav component. `@implements IDisposable`; `@inject NavigationManager`, `@inject IJSRuntime`. Interactive (`@rendermode InteractiveServer` inherited from `Routes`). - Path: `src/ZB.MOM.WW.MxGateway.Server/Dashboard/Components/Layout/MainLayout.razor` - Root element: `
`. Note: **no `.app-shell` class** (unlike OtOpcUa and the spec target). - Brand: ` MXAccess Gateway` (line 24). - Nav structure: `