askrobots / dbbasic-web-native
Public
100+ copy-paste UI components in plain HTML and CSS: no dependencies, no build step.
danq9
Add canonical.html v1.0 - The single source of truth for usability standards
fb6e650
1 year ago
History
index.html · 29.1 KB · 850 lines
| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="UTF-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | <title>DBBasic Usability Standards - Visual Guide</title> |
| 7 | <style> |
| 8 | * { |
| 9 | margin: 0; |
| 10 | padding: 0; |
| 11 | box-sizing: border-box; |
| 12 | } |
| 13 | |
| 14 | @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap'); |
| 15 | |
| 16 | body { |
| 17 | font-family: 'Inter', sans-serif; |
| 18 | -webkit-font-smoothing: antialiased; |
| 19 | -moz-osx-font-smoothing: grayscale; |
| 20 | background: #ffffff; |
| 21 | color: #1a1a1a; |
| 22 | line-height: 1.6; |
| 23 | } |
| 24 | |
| 25 | /* ========== HERO ========== */ |
| 26 | .hero { |
| 27 | background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); |
| 28 | color: white; |
| 29 | padding: 120px 24px 80px; |
| 30 | text-align: center; |
| 31 | position: relative; |
| 32 | overflow: hidden; |
| 33 | } |
| 34 | |
| 35 | .hero::before { |
| 36 | content: ''; |
| 37 | position: absolute; |
| 38 | inset: 0; |
| 39 | background-image: |
| 40 | url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.06'/%3E%3C/svg%3E"); |
| 41 | pointer-events: none; |
| 42 | } |
| 43 | |
| 44 | .hero-content { |
| 45 | max-width: 800px; |
| 46 | margin: 0 auto; |
| 47 | position: relative; |
| 48 | z-index: 1; |
| 49 | } |
| 50 | |
| 51 | .hero h1 { |
| 52 | font-size: 56px; |
| 53 | font-weight: 900; |
| 54 | margin-bottom: 24px; |
| 55 | line-height: 1.1; |
| 56 | } |
| 57 | |
| 58 | .hero p { |
| 59 | font-size: 20px; |
| 60 | margin-bottom: 32px; |
| 61 | opacity: 0.95; |
| 62 | } |
| 63 | |
| 64 | .hero-badge { |
| 65 | display: inline-block; |
| 66 | background: rgba(255, 255, 255, 0.2); |
| 67 | backdrop-filter: blur(10px); |
| 68 | padding: 12px 24px; |
| 69 | border-radius: 24px; |
| 70 | font-size: 14px; |
| 71 | font-weight: 600; |
| 72 | margin-bottom: 16px; |
| 73 | } |
| 74 | |
| 75 | /* ========== CONTAINER ========== */ |
| 76 | .container { |
| 77 | max-width: 1200px; |
| 78 | margin: 0 auto; |
| 79 | padding: 0 24px; |
| 80 | } |
| 81 | |
| 82 | /* ========== SECTIONS ========== */ |
| 83 | .section { |
| 84 | padding: 80px 0; |
| 85 | } |
| 86 | |
| 87 | .section:nth-child(even) { |
| 88 | background: #f9fafb; |
| 89 | } |
| 90 | |
| 91 | .section-header { |
| 92 | text-align: center; |
| 93 | margin-bottom: 64px; |
| 94 | } |
| 95 | |
| 96 | .section-eyebrow { |
| 97 | font-size: 14px; |
| 98 | font-weight: 700; |
| 99 | text-transform: uppercase; |
| 100 | letter-spacing: 1px; |
| 101 | color: #7C3AED; |
| 102 | margin-bottom: 12px; |
| 103 | } |
| 104 | |
| 105 | .section h2 { |
| 106 | font-size: 40px; |
| 107 | font-weight: 800; |
| 108 | color: #111827; |
| 109 | margin-bottom: 16px; |
| 110 | } |
| 111 | |
| 112 | .section-description { |
| 113 | font-size: 18px; |
| 114 | color: #6b7280; |
| 115 | max-width: 700px; |
| 116 | margin: 0 auto; |
| 117 | } |
| 118 | |
| 119 | /* ========== STANDARD CARD ========== */ |
| 120 | .standard { |
| 121 | margin-bottom: 80px; |
| 122 | } |
| 123 | |
| 124 | .standard-header { |
| 125 | margin-bottom: 32px; |
| 126 | } |
| 127 | |
| 128 | .standard-title { |
| 129 | font-size: 28px; |
| 130 | font-weight: 700; |
| 131 | color: #111827; |
| 132 | margin-bottom: 12px; |
| 133 | } |
| 134 | |
| 135 | .standard-why { |
| 136 | font-size: 16px; |
| 137 | color: #6b7280; |
| 138 | margin-bottom: 8px; |
| 139 | } |
| 140 | |
| 141 | .standard-why strong { |
| 142 | color: #111827; |
| 143 | } |
| 144 | |
| 145 | .standard-rule { |
| 146 | display: inline-block; |
| 147 | background: #fef3c7; |
| 148 | color: #92400e; |
| 149 | padding: 8px 16px; |
| 150 | border-radius: 6px; |
| 151 | font-size: 14px; |
| 152 | font-weight: 600; |
| 153 | margin-top: 12px; |
| 154 | } |
| 155 | |
| 156 | /* ========== EXAMPLE CONTAINER ========== */ |
| 157 | .example-container { |
| 158 | display: grid; |
| 159 | grid-template-columns: 1fr 1fr; |
| 160 | gap: 32px; |
| 161 | margin-bottom: 24px; |
| 162 | } |
| 163 | |
| 164 | .example { |
| 165 | background: white; |
| 166 | border: 2px solid #e5e7eb; |
| 167 | border-radius: 12px; |
| 168 | overflow: hidden; |
| 169 | } |
| 170 | |
| 171 | .example-label { |
| 172 | background: #f9fafb; |
| 173 | padding: 12px 16px; |
| 174 | font-size: 14px; |
| 175 | font-weight: 700; |
| 176 | color: #111827; |
| 177 | border-bottom: 2px solid #e5e7eb; |
| 178 | display: flex; |
| 179 | align-items: center; |
| 180 | gap: 8px; |
| 181 | } |
| 182 | |
| 183 | .example-label.good::before { |
| 184 | content: '✓'; |
| 185 | color: #22c55e; |
| 186 | font-size: 18px; |
| 187 | font-weight: 900; |
| 188 | } |
| 189 | |
| 190 | .example-label.bad::before { |
| 191 | content: '✗'; |
| 192 | color: #ef4444; |
| 193 | font-size: 18px; |
| 194 | font-weight: 900; |
| 195 | } |
| 196 | |
| 197 | .example-content { |
| 198 | padding: 32px; |
| 199 | min-height: 200px; |
| 200 | display: flex; |
| 201 | align-items: center; |
| 202 | justify-content: center; |
| 203 | } |
| 204 | |
| 205 | /* ========== NAVIGATION EXAMPLES ========== */ |
| 206 | .nav-example-mobile { |
| 207 | width: 100%; |
| 208 | max-width: 375px; |
| 209 | height: 600px; |
| 210 | border: 8px solid #1f2937; |
| 211 | border-radius: 24px; |
| 212 | background: #f9fafb; |
| 213 | position: relative; |
| 214 | overflow: hidden; |
| 215 | } |
| 216 | |
| 217 | .mobile-header { |
| 218 | background: white; |
| 219 | padding: 16px; |
| 220 | display: flex; |
| 221 | justify-content: space-between; |
| 222 | align-items: center; |
| 223 | border-bottom: 1px solid #e5e7eb; |
| 224 | } |
| 225 | |
| 226 | .mobile-header-title { |
| 227 | font-size: 18px; |
| 228 | font-weight: 700; |
| 229 | } |
| 230 | |
| 231 | .mobile-icon { |
| 232 | width: 44px; |
| 233 | height: 44px; |
| 234 | background: #f3f4f6; |
| 235 | border-radius: 8px; |
| 236 | display: flex; |
| 237 | align-items: center; |
| 238 | justify-content: center; |
| 239 | font-size: 20px; |
| 240 | } |
| 241 | |
| 242 | .mobile-bottom-nav { |
| 243 | position: absolute; |
| 244 | bottom: 0; |
| 245 | left: 0; |
| 246 | right: 0; |
| 247 | background: white; |
| 248 | border-top: 1px solid #e5e7eb; |
| 249 | display: flex; |
| 250 | padding: 8px 0; |
| 251 | } |
| 252 | |
| 253 | .mobile-nav-item { |
| 254 | flex: 1; |
| 255 | display: flex; |
| 256 | flex-direction: column; |
| 257 | align-items: center; |
| 258 | padding: 8px; |
| 259 | gap: 4px; |
| 260 | min-height: 64px; |
| 261 | cursor: pointer; |
| 262 | transition: all 0.2s; |
| 263 | } |
| 264 | |
| 265 | .mobile-nav-item:hover { |
| 266 | background: #f9fafb; |
| 267 | } |
| 268 | |
| 269 | .mobile-nav-item.active { |
| 270 | color: #7C3AED; |
| 271 | } |
| 272 | |
| 273 | .mobile-nav-icon { |
| 274 | font-size: 24px; |
| 275 | } |
| 276 | |
| 277 | .mobile-nav-label { |
| 278 | font-size: 11px; |
| 279 | font-weight: 600; |
| 280 | } |
| 281 | |
| 282 | /* ========== TOUCH TARGET EXAMPLES ========== */ |
| 283 | .touch-target-demo { |
| 284 | display: flex; |
| 285 | gap: 32px; |
| 286 | align-items: center; |
| 287 | flex-wrap: wrap; |
| 288 | } |
| 289 | |
| 290 | .touch-target { |
| 291 | position: relative; |
| 292 | } |
| 293 | |
| 294 | .touch-target-button { |
| 295 | background: #7C3AED; |
| 296 | color: white; |
| 297 | border: none; |
| 298 | border-radius: 8px; |
| 299 | font-weight: 600; |
| 300 | cursor: pointer; |
| 301 | font-family: inherit; |
| 302 | } |
| 303 | |
| 304 | .touch-target-button.good { |
| 305 | width: 44px; |
| 306 | height: 44px; |
| 307 | font-size: 14px; |
| 308 | } |
| 309 | |
| 310 | .touch-target-button.bad { |
| 311 | width: 28px; |
| 312 | height: 28px; |
| 313 | font-size: 12px; |
| 314 | } |
| 315 | |
| 316 | .touch-target-overlay { |
| 317 | position: absolute; |
| 318 | border: 2px dashed; |
| 319 | pointer-events: none; |
| 320 | } |
| 321 | |
| 322 | .touch-target.good .touch-target-overlay { |
| 323 | border-color: #22c55e; |
| 324 | background: rgba(34, 197, 94, 0.1); |
| 325 | } |
| 326 | |
| 327 | .touch-target.bad .touch-target-overlay { |
| 328 | border-color: #ef4444; |
| 329 | background: rgba(239, 68, 68, 0.1); |
| 330 | } |
| 331 | |
| 332 | .touch-target-size { |
| 333 | position: absolute; |
| 334 | top: -24px; |
| 335 | left: 50%; |
| 336 | transform: translateX(-50%); |
| 337 | font-size: 11px; |
| 338 | font-weight: 700; |
| 339 | white-space: nowrap; |
| 340 | padding: 2px 6px; |
| 341 | border-radius: 4px; |
| 342 | } |
| 343 | |
| 344 | .touch-target.good .touch-target-size { |
| 345 | background: #22c55e; |
| 346 | color: white; |
| 347 | } |
| 348 | |
| 349 | .touch-target.bad .touch-target-size { |
| 350 | background: #ef4444; |
| 351 | color: white; |
| 352 | } |
| 353 | |
| 354 | /* ========== SPACING EXAMPLES ========== */ |
| 355 | .spacing-demo { |
| 356 | background: white; |
| 357 | padding: 32px; |
| 358 | border-radius: 12px; |
| 359 | border: 2px solid #e5e7eb; |
| 360 | } |
| 361 | |
| 362 | .spacing-box { |
| 363 | background: #7C3AED; |
| 364 | color: white; |
| 365 | padding: 16px; |
| 366 | border-radius: 8px; |
| 367 | font-weight: 600; |
| 368 | text-align: center; |
| 369 | } |
| 370 | |
| 371 | .spacing-indicator { |
| 372 | height: 32px; |
| 373 | background: repeating-linear-gradient( |
| 374 | 90deg, |
| 375 | #e5e7eb, |
| 376 | #e5e7eb 8px, |
| 377 | transparent 8px, |
| 378 | transparent 16px |
| 379 | ); |
| 380 | position: relative; |
| 381 | margin: 16px 0; |
| 382 | } |
| 383 | |
| 384 | .spacing-label { |
| 385 | position: absolute; |
| 386 | top: 50%; |
| 387 | left: 50%; |
| 388 | transform: translate(-50%, -50%); |
| 389 | background: #7C3AED; |
| 390 | color: white; |
| 391 | padding: 4px 12px; |
| 392 | border-radius: 4px; |
| 393 | font-size: 12px; |
| 394 | font-weight: 700; |
| 395 | } |
| 396 | |
| 397 | /* ========== FORM EXAMPLES ========== */ |
| 398 | .form-demo { |
| 399 | max-width: 400px; |
| 400 | } |
| 401 | |
| 402 | .form-group { |
| 403 | margin-bottom: 24px; |
| 404 | } |
| 405 | |
| 406 | .form-label { |
| 407 | display: block; |
| 408 | font-size: 14px; |
| 409 | font-weight: 600; |
| 410 | color: #374151; |
| 411 | margin-bottom: 8px; |
| 412 | } |
| 413 | |
| 414 | .form-input { |
| 415 | width: 100%; |
| 416 | padding: 14px 16px; |
| 417 | border: 2px solid #e5e7eb; |
| 418 | border-radius: 8px; |
| 419 | font-size: 16px; |
| 420 | font-family: inherit; |
| 421 | transition: all 0.2s; |
| 422 | } |
| 423 | |
| 424 | .form-input:focus { |
| 425 | outline: none; |
| 426 | border-color: #7C3AED; |
| 427 | box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1); |
| 428 | } |
| 429 | |
| 430 | .form-button { |
| 431 | background: #7C3AED; |
| 432 | color: white; |
| 433 | border: none; |
| 434 | padding: 14px 24px; |
| 435 | border-radius: 8px; |
| 436 | font-size: 16px; |
| 437 | font-weight: 600; |
| 438 | cursor: pointer; |
| 439 | font-family: inherit; |
| 440 | transition: all 0.2s; |
| 441 | } |
| 442 | |
| 443 | .form-button:hover { |
| 444 | transform: translateY(-2px); |
| 445 | box-shadow: 0 8px 20px rgba(124, 58, 237, 0.3); |
| 446 | } |
| 447 | |
| 448 | /* ========== APPLICATION TYPE CARDS ========== */ |
| 449 | .app-type-grid { |
| 450 | display: grid; |
| 451 | grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); |
| 452 | gap: 32px; |
| 453 | margin-top: 48px; |
| 454 | } |
| 455 | |
| 456 | .app-type-card { |
| 457 | background: white; |
| 458 | border: 2px solid #e5e7eb; |
| 459 | border-radius: 12px; |
| 460 | padding: 32px; |
| 461 | transition: all 0.3s; |
| 462 | } |
| 463 | |
| 464 | .app-type-card:hover { |
| 465 | border-color: #7C3AED; |
| 466 | box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15); |
| 467 | transform: translateY(-4px); |
| 468 | } |
| 469 | |
| 470 | .app-type-icon { |
| 471 | font-size: 48px; |
| 472 | margin-bottom: 16px; |
| 473 | } |
| 474 | |
| 475 | .app-type-title { |
| 476 | font-size: 24px; |
| 477 | font-weight: 700; |
| 478 | color: #111827; |
| 479 | margin-bottom: 8px; |
| 480 | } |
| 481 | |
| 482 | .app-type-goal { |
| 483 | font-size: 14px; |
| 484 | color: #7C3AED; |
| 485 | font-weight: 600; |
| 486 | margin-bottom: 16px; |
| 487 | } |
| 488 | |
| 489 | .app-type-list { |
| 490 | list-style: none; |
| 491 | font-size: 14px; |
| 492 | color: #6b7280; |
| 493 | } |
| 494 | |
| 495 | .app-type-list li { |
| 496 | padding: 8px 0; |
| 497 | border-bottom: 1px solid #f3f4f6; |
| 498 | } |
| 499 | |
| 500 | .app-type-list li:last-child { |
| 501 | border-bottom: none; |
| 502 | } |
| 503 | |
| 504 | .app-type-list strong { |
| 505 | color: #111827; |
| 506 | font-weight: 600; |
| 507 | } |
| 508 | |
| 509 | /* ========== FOOTER ========== */ |
| 510 | .footer { |
| 511 | background: #111827; |
| 512 | color: white; |
| 513 | padding: 48px 24px; |
| 514 | text-align: center; |
| 515 | } |
| 516 | |
| 517 | .footer a { |
| 518 | color: #7C3AED; |
| 519 | text-decoration: none; |
| 520 | font-weight: 600; |
| 521 | } |
| 522 | |
| 523 | .footer a:hover { |
| 524 | text-decoration: underline; |
| 525 | } |
| 526 | |
| 527 | /* ========== RESPONSIVE ========== */ |
| 528 | @media (max-width: 768px) { |
| 529 | .hero h1 { |
| 530 | font-size: 36px; |
| 531 | } |
| 532 | |
| 533 | .section h2 { |
| 534 | font-size: 28px; |
| 535 | } |
| 536 | |
| 537 | .example-container { |
| 538 | grid-template-columns: 1fr; |
| 539 | } |
| 540 | |
| 541 | .standard-title { |
| 542 | font-size: 22px; |
| 543 | } |
| 544 | } |
| 545 | </style> |
| 546 | </head> |
| 547 | <body> |
| 548 | <!-- HERO --> |
| 549 | <div class="hero"> |
| 550 | <div class="hero-content"> |
| 551 | <div class="hero-badge">📐 Prevent GeoCities 2.0</div> |
| 552 | <h1>DBBasic Usability Standards</h1> |
| 553 | <p>Visual guide to building apps people can actually use. Learn the rules, see the examples, understand the WHY.</p> |
| 554 | </div> |
| 555 | </div> |
| 556 | |
| 557 | <!-- NAVIGATION STANDARDS --> |
| 558 | <div class="section"> |
| 559 | <div class="container"> |
| 560 | <div class="section-header"> |
| 561 | <div class="section-eyebrow">Navigation</div> |
| 562 | <h2>Consistent Navigation Hierarchy</h2> |
| 563 | <p class="section-description">Put navigation in the same place every time. Users shouldn't hunt for it.</p> |
| 564 | </div> |
| 565 | |
| 566 | <div class="standard"> |
| 567 | <div class="standard-header"> |
| 568 | <h3 class="standard-title">Mobile: Bottom Tab Bar</h3> |
| 569 | <p class="standard-why"><strong>Why:</strong> Thumb-friendly zone. 70% of users hold phones one-handed.</p> |
| 570 | <div class="standard-rule">✓ Height: 64px minimum • Items: 3-5 max • Always visible</div> |
| 571 | </div> |
| 572 | |
| 573 | <div class="example-container"> |
| 574 | <div class="example"> |
| 575 | <div class="example-label good">Good Example</div> |
| 576 | <div class="example-content"> |
| 577 | <div class="nav-example-mobile"> |
| 578 | <div class="mobile-header"> |
| 579 | <div class="mobile-icon">☰</div> |
| 580 | <div class="mobile-header-title">Dashboard</div> |
| 581 | <div class="mobile-icon">⚙️</div> |
| 582 | </div> |
| 583 | <div class="mobile-bottom-nav"> |
| 584 | <div class="mobile-nav-item active"> |
| 585 | <div class="mobile-nav-icon">🏠</div> |
| 586 | <div class="mobile-nav-label">Home</div> |
| 587 | </div> |
| 588 | <div class="mobile-nav-item"> |
| 589 | <div class="mobile-nav-icon">🔍</div> |
| 590 | <div class="mobile-nav-label">Search</div> |
| 591 | </div> |
| 592 | <div class="mobile-nav-item"> |
| 593 | <div class="mobile-nav-icon">➕</div> |
| 594 | <div class="mobile-nav-label">Create</div> |
| 595 | </div> |
| 596 | <div class="mobile-nav-item"> |
| 597 | <div class="mobile-nav-icon">👤</div> |
| 598 | <div class="mobile-nav-label">Profile</div> |
| 599 | </div> |
| 600 | </div> |
| 601 | </div> |
| 602 | </div> |
| 603 | </div> |
| 604 | |
| 605 | <div class="example"> |
| 606 | <div class="example-label bad">Bad Example</div> |
| 607 | <div class="example-content"> |
| 608 | <div class="nav-example-mobile"> |
| 609 | <div class="mobile-header"> |
| 610 | <div class="mobile-header-title">Dashboard</div> |
| 611 | <div class="mobile-icon">☰</div> |
| 612 | </div> |
| 613 | <div style="padding: 24px; font-size: 14px; color: #ef4444;"> |
| 614 | <p><strong>❌ Problems:</strong></p> |
| 615 | <ul style="margin-left: 20px; margin-top: 12px; line-height: 1.8;"> |
| 616 | <li>No bottom navigation (must reach top-right menu)</li> |
| 617 | <li>Navigation hidden in hamburger</li> |
| 618 | <li>Requires two-handed operation</li> |
| 619 | <li>Slows down common tasks</li> |
| 620 | </ul> |
| 621 | </div> |
| 622 | </div> |
| 623 | </div> |
| 624 | </div> |
| 625 | </div> |
| 626 | </div> |
| 627 | </div> |
| 628 | </div> |
| 629 | |
| 630 | <!-- TOUCH TARGETS --> |
| 631 | <div class="section"> |
| 632 | <div class="container"> |
| 633 | <div class="section-header"> |
| 634 | <div class="section-eyebrow">Touch Targets</div> |
| 635 | <h2>Minimum Tap Sizes</h2> |
| 636 | <p class="section-description">Make everything big enough to tap without frustration.</p> |
| 637 | </div> |
| 638 | |
| 639 | <div class="standard"> |
| 640 | <div class="standard-header"> |
| 641 | <h3 class="standard-title">Mobile: 44×44px Minimum</h3> |
| 642 | <p class="standard-why"><strong>Why:</strong> Prevents mis-taps from "fat finger problem". WCAG 2.5.5 Level AAA standard.</p> |
| 643 | <div class="standard-rule">✓ Mobile: 44×44px • Desktop: 32×32px • Spacing: 8px minimum</div> |
| 644 | </div> |
| 645 | |
| 646 | <div class="example-container"> |
| 647 | <div class="example"> |
| 648 | <div class="example-label good">Good Example - 44×44px</div> |
| 649 | <div class="example-content"> |
| 650 | <div class="touch-target-demo"> |
| 651 | <div class="touch-target good"> |
| 652 | <div class="touch-target-size">44×44px</div> |
| 653 | <div class="touch-target-overlay" style="width: 44px; height: 44px;"></div> |
| 654 | <button class="touch-target-button good">✓</button> |
| 655 | </div> |
| 656 | <div style="max-width: 200px;"> |
| 657 | <p style="font-size: 14px; color: #22c55e;"><strong>✓ Easy to tap</strong></p> |
| 658 | <p style="font-size: 13px; color: #6b7280; margin-top: 4px;">Large enough for thumbs, prevents accidental taps on nearby elements.</p> |
| 659 | </div> |
| 660 | </div> |
| 661 | </div> |
| 662 | </div> |
| 663 | |
| 664 | <div class="example"> |
| 665 | <div class="example-label bad">Bad Example - 28×28px</div> |
| 666 | <div class="example-content"> |
| 667 | <div class="touch-target-demo"> |
| 668 | <div class="touch-target bad"> |
| 669 | <div class="touch-target-size">28×28px</div> |
| 670 | <div class="touch-target-overlay" style="width: 44px; height: 44px;"></div> |
| 671 | <button class="touch-target-button bad">✗</button> |
| 672 | </div> |
| 673 | <div style="max-width: 200px;"> |
| 674 | <p style="font-size: 14px; color: #ef4444;"><strong>✗ Too small</strong></p> |
| 675 | <p style="font-size: 13px; color: #6b7280; margin-top: 4px;">Requires precision tapping, causes user frustration and errors.</p> |
| 676 | </div> |
| 677 | </div> |
| 678 | </div> |
| 679 | </div> |
| 680 | </div> |
| 681 | </div> |
| 682 | </div> |
| 683 | </div> |
| 684 | |
| 685 | <!-- SPACING SYSTEM --> |
| 686 | <div class="section"> |
| 687 | <div class="container"> |
| 688 | <div class="section-header"> |
| 689 | <div class="section-eyebrow">Spacing</div> |
| 690 | <h2>Consistent Spacing System</h2> |
| 691 | <p class="section-description">Use a mathematical system. No random pixel values.</p> |
| 692 | </div> |
| 693 | |
| 694 | <div class="standard"> |
| 695 | <div class="standard-header"> |
| 696 | <h3 class="standard-title">8px Base Unit</h3> |
| 697 | <p class="standard-why"><strong>Why:</strong> Creates visual rhythm, divisible by 2/4 for responsive design, works with most screen resolutions.</p> |
| 698 | <div class="standard-rule">✓ Use: 8px, 16px, 24px, 32px, 48px, 64px • Avoid: 13px, 27px, 41px</div> |
| 699 | </div> |
| 700 | |
| 701 | <div class="spacing-demo"> |
| 702 | <div class="spacing-box">Element 1</div> |
| 703 | <div class="spacing-indicator"> |
| 704 | <div class="spacing-label">32px (4 × 8px)</div> |
| 705 | </div> |
| 706 | <div class="spacing-box">Element 2</div> |
| 707 | <div class="spacing-indicator"> |
| 708 | <div class="spacing-label">24px (3 × 8px)</div> |
| 709 | </div> |
| 710 | <div class="spacing-box">Element 3</div> |
| 711 | </div> |
| 712 | |
| 713 | <div style="margin-top: 24px; padding: 16px; background: #fef3c7; border-radius: 8px; font-size: 14px;"> |
| 714 | <strong>Spacing Scale:</strong> 8px (small) • 16px (medium) • 24px (large) • 32px (cards) • 48px (sections mobile) • 64px (sections desktop) |
| 715 | </div> |
| 716 | </div> |
| 717 | </div> |
| 718 | </div> |
| 719 | |
| 720 | <!-- FORM STANDARDS --> |
| 721 | <div class="section"> |
| 722 | <div class="container"> |
| 723 | <div class="section-header"> |
| 724 | <div class="section-eyebrow">Forms</div> |
| 725 | <h2>Form Best Practices</h2> |
| 726 | <p class="section-description">Make forms easy to complete. Every friction point = lost conversions.</p> |
| 727 | </div> |
| 728 | |
| 729 | <div class="standard"> |
| 730 | <div class="standard-header"> |
| 731 | <h3 class="standard-title">Labels Above Inputs</h3> |
| 732 | <p class="standard-why"><strong>Why:</strong> Faster to scan, works for long labels, mobile-friendly. Users complete forms 30% faster.</p> |
| 733 | <div class="standard-rule">✓ Stacked layout • 56px input height (mobile) • 16px font size minimum</div> |
| 734 | </div> |
| 735 | |
| 736 | <div class="example-container"> |
| 737 | <div class="example"> |
| 738 | <div class="example-label good">Good Example</div> |
| 739 | <div class="example-content"> |
| 740 | <form class="form-demo"> |
| 741 | <div class="form-group"> |
| 742 | <label class="form-label">Email address</label> |
| 743 | <input type="email" class="form-input" placeholder="you@example.com"> |
| 744 | </div> |
| 745 | <div class="form-group"> |
| 746 | <label class="form-label">Password</label> |
| 747 | <input type="password" class="form-input" placeholder="••••••••"> |
| 748 | </div> |
| 749 | <button type="submit" class="form-button">Sign In</button> |
| 750 | </form> |
| 751 | </div> |
| 752 | </div> |
| 753 | |
| 754 | <div class="example"> |
| 755 | <div class="example-label bad">Bad Example</div> |
| 756 | <div class="example-content"> |
| 757 | <div style="padding: 24px; font-size: 14px; color: #ef4444;"> |
| 758 | <p><strong>❌ Common Mistakes:</strong></p> |
| 759 | <ul style="margin-left: 20px; margin-top: 12px; line-height: 1.8;"> |
| 760 | <li>Placeholder-only labels (disappear when typing)</li> |
| 761 | <li>Labels inside inputs (confusing)</li> |
| 762 | <li>Tiny inputs <44px height (hard to tap)</li> |
| 763 | <li>Font size <16px (iOS zooms in)</li> |
| 764 | <li>Poor error messaging (no inline hints)</li> |
| 765 | </ul> |
| 766 | </div> |
| 767 | </div> |
| 768 | </div> |
| 769 | </div> |
| 770 | </div> |
| 771 | </div> |
| 772 | </div> |
| 773 | |
| 774 | <!-- APPLICATION TYPES --> |
| 775 | <div class="section"> |
| 776 | <div class="container"> |
| 777 | <div class="section-header"> |
| 778 | <div class="section-eyebrow">Application Types</div> |
| 779 | <h2>Know What You're Building</h2> |
| 780 | <p class="section-description">Not all applications are the same. Standards adapt to context and user goals.</p> |
| 781 | </div> |
| 782 | |
| 783 | <div class="app-type-grid"> |
| 784 | <div class="app-type-card"> |
| 785 | <div class="app-type-icon">📄</div> |
| 786 | <h3 class="app-type-title">Brochure/Marketing</h3> |
| 787 | <div class="app-type-goal">Goal: Convert visitors</div> |
| 788 | <ul class="app-type-list"> |
| 789 | <li><strong>Density:</strong> Low (airy, whitespace)</li> |
| 790 | <li><strong>Spacing:</strong> 64-96px sections</li> |
| 791 | <li><strong>Navigation:</strong> Simple top bar</li> |
| 792 | <li><strong>Interaction:</strong> Scroll + Click</li> |
| 793 | <li><strong>Examples:</strong> Landing pages, portfolios</li> |
| 794 | </ul> |
| 795 | </div> |
| 796 | |
| 797 | <div class="app-type-card"> |
| 798 | <div class="app-type-icon">📊</div> |
| 799 | <h3 class="app-type-title">App/Dashboard</h3> |
| 800 | <div class="app-type-goal">Goal: Complete tasks efficiently</div> |
| 801 | <ul class="app-type-list"> |
| 802 | <li><strong>Density:</strong> High (dense, data-rich)</li> |
| 803 | <li><strong>Spacing:</strong> 24-32px sections</li> |
| 804 | <li><strong>Navigation:</strong> Persistent sidebar</li> |
| 805 | <li><strong>Interaction:</strong> Keyboard + Click</li> |
| 806 | <li><strong>Examples:</strong> Dashboards, SaaS apps</li> |
| 807 | </ul> |
| 808 | </div> |
| 809 | |
| 810 | <div class="app-type-card"> |
| 811 | <div class="app-type-icon">📱</div> |
| 812 | <h3 class="app-type-title">Social/Content</h3> |
| 813 | <div class="app-type-goal">Goal: Engage users, time on site</div> |
| 814 | <ul class="app-type-list"> |
| 815 | <li><strong>Density:</strong> Medium</li> |
| 816 | <li><strong>Spacing:</strong> 16-24px posts</li> |
| 817 | <li><strong>Navigation:</strong> Sticky top bar</li> |
| 818 | <li><strong>Interaction:</strong> Scroll + React</li> |
| 819 | <li><strong>Examples:</strong> Social media, blogs, forums</li> |
| 820 | </ul> |
| 821 | </div> |
| 822 | </div> |
| 823 | |
| 824 | <div style="margin-top: 48px; padding: 32px; background: white; border-radius: 12px; border: 2px solid #7C3AED; text-align: center;"> |
| 825 | <p style="font-size: 18px; color: #111827; margin-bottom: 12px;"> |
| 826 | <strong>Each type has different standards.</strong> |
| 827 | </p> |
| 828 | <p style="font-size: 16px; color: #6b7280;"> |
| 829 | A marketing site needs big hero sections and CTAs. A dashboard needs dense data and keyboard shortcuts. Social needs infinite scroll and reactions. Use the RIGHT standards for your context. |
| 830 | </p> |
| 831 | </div> |
| 832 | </div> |
| 833 | </div> |
| 834 | |
| 835 | <!-- FOOTER --> |
| 836 | <div class="footer"> |
| 837 | <div class="container"> |
| 838 | <p style="font-size: 18px; margin-bottom: 16px;"> |
| 839 | <strong>Ready to build with standards?</strong> |
| 840 | </p> |
| 841 | <p style="font-size: 14px; opacity: 0.9; margin-bottom: 24px;"> |
| 842 | View <a href="../demo-marketing-complete.html">live demos with interactive overlays</a> or read the <a href="../USABILITY-STANDARDS.md">full documentation</a> |
| 843 | </p> |
| 844 | <p style="font-size: 12px; opacity: 0.7;"> |
| 845 | DBBasic Usability Standards v1.0 • Created by <a href="https://dbbasic.com">Dan Quellhorst</a> |
| 846 | </p> |
| 847 | </div> |
| 848 | </div> |
| 849 | </body> |
| 850 | </html> |