Commit 2cd4493
committed
feat(practice): modern redesign — Geist typography + per-cert gradients + answer-reveal effects
Big design pass addressing user feedback during local testing:
Typography fix — "ฟ้อนต์อ่านยากอ่ะ + monospace ไม่เข้ากัน":
- Drop Instrument Serif / Bricolage Grotesque (display serifs that fought
with inline code spans).
- Switch to **Geist + Geist Mono** — Vercel's sans+mono designed together
with matching x-height and proportions, so inline `code` spans now blend
smoothly into question stems instead of looking glued on.
Topic-bug fix — "topic คือ Question 2":
- All 12 mock-exam banks have title = "Question N" placeholders (source
markdown headings `## Question N *(Difficulty)*` carry no real title).
- Audit confirmed: 6 practice banks have 0 fallback titles; 12 mock banks
have 100 % fallback titles.
- Fix: suppress the Topic line in the feedback panel when title matches
/^Question \d+$/. The running head already shows the domain, which is
the meaningful context for mock questions.
Modern redesign — "อยากให้ดูทันสมัย น่าสนใจกว่านี้":
- Per-cert accent gradients on cert cards (DE → coral, DE Pro → indigo,
DA → emerald, ML → purple-pink, ML Pro → amber-red, GenAI → cyan-blue)
— top edge gradient bar + blurred halo on hover. Each cert has a
recognisable visual identity.
- Big tabular-figures question count (2.5rem) as the dominant element on
cert cards — confident, scannable.
- Cards: subtle lift on hover, glow halo behind, top gradient strip.
- Pill-shaped primary buttons with hover-shadow + accent-coloured glow.
- Larger, more confident H2 (clamp 1.75-2.5rem, -0.03em tracking).
Answer-reveal effects — "เพิ่ม effect ตอนตอบถูก/ผิด":
- Correct answer: green pulse + 0-6px glow ring + brief card-bg flash to
positive-soft + floating "+1" rising from the choice.
- Incorrect answer: 6-step horizontal shake on the user's wrong choice +
brief card-bg flash to negative-soft.
- Feedback panel slides down from above when revealed (0.35s).
- Streak toast pill appears at 3/5/7/10/+5 consecutive corrects ("3 in a
row · keep going") — top of screen, 1.8s, accent-coloured number badge.
Resets on first wrong answer.
- All animations gated behind prefers-reduced-motion: no-preference.
Other:
- Cache version bumped to ?v=8 across CSS, JS, and JSON fetches.
- Drop paper-grain texture (didn't suit the modern aesthetic).
- Theme toggle: remove old emoji icon span (was overlapping with the new
dot indicator), use pure CSS ::before dot.1 parent 90069be commit 2cd4493
3 files changed
Lines changed: 1119 additions & 398 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| |||
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| 75 | + | |
69 | 76 | | |
70 | 77 | | |
71 | 78 | | |
| |||
467 | 474 | | |
468 | 475 | | |
469 | 476 | | |
470 | | - | |
| 477 | + | |
471 | 478 | | |
472 | 479 | | |
473 | 480 | | |
474 | | - | |
475 | | - | |
| 481 | + | |
476 | 482 | | |
477 | 483 | | |
478 | 484 | | |
| |||
499 | 505 | | |
500 | 506 | | |
501 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
502 | 528 | | |
503 | 529 | | |
504 | 530 | | |
505 | 531 | | |
506 | 532 | | |
507 | 533 | | |
508 | | - | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
509 | 540 | | |
| 541 | + | |
510 | 542 | | |
511 | 543 | | |
512 | 544 | | |
513 | 545 | | |
514 | 546 | | |
515 | | - | |
516 | | - | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
517 | 570 | | |
518 | 571 | | |
519 | 572 | | |
520 | 573 | | |
521 | 574 | | |
522 | 575 | | |
523 | 576 | | |
524 | | - | |
525 | | - | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
526 | 582 | | |
527 | | - | |
| 583 | + | |
528 | 584 | | |
529 | 585 | | |
530 | | - | |
| 586 | + | |
531 | 587 | | |
532 | 588 | | |
533 | 589 | | |
| |||
667 | 723 | | |
668 | 724 | | |
669 | 725 | | |
670 | | - | |
671 | | - | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
672 | 730 | | |
673 | 731 | | |
674 | 732 | | |
| |||
680 | 738 | | |
681 | 739 | | |
682 | 740 | | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
683 | 775 | | |
684 | 776 | | |
685 | 777 | | |
| |||
701 | 793 | | |
702 | 794 | | |
703 | 795 | | |
| 796 | + | |
| 797 | + | |
704 | 798 | | |
705 | 799 | | |
706 | 800 | | |
| |||
0 commit comments