|
| 1 | +# Jordnaer Design System Implementation Guide |
| 2 | + |
| 3 | +## Overview |
| 4 | + |
| 5 | +This document explains how to use the Jordnaer (Mini Møder) design system implemented based on the official `Mini Design Guide.pdf`. |
| 6 | + |
| 7 | +## Color Palette |
| 8 | + |
| 9 | +### CSS Variables |
| 10 | + |
| 11 | +All brand colors are available as CSS variables: |
| 12 | + |
| 13 | +```css |
| 14 | +--color-glaede: #dbab45; /* Joy - primary yellow-orange */ |
| 15 | +--color-ro: #878e64; /* Calm - secondary green */ |
| 16 | +--color-moede: #41556b; /* Meeting - body text blue */ |
| 17 | +--color-moede-red: #673417; /* Meeting - small text/quotes red-brown */ |
| 18 | +--color-omsorg: #cfc1a6; /* Care - light beige background */ |
| 19 | +--color-leg: #a9c0cf; /* Play - light blue background */ |
| 20 | +``` |
| 21 | + |
| 22 | +### C# Palette (JordnaerPalette.cs) |
| 23 | + |
| 24 | +For Blazor components, use the `JordnaerPalette` class: |
| 25 | + |
| 26 | +```csharp |
| 27 | +using Jordnaer.Features.Theme; |
| 28 | + |
| 29 | +// Background colors |
| 30 | +JordnaerPalette.YellowBackground // #dbab45 (GLÆDE) |
| 31 | +JordnaerPalette.GreenBackground // #878e64 (RO) |
| 32 | +JordnaerPalette.BeigeBackground // #cfc1a6 (OMSORG) |
| 33 | +JordnaerPalette.PaleBlueBackground // #a9c0cf (LEG) |
| 34 | +
|
| 35 | +// Text colors |
| 36 | +JordnaerPalette.BlueBody // #41556b (MØDE - body text) |
| 37 | +JordnaerPalette.RedHeader // #673417 (MØDE - small text/quotes) |
| 38 | +
|
| 39 | +// Transparent variants |
| 40 | +JordnaerPalette.BeigeBackground60 // 60% opacity |
| 41 | +JordnaerPalette.PaleBlueBackground40 // 40% opacity |
| 42 | +``` |
| 43 | + |
| 44 | +### Usage Rules |
| 45 | + |
| 46 | +- **GLÆDE (Yellow)**: Primary color for heading backgrounds and key elements |
| 47 | +- **RO (Green)**: Secondary color for heading backgrounds |
| 48 | +- **MØDE (Blue)**: Body text color - use for all readable text |
| 49 | +- **MØDE Red (Red-brown)**: Small text, payoffs, quotes |
| 50 | +- **OMSORG (Beige)**: Background when yellow/green are too dark |
| 51 | +- **LEG (Blue)**: Rarely used lighter background |
| 52 | + |
| 53 | +⚠️ **Important**: Never use yellow or light colors for body text (readability issues) |
| 54 | + |
| 55 | +## Typography |
| 56 | + |
| 57 | +### Font Families |
| 58 | + |
| 59 | +```css |
| 60 | +--font-heading: 'Cherry Bomb One', cursive; |
| 61 | +--font-body: 'Open Sans Light', sans-serif; |
| 62 | +--font-body-bold: 'Open Sans Bold', sans-serif; |
| 63 | +--font-body-medium: 'Open Sans Medium', sans-serif; |
| 64 | +``` |
| 65 | + |
| 66 | +### Heading Styles |
| 67 | + |
| 68 | +**H1, H2, H3** - Cherry Bomb One |
| 69 | +- Automatically use Cherry Bomb One font |
| 70 | +- Letter spacing: `0.11em` (110 tracking) |
| 71 | +- Text transform: lowercase |
| 72 | +- Use for short words and main headings |
| 73 | + |
| 74 | +```html |
| 75 | +<h1>velkommen til jordnaer</h1> |
| 76 | +<h2 class="heading-yellow">find nye venner</h2> |
| 77 | +<h3 class="heading-green">lokal fællesskab</h3> |
| 78 | +``` |
| 79 | + |
| 80 | +**H4, H5, H6** - Open Sans Bold |
| 81 | +- Letter spacing: `0.41em` (410 tracking) |
| 82 | +- Color: MØDE blue (`#41556b`) |
| 83 | +- Use where Cherry Bomb becomes unreadable |
| 84 | + |
| 85 | +### Body Text |
| 86 | + |
| 87 | +All body text automatically uses **Open Sans Light** with MØDE blue color. |
| 88 | + |
| 89 | +```html |
| 90 | +<p>This is standard body text in Open Sans Light.</p> |
| 91 | +<p class="small-text">Small text or quote in red-brown.</p> |
| 92 | +``` |
| 93 | + |
| 94 | +### CSS Classes |
| 95 | + |
| 96 | +```css |
| 97 | +.font-cherry-bomb-one /* Cherry Bomb One with correct spacing */ |
| 98 | +.font-open-sans-light /* Open Sans Light */ |
| 99 | +.font-open-sans-bold /* Open Sans Bold */ |
| 100 | +.font-open-sans-medium /* Open Sans Medium */ |
| 101 | + |
| 102 | +.subheading /* Subheading style (Open Sans + tracking) */ |
| 103 | +.subheading-red /* Subheading in red-brown */ |
| 104 | +.small-text /* Small text in red-brown */ |
| 105 | +``` |
| 106 | + |
| 107 | +## Heading Color Rotation |
| 108 | + |
| 109 | +To create visual variety, rotate heading colors across sections: |
| 110 | + |
| 111 | +### Text Color Utilities |
| 112 | + |
| 113 | +```html |
| 114 | +<h1 class="heading-yellow">overskrift 1</h1> |
| 115 | +<h2 class="heading-green">overskrift 2</h2> |
| 116 | +<h3 class="heading-blue">overskrift 3</h3> |
| 117 | +``` |
| 118 | + |
| 119 | +### Background Color Utilities |
| 120 | + |
| 121 | +For headings with colored backgrounds: |
| 122 | + |
| 123 | +```html |
| 124 | +<h2 class="bg-heading-yellow">featured heading</h2> |
| 125 | +<h3 class="bg-heading-green">secondary heading</h3> |
| 126 | +<h4 class="bg-heading-blue">tertiary heading</h4> |
| 127 | +``` |
| 128 | + |
| 129 | +For custom backgrounds: |
| 130 | + |
| 131 | +```html |
| 132 | +<div class="bg-glaede">Yellow background</div> |
| 133 | +<div class="bg-ro">Green background</div> |
| 134 | +<div class="bg-moede">Blue background</div> |
| 135 | +<div class="bg-omsorg">Beige background</div> |
| 136 | +<div class="bg-leg">Light blue background</div> |
| 137 | +``` |
| 138 | + |
| 139 | +### Design Principle: Color Variety |
| 140 | + |
| 141 | +✅ **DO**: Vary colors across sections |
| 142 | +```html |
| 143 | +<section> |
| 144 | + <h2 class="heading-yellow">første sektion</h2> |
| 145 | + <p>Content...</p> |
| 146 | +</section> |
| 147 | +<section> |
| 148 | + <h2 class="heading-green">anden sektion</h2> |
| 149 | + <p>Content...</p> |
| 150 | +</section> |
| 151 | +<section> |
| 152 | + <h2 class="heading-blue">tredje sektion</h2> |
| 153 | + <p>Content...</p> |
| 154 | +</section> |
| 155 | +``` |
| 156 | + |
| 157 | +❌ **DON'T**: Use multiple colors in one heading |
| 158 | +```html |
| 159 | +<h1> |
| 160 | + <span class="heading-yellow">multi</span> |
| 161 | + <span class="heading-green">colored</span> |
| 162 | +</h1> |
| 163 | +<!-- Only the logo does this! --> |
| 164 | +``` |
| 165 | + |
| 166 | +## Visual Elements |
| 167 | + |
| 168 | +### Dotted Line Separator |
| 169 | + |
| 170 | +Use dotted lines to separate sections (represents bee flight path): |
| 171 | + |
| 172 | +```html |
| 173 | +<hr class="dotted-separator" /> |
| 174 | +<hr class="dotted-separator-green" /> |
| 175 | +<hr class="dotted-separator-blue" /> |
| 176 | +``` |
| 177 | + |
| 178 | +Or use the bee separator with pseudo-element: |
| 179 | + |
| 180 | +```html |
| 181 | +<div class="bee-separator"></div> |
| 182 | +``` |
| 183 | + |
| 184 | +## Warmth & Interactions |
| 185 | + |
| 186 | +### Button Transitions |
| 187 | + |
| 188 | +All buttons automatically have smooth hover effects: |
| 189 | +- Slight upward movement on hover |
| 190 | +- Subtle shadow enhancement |
| 191 | +- 200ms transition |
| 192 | + |
| 193 | +### Card Hover Effects |
| 194 | + |
| 195 | +Cards have built-in warm hover states: |
| 196 | + |
| 197 | +```html |
| 198 | +<div class="mud-card warm-shadow"> |
| 199 | + <!-- Card content --> |
| 200 | +</div> |
| 201 | +``` |
| 202 | + |
| 203 | +### Link Transitions |
| 204 | + |
| 205 | +Links automatically transition to GLÆDE yellow on hover. |
| 206 | + |
| 207 | +### Input Focus States |
| 208 | + |
| 209 | +Input fields show GLÆDE yellow outline when focused. |
| 210 | + |
| 211 | +## Utility Classes |
| 212 | + |
| 213 | +### Warmth Utilities |
| 214 | + |
| 215 | +```css |
| 216 | +.warm-shadow /* Soft shadow with brand green tint */ |
| 217 | +.warm-shadow-hover /* Enhanced shadow on hover */ |
| 218 | +.warm-rounded /* Friendly 12px border radius */ |
| 219 | +.warm-spacing /* Consistent 1.5rem bottom margin */ |
| 220 | +``` |
| 221 | + |
| 222 | +### Example Usage |
| 223 | + |
| 224 | +```html |
| 225 | +<div class="mud-card warm-shadow warm-rounded warm-spacing"> |
| 226 | + <h3 class="heading-yellow">bruger profil</h3> |
| 227 | + <p>Dette er en varm og venlig card...</p> |
| 228 | +</div> |
| 229 | +``` |
| 230 | + |
| 231 | +## Blazor Component Examples |
| 232 | + |
| 233 | +### Using Colors in MudBlazor |
| 234 | + |
| 235 | +```razor |
| 236 | +@using Jordnaer.Features.Theme |
| 237 | +
|
| 238 | +<MudPaper Style="@($"background-color: {JordnaerPalette.YellowBackground}")"> |
| 239 | + <MudText Typo="Typo.h2" Style="@($"color: white")"> |
| 240 | + velkommen |
| 241 | + </MudText> |
| 242 | +</MudPaper> |
| 243 | +
|
| 244 | +<MudButton Color="Color.Primary" |
| 245 | + Style="@($"background-color: {JordnaerPalette.GreenBackground}")"> |
| 246 | + Klik her |
| 247 | +</MudButton> |
| 248 | +``` |
| 249 | + |
| 250 | +### Typography in Blazor |
| 251 | + |
| 252 | +```razor |
| 253 | +<MudText Typo="Typo.h1" Class="heading-yellow"> |
| 254 | + hovedoverskrift |
| 255 | +</MudText> |
| 256 | +
|
| 257 | +<MudText Typo="Typo.body1" Style="@($"color: {JordnaerPalette.BlueBody}")"> |
| 258 | + Body tekst i den rigtige farve |
| 259 | +</MudText> |
| 260 | +
|
| 261 | +<MudText Class="small-text"> |
| 262 | + Lille tekst eller citat |
| 263 | +</MudText> |
| 264 | +``` |
| 265 | + |
| 266 | +## Accessibility |
| 267 | + |
| 268 | +All color combinations meet WCAG contrast standards: |
| 269 | + |
| 270 | +✅ **Good Contrast**: |
| 271 | +- MØDE blue (#41556b) on white background |
| 272 | +- MØDE red (#673417) on white background |
| 273 | +- White text on GLÆDE yellow (#dbab45) |
| 274 | +- White text on RO green (#878e64) |
| 275 | +- White text on MØDE blue (#41556b) |
| 276 | + |
| 277 | +❌ **Poor Contrast** (avoid): |
| 278 | +- Yellow text on white background |
| 279 | +- Beige text on white background |
| 280 | +- Light blue text on white background |
| 281 | + |
| 282 | +## Design Checklist |
| 283 | + |
| 284 | +When implementing new features, ensure: |
| 285 | + |
| 286 | +- [ ] Headings use Cherry Bomb One (h1-h3) with `0.11em` letter-spacing |
| 287 | +- [ ] Heading colors rotate across sections (not all same color) |
| 288 | +- [ ] Body text uses MØDE blue or MØDE red (never yellow/light colors) |
| 289 | +- [ ] Background colors follow usage rules (primary: yellow/green, light: beige/blue) |
| 290 | +- [ ] Dotted separators used between major sections |
| 291 | +- [ ] Interactive elements have smooth transitions (200-300ms) |
| 292 | +- [ ] Cards have warm shadows and hover effects |
| 293 | +- [ ] Consistent spacing maintained throughout |
| 294 | +- [ ] Overall feel is warm, friendly, and harmonious |
| 295 | + |
| 296 | +## Resources |
| 297 | + |
| 298 | +- **Design Guide**: `docs/Mini Design Guide.pdf` |
| 299 | +- **Color Palette**: `src/web/Jordnaer/Features/Theme/JordnaerPalette.cs` |
| 300 | +- **CSS Variables**: `src/web/Jordnaer/wwwroot/css/app.css` |
| 301 | +- **Fonts**: `src/web/Jordnaer/wwwroot/css/fonts.css` |
| 302 | +- **Task Documentation**: `tasks/01-warmer-ui-ux.md` |
0 commit comments