--- name: nodel-frontend description: Build custom frontends and dashboards for Nodel nodes using index.xml, custom.css, custom.js, and XSL templates. Use when developing UI components for Nodel recipes. --- # Nodel Frontend Development ## Frontend File Structure A node's frontend is defined in its folder: ``` nodes/My Node/ ├── script.py # Node logic ├── nodeConfig.json # Node config and bindings └── content # Web root ├── index.xml # Frontend definition ├── css | └── custom.css # Custom styles (optional) └── js └── custom.js # Custom JavaScript (optional) ``` ## Basic Dashboard Structure ```xml ``` ### Root Attributes | Attribute | Purpose | |-----------|---------| | `title` | Dashboard title in header | | `theme` | Passed through to Bootstrap navbar classes and theme CSS selection | | `logo` | Custom logo image path | | `css` | Custom CSS file path | | `js` | Custom JavaScript file path | | `core` | Core/admin mode (skips custom `css` / `js` loading) | ## Layout System ### Grid System Uses Bootstrap 3 grid (12 columns): ```xml Full width on small+ screens Half width Half width Quarter Quarter Quarter Quarter ``` Breakpoints: - `xs` - Extra small (phones) - `sm` - Small (tablets) - `md` - Medium (desktops) - `lg` - Large (large desktops) ### Groups Visual grouping with background: ```xml Power Control ``` ### Page Groups Dropdown navigation for many pages: ```xml ... ... ... ``` ## UI Components See `references/components.md` for complete component reference. Notes: - Use `` for images (`` is not a supported component tag). - `` is header-only (place directly under `
`; checkbox is the built-in rendered type). - `