feat(frontend+backend): add theming to the blazor frontend
This commit is contained in:
102
CLAUDE.md
102
CLAUDE.md
@@ -34,7 +34,7 @@ backend/
|
||||
#### API Layer (`api/`)
|
||||
- **app.py**: FastAPI application with comprehensive REST endpoints
|
||||
- **__main__.py**: Uvicorn server entry point with auto-reload
|
||||
- Supports CORS for frontend communication on `localhost:5000/5001`
|
||||
- Supports CORS for frontend communication on `localhost:5059`
|
||||
- Pydantic models for request/response validation with C# naming convention compatibility
|
||||
|
||||
#### CLI Layer (`cli/`)
|
||||
@@ -204,7 +204,7 @@ dotnet publish -c Release # Publish for deployment
|
||||
```
|
||||
|
||||
**Access:**
|
||||
- Development: https://localhost:5001 (HTTPS) or http://localhost:5000 (HTTP)
|
||||
- Development: http://localhost:5059
|
||||
- Expects backend API at http://localhost:8000/api/
|
||||
|
||||
## Core Business Logic
|
||||
@@ -286,11 +286,105 @@ tests/
|
||||
9. **Testing**: Add tests for new functionality
|
||||
10. **Integration**: Test full stack communication
|
||||
|
||||
## Color Palette & Design System
|
||||
|
||||
The NimbusFlow brand uses a sophisticated color palette inspired by the logo's golden cloud and deep navy background, creating a professional yet warm aesthetic suitable for church ministry applications.
|
||||
|
||||
### Primary Colors
|
||||
|
||||
```css
|
||||
:root {
|
||||
/* Primary Brand Colors */
|
||||
--nimbus-navy: #1a2332; /* Deep navy background */
|
||||
--nimbus-navy-light: #2a3441; /* Lighter navy variant */
|
||||
--nimbus-navy-dark: #0f1419; /* Darker navy variant */
|
||||
|
||||
/* Golden Accent Colors */
|
||||
--nimbus-gold: #ffd700; /* Primary gold */
|
||||
--nimbus-gold-light: #ffed4e; /* Light gold highlight */
|
||||
--nimbus-gold-dark: #e6c200; /* Dark gold shadow */
|
||||
--nimbus-amber: #ffb347; /* Warm amber accent */
|
||||
|
||||
/* Neutral Colors */
|
||||
--nimbus-white: #ffffff; /* Pure white */
|
||||
--nimbus-gray-100: #f8f9fa; /* Light gray */
|
||||
--nimbus-gray-300: #dee2e6; /* Medium light gray */
|
||||
--nimbus-gray-600: #6c757d; /* Medium gray */
|
||||
--nimbus-gray-800: #343a40; /* Dark gray */
|
||||
}
|
||||
```
|
||||
|
||||
### Bootstrap Integration
|
||||
|
||||
```css
|
||||
/* Override Bootstrap variables */
|
||||
:root {
|
||||
--bs-primary: var(--nimbus-navy);
|
||||
--bs-primary-rgb: 26, 35, 50;
|
||||
--bs-secondary: var(--nimbus-gold);
|
||||
--bs-secondary-rgb: 255, 215, 0;
|
||||
--bs-success: #28a745;
|
||||
--bs-warning: var(--nimbus-amber);
|
||||
--bs-info: #17a2b8;
|
||||
--bs-danger: #dc3545;
|
||||
}
|
||||
```
|
||||
|
||||
### Usage Guidelines
|
||||
|
||||
**Primary Navy (`--nimbus-navy`):**
|
||||
- Navigation bars and headers
|
||||
- Card backgrounds in dark mode
|
||||
- Button primary states
|
||||
- Footer backgrounds
|
||||
|
||||
**Golden Accent (`--nimbus-gold`):**
|
||||
- Call-to-action buttons
|
||||
- Active states and highlights
|
||||
- Icons and accent elements
|
||||
- Success indicators
|
||||
|
||||
**Amber (`--nimbus-amber`):**
|
||||
- Warning states
|
||||
- Pending status indicators
|
||||
- Hover effects on interactive elements
|
||||
|
||||
### Accessibility Considerations
|
||||
|
||||
All color combinations meet WCAG 2.1 AA standards:
|
||||
- **Navy on White**: 12.6:1 contrast ratio
|
||||
- **Gold on Navy**: 4.8:1 contrast ratio
|
||||
- **White on Navy**: 12.6:1 contrast ratio
|
||||
- **Dark Gray on Light Gray**: 7.2:1 contrast ratio
|
||||
|
||||
### Implementation Example
|
||||
|
||||
```razor
|
||||
<!-- Primary navigation -->
|
||||
<nav class="navbar navbar-expand-lg" style="background-color: var(--nimbus-navy);">
|
||||
<div class="navbar-brand text-white">
|
||||
<i class="bi bi-cloud" style="color: var(--nimbus-gold);"></i>
|
||||
NimbusFlow
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Action button -->
|
||||
<button class="btn" style="background-color: var(--nimbus-gold); color: var(--nimbus-navy);">
|
||||
Schedule Next Member
|
||||
</button>
|
||||
|
||||
<!-- Status badges -->
|
||||
<span class="badge" style="background-color: var(--nimbus-amber); color: var(--nimbus-navy);">
|
||||
Pending
|
||||
</span>
|
||||
```
|
||||
|
||||
## Important Notes
|
||||
|
||||
- **Thread Safety**: FastAPI uses custom DatabaseConnection for thread safety
|
||||
- **JSON Compatibility**: Backend uses PascalCase/camelCase aliasing for C# compatibility
|
||||
- **Error Handling**: Comprehensive HTTP status codes and error responses
|
||||
- **CORS**: Configured for frontend origins on localhost:5000/5001
|
||||
- **CORS**: Configured for frontend origins on localhost:5059
|
||||
- **Virtual Environment**: Pre-configured Python environment in `backend/.venv/`
|
||||
- **Auto-reload**: Both backend (Uvicorn) and frontend (dotnet watch) support hot reload
|
||||
- **Auto-reload**: Both backend (Uvicorn) and frontend (dotnet watch) support hot reload
|
||||
- **Brand Colors**: Use the defined color palette consistently across all UI components
|
||||
Reference in New Issue
Block a user