-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpatterns.html
More file actions
609 lines (552 loc) · 22.6 KB
/
patterns.html
File metadata and controls
609 lines (552 loc) · 22.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
<!DOCTYPE html>
<html lang="en" data-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MUD — Layouts & Patterns</title>
<!-- Google Fonts: Onest + JetBrains Mono -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Onest:wght@400;500;600;700&display=swap" rel="stylesheet">
<!-- Bootstrap 5.3 CSS -->
<link href="css/mud.css" rel="stylesheet">
<!-- Bootstrap Icons -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css" rel="stylesheet">
<style>
/* ================================================================
MUD — Design Tokens (CSS Custom Properties)
================================================================ */
:root {
--blue-sky-600: #0058d2;
--blue-sky-700: #0046a8;
--blue-sky-800: #00357e;
--neutral-white: #ffffff;
--neutral-50: #f5f5f5;
--neutral-100: #f1f1f1;
--neutral-200: #d9d9d9;
--neutral-500: #757575;
--neutral-800: #383838;
--neutral-1000: #1e1e1e;
--neutral-ink: #121212;
/* Semantic — Background */
--color-background-base-default: #ffffff;
--color-background-base-secondary: #f5f5f5;
--color-background-base-tertiary: #f1f1f1;
--color-background-brand-default: #0058d2;
--color-background-brand-default-hover: #0046a8;
/* Semantic — Text */
--color-text-base-default: #121212;
--color-text-base-secondary: #383838;
--color-text-base-tertiary: #757575;
--color-text-base-disabled: #bfbfbf;
--color-text-brand-default: #0058d2;
/* Semantic — Border */
--color-border-base-default: #d9d9d9;
--color-border-brand-default: #0058d2;
/* Typography */
--font-family-primary: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
--font-family-mono: "JetBrains Mono", "SF Mono", "Fira Code", monospace;
/* Spacing */
--spacing-4: 0.25rem;
--spacing-6: 0.375rem;
--spacing-8: 0.5rem;
--spacing-12: 0.75rem;
--spacing-16: 1rem;
--spacing-20: 1.25rem;
--spacing-24: 1.5rem;
--spacing-32: 2rem;
--spacing-40: 2.5rem;
--spacing-48: 3rem;
--spacing-64: 4rem;
/* Border Radius */
--border-radius-4: 0.25rem;
--border-radius-6: 0.375rem;
--border-radius-8: 0.5rem;
--border-radius-12: 0.75rem;
--border-radius-16: 1rem;
--border-radius-full: 999px;
/* Border Width */
--border-width-1: 1px;
--border-width-1-5: 1.5px;
/* Shadows */
--box-shadow-100: 0 0 0.5px 0 rgba(0,0,0,0.30), 0 1px 3px 0 rgba(0,0,0,0.16);
--box-shadow-200: 0 0 0.5px 0 rgba(0,0,0,0.18), 0 1px 3px 0 rgba(0,0,0,0.08), 0 3px 8px 0 rgba(0,0,0,0.08);
}
/* Dark theme overrides */
[data-theme="dark"] {
--color-background-base-default: #1e1e1e;
--color-background-base-secondary: #2c2c2c;
--color-background-base-tertiary: #444444;
--color-text-base-default: #ffffff;
--color-text-base-secondary: #f1f1f1;
--color-text-base-tertiary: #a6a6a6;
--color-border-base-default: #444444;
}
/* ================================================================
Global Overrides
================================================================ */
body {
font-family: var(--font-family-primary);
color: var(--color-text-base-default);
background-color: var(--color-background-base-default);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
font-family: var(--font-family-primary);
font-weight: 600;
color: var(--color-text-base-default);
}
a { color: var(--color-text-brand-default); }
a:hover { color: var(--blue-sky-700); }
/* ================================================================
Typography Classes
================================================================ */
.display-large {
font-size: 3.5rem;
font-weight: 600;
line-height: 4rem;
letter-spacing: -1.12px;
}
.heading-h3 {
font-size: 1.5rem;
font-weight: 600;
line-height: 2rem;
letter-spacing: -0.24px;
}
.body-default {
font-size: 1rem;
font-weight: 400;
line-height: 1.5rem;
color: var(--color-text-base-secondary);
}
/* ================================================================
Sticky Nav
================================================================ */
.mud-navbar{position:sticky;top:0;z-index:1030;background:var(--blue-sky-800);border-bottom:1px solid rgba(255,255,255,.08);padding:0}
.mud-navbar .container{display:flex;align-items:center;justify-content:space-between;height:56px}
.mud-navbar-brand{display:flex;align-items:center;gap:var(--spacing-12);text-decoration:none;color:#fff;font-weight:700;font-size:1.125rem;letter-spacing:.75px}.mud-navbar-brand:hover{color:#fff}
.mud-navbar-version{display:inline-flex;align-items:center;background:rgba(255,255,255,.15);color:rgba(255,255,255,.85);border:1px solid rgba(255,255,255,.2);border-radius:var(--border-radius-4);padding:.125rem .5rem;font-size:.6875rem;font-weight:600;font-family:var(--font-family-mono);letter-spacing:0}
.mud-navbar-nav{display:flex;align-items:center;gap:0;list-style:none;margin:0;padding:0}
.mud-navbar-nav a{display:block;padding:var(--spacing-8) var(--spacing-12);color:rgba(255,255,255,.75);font-size:.875rem;font-weight:500;transition:color .15s ease;text-decoration:none}
.mud-navbar-nav a:hover,.mud-navbar-nav a.active{color:#fff}
.mud-navbar-right{display:flex;align-items:center;gap:var(--spacing-8)}
.mud-navbar-icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:var(--border-radius-6);color:rgba(255,255,255,.75);background:transparent;border:none;cursor:pointer;font-size:1.125rem;transition:background .15s ease,color .15s ease;text-decoration:none}.mud-navbar-icon:hover{background:rgba(255,255,255,.1);color:#fff}
.mud-navbar-divider{width:1px;height:24px;background:rgba(255,255,255,.15);margin:0 var(--spacing-4)}
.mud-navbar-toggle{display:none;background:none;border:none;color:rgba(255,255,255,.85);font-size:1.375rem;cursor:pointer;padding:var(--spacing-4)}
.mud-navbar-collapse{display:flex;align-items:center;gap:var(--spacing-16)}
@media(max-width:767.98px){.mud-navbar-toggle{display:block}.mud-navbar .container{flex-wrap:wrap}.mud-navbar-collapse{display:none;flex-direction:column;align-items:flex-start;width:100%;padding:var(--spacing-12) 0 var(--spacing-16);border-top:1px solid rgba(255,255,255,.1)}.mud-navbar-collapse.show{display:flex}.mud-navbar-nav{flex-direction:column;align-items:flex-start;width:100%}.mud-navbar-nav a{padding:var(--spacing-8) 0}.mud-navbar-right{padding-top:var(--spacing-8);border-top:1px solid rgba(255,255,255,.08);width:100%}}
/* ================================================================
Utility Classes
================================================================ */
.text-secondary-custom { color: var(--color-text-base-secondary); }
.text-tertiary { color: var(--color-text-base-tertiary); }
.text-brand { color: var(--color-text-brand-default); }
/* ================================================================
Sections
================================================================ */
.demo-section {
padding: var(--spacing-48) 0;
border-bottom: 1px solid var(--color-border-base-default);
}
.demo-section:last-child {
border-bottom: none;
}
/* ================================================================
Pattern Cards
================================================================ */
.pattern-card {
border: 1px solid var(--color-border-base-default);
border-radius: var(--border-radius-12);
overflow: hidden;
background: white;
transition: box-shadow 0.15s;
}
.pattern-card:hover {
box-shadow: var(--box-shadow-200);
}
.pattern-card .card-thumb {
background: var(--color-background-base-secondary);
height: 137px;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.pattern-card .card-body-content {
padding: 16px 16px 20px;
}
.pattern-card .card-body-content h6 {
font-size: 0.875rem;
font-weight: 500;
line-height: 1.25rem;
color: #1e1e1e;
margin-bottom: 8px;
}
.pattern-card .card-body-content p {
font-size: 0.75rem;
font-weight: 400;
line-height: 1rem;
color: var(--color-text-base-tertiary);
margin: 0;
}
[data-theme="dark"] .pattern-card {
background: var(--color-background-base-secondary);
}
[data-theme="dark"] .pattern-card .card-body-content h6 {
color: var(--color-text-base-default);
}
/* ================================================================
Wireframe Thumbnail Styles
================================================================ */
.wireframe {
width: 123px;
height: 81px;
background: white;
border-radius: 4px;
overflow: hidden;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
display: flex;
flex-direction: column;
}
.wireframe .wf-header {
height: 10px;
background: var(--color-background-brand-default);
flex-shrink: 0;
}
.wireframe .wf-content {
flex: 1;
padding: 4px 8px;
display: flex;
flex-direction: column;
gap: 3px;
justify-content: center;
}
.wireframe .wf-line {
height: 3px;
background: #d9d9d9;
border-radius: 1px;
}
.wireframe .wf-line.short {
width: 60%;
}
.wireframe .wf-footer {
height: 8px;
background: #e0e0e0;
flex-shrink: 0;
}
/* Error page wireframe */
.wireframe .wf-error-content {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
}
.wireframe .wf-error-code {
font-family: var(--font-family-primary);
font-size: 14px;
font-weight: 700;
color: #bfbfbf;
line-height: 1;
}
.wireframe .wf-error-btn {
width: 30px;
height: 6px;
background: var(--color-background-brand-default);
border-radius: 3px;
}
/* Sidebar page wireframe */
.wireframe .wf-sidebar-layout {
flex: 1;
display: flex;
flex-direction: row;
}
.wireframe .wf-sidebar {
width: 28px;
background: #e8e8e8;
flex-shrink: 0;
padding: 6px 4px;
display: flex;
flex-direction: column;
gap: 3px;
}
.wireframe .wf-sidebar-line {
height: 2px;
background: #c8c8c8;
border-radius: 1px;
}
.wireframe .wf-main-content {
flex: 1;
padding: 4px 8px;
display: flex;
flex-direction: column;
gap: 3px;
justify-content: center;
}
/* Form page wireframe */
.wireframe .wf-form-content {
flex: 1;
padding: 6px 12px;
display: flex;
flex-direction: column;
gap: 4px;
justify-content: center;
}
.wireframe .wf-form-label {
height: 2px;
width: 30%;
background: #bfbfbf;
border-radius: 1px;
}
.wireframe .wf-form-input {
height: 7px;
background: #ffffff;
border: 1px solid #d9d9d9;
border-radius: 2px;
}
.wireframe .wf-form-btn {
width: 35px;
height: 6px;
background: var(--color-background-brand-default);
border-radius: 3px;
margin-top: 2px;
}
/* ================================================================
Content List Styles
================================================================ */
.content-list {
list-style: none;
padding: 0;
margin: 0;
}
.content-list li {
position: relative;
padding-left: 24px;
margin-bottom: 12px;
font-size: 1rem;
font-weight: 400;
line-height: 1.5rem;
color: var(--color-text-base-secondary);
}
.content-list li::before {
content: "";
position: absolute;
left: 0;
top: 10px;
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--color-background-brand-default);
}
/* ================================================================
Footer
================================================================ */
.site-footer {
border-top: 1px solid var(--color-border-base-default);
}
/* ================================================================
Responsive
================================================================ */
@media (max-width: 767.98px) {
.display-large {
font-size: 2rem;
line-height: 2.5rem;
}
.heading-h3 {
font-size: 1.25rem;
line-height: 1.75rem;
}
}
</style>
</head>
<body>
<!-- ================================================================
Navigation
================================================================ -->
<nav class="mud-navbar">
<div class="container">
<div class="d-flex align-items-center gap-3">
<a href="index.html" class="mud-navbar-brand">MUD</a>
<span class="mud-navbar-version">v1.0.0</span>
</div>
<button class="mud-navbar-toggle" onclick="document.getElementById('navCollapse').classList.toggle('show')" aria-label="Toggle navigation"><i class="bi bi-list"></i></button>
<div class="mud-navbar-collapse" id="navCollapse">
<ul class="mud-navbar-nav">
<li><a href="docs/getting-started/introduction.html">Docs</a></li>
<li><a href="foundation.html">Foundation</a></li>
<li><a href="components.html">Components</a></li>
<li><a href="patterns.html" class="active">Patterns</a></li>
<li><a href="examples.html">Examples</a></li>
</ul>
<div class="mud-navbar-right">
<div class="mud-navbar-divider"></div>
<a href="https://github.com/evisoft/mud" class="mud-navbar-icon" title="GitHub" target="_blank" rel="noopener"><i class="bi bi-github"></i></a>
<button class="mud-navbar-icon" onclick="toggleTheme()" title="Toggle theme" id="themeToggleBtn"><i class="bi bi-moon-fill" id="themeIcon"></i></button>
</div>
</div>
</div>
</nav>
<!-- ================================================================
Section 1: Hero
================================================================ -->
<div class="container py-5">
<div class="row">
<div class="col-lg-8">
<h1 class="display-large mb-3">Layouts & Patterns</h1>
<p class="body-default" style="max-width: 680px;">
Every great government website starts with a solid page structure. This section showcases low-fidelity examples of how headers, content areas, and footers can be arranged for different page types — so your layouts don't look like they were assembled by a committee (even if they were).
</p>
</div>
</div>
</div>
<div class="container">
<!-- ================================================================
Section 2: What's Inside
================================================================ -->
<section class="demo-section">
<h2 class="heading-h3 mb-2">What's inside</h2>
<p class="body-default mb-4">Four essential page types that cover 90% of what you'll ever need to build:</p>
<div class="row g-4">
<!-- Card 1: Home Page -->
<div class="col-lg-3 col-md-6">
<div class="pattern-card">
<div class="card-thumb">
<div class="wireframe">
<div class="wf-header"></div>
<div class="wf-content">
<div class="wf-line"></div>
<div class="wf-line short"></div>
<div class="wf-line"></div>
<div class="wf-line short"></div>
</div>
<div class="wf-footer"></div>
</div>
</div>
<div class="card-body-content">
<h6>Home Page</h6>
<p>The classic layout for most services. Header on top, content in the middle, footer at the bottom. Revolutionary, we know.</p>
</div>
</div>
</div>
<!-- Card 2: Error Page -->
<div class="col-lg-3 col-md-6">
<div class="pattern-card">
<div class="card-thumb">
<div class="wireframe">
<div class="wf-header"></div>
<div class="wf-error-content">
<div class="wf-error-code">404</div>
<div class="wf-error-btn"></div>
</div>
<div class="wf-footer"></div>
</div>
</div>
<div class="card-body-content">
<h6>Error Page</h6>
<p>For when things go wrong (and they will). A friendly template for 404s and "oops" moments with helpful next steps.</p>
</div>
</div>
</div>
<!-- Card 3: Sidebar Page -->
<div class="col-lg-3 col-md-6">
<div class="pattern-card">
<div class="card-thumb">
<div class="wireframe">
<div class="wf-header"></div>
<div class="wf-sidebar-layout">
<div class="wf-sidebar">
<div class="wf-sidebar-line"></div>
<div class="wf-sidebar-line" style="width: 80%;"></div>
<div class="wf-sidebar-line"></div>
<div class="wf-sidebar-line" style="width: 70%;"></div>
<div class="wf-sidebar-line"></div>
</div>
<div class="wf-main-content">
<div class="wf-line"></div>
<div class="wf-line short"></div>
<div class="wf-line"></div>
</div>
</div>
<div class="wf-footer"></div>
</div>
</div>
<div class="card-body-content">
<h6>Sidebar Page</h6>
<p>A flexible layout with side navigation — perfect for dashboards, info hubs, or settings pages. The sidebar stays, the content scrolls.</p>
</div>
</div>
</div>
<!-- Card 4: Forms -->
<div class="col-lg-3 col-md-6">
<div class="pattern-card">
<div class="card-thumb">
<div class="wireframe">
<div class="wf-header"></div>
<div class="wf-form-content">
<div class="wf-form-label"></div>
<div class="wf-form-input"></div>
<div class="wf-form-label"></div>
<div class="wf-form-input"></div>
<div class="wf-form-label"></div>
<div class="wf-form-input"></div>
<div class="wf-form-btn"></div>
</div>
<div class="wf-footer"></div>
</div>
</div>
<div class="card-body-content">
<h6>Forms</h6>
<p>Optimized for input fields with generous spacing and accessibility built in. Because nobody likes a cramped form.</p>
</div>
</div>
</div>
</div>
</section>
<!-- ================================================================
Section 3: How to Use These
================================================================ -->
<section class="demo-section">
<h2 class="heading-h3 mb-3">How to use layouts & patterns</h2>
<ul class="content-list">
<li>Use these as reference blueprints to see how components work together in real pages.</li>
<li>Pick the page type that matches your context — error handling, main navigation, data entry, etc.</li>
<li>Don't copy-paste them as-is; apply the principles when building with approved MUD components. Ctrl+C is tempting, but your future self will thank you.</li>
</ul>
</section>
<!-- ================================================================
Section 4: Why This Matters
================================================================ -->
<section class="demo-section">
<h2 class="heading-h3 mb-2">Why this matters</h2>
<p class="body-default mb-3">By following these patterns, you will:</p>
<ul class="content-list">
<li>Keep page structures consistent across all government services (no more "creative interpretation").</li>
<li>Help teams think about design with clarity and a focus on usability over aesthetics.</li>
<li>Avoid reinventing layouts for common use cases — someone already solved this, promise.</li>
<li>Ensure headers, footers, and sidebars are applied in a predictable, user-friendly way that won't confuse citizens.</li>
</ul>
</section>
</div>
<!-- ================================================================
Footer
================================================================ -->
<footer class="container site-footer py-5">
<p class="text-secondary-custom mb-1" style="font-size: 0.875rem;">
© e-Governance Agency of the Republic of Moldova — Moldova Unified Design System
</p>
<p class="text-tertiary" style="font-size: 0.8125rem;">
Licensed under CC BY-NC-ND 4.0 — Use freely, give credit, don't sell it, don't remix it. Simple.
</p>
</footer>
<!-- Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
(function(){var s=localStorage.getItem('mud-theme');if(s==='dark'||s==='light'){document.documentElement.setAttribute('data-theme',s)}document.addEventListener('DOMContentLoaded',function(){updateThemeIcon()})})();
function toggleTheme(){var h=document.documentElement,c=h.getAttribute('data-theme'),n=c==='dark'?'light':'dark';h.setAttribute('data-theme',n);localStorage.setItem('mud-theme',n);updateThemeIcon()}
function updateThemeIcon(){var t=document.documentElement.getAttribute('data-theme');var i=document.getElementById('themeIcon');if(i){i.className=t==='dark'?'bi bi-sun-fill':'bi bi-moon-fill'}}
</script>
</body>
</html>